In the OpenAI SDK, replace base_url and the key, then set an exact Guard model. Check other fields against the selected family and API contract: compatibility does not imply every OpenAI feature is supported.
diff
from openai import OpenAI
client = OpenAI(
- api_key=OPENAI_KEY,
+ api_key=GUARD_KEY,
+ base_url="https://api.guardrelay.ai/v1",
)Set a Claude model such as claude-sonnet-5 instead of an OpenAI model, and check parameters against Chat Completions.
For another family, set its exact model and check the fields supported by the selected API. The address and key stay shared.
| Family | What goes in model | Endpoint |
|---|---|---|
| Claude | claude-sonnet-5, claude-opus-5, claude-haiku-4-5 | /v1/chat/completions, /v1/messages, /v1/responses |
| Kimi | k3, k3-256k, kimi-for-coding, kimi-for-coding-highspeed | /v1/chat/completions, /v1/messages, /v1/responses |
| Composer | composer-2.5, composer-2.5-fast | /v1/chat/completions, /v1/messages, /v1/responses |
| Grok | cursor-grok-4.6-high and the other 7 IDs | /v1/chat/completions, /v1/messages, /v1/responses |