Models & protocols
Where model IDs come from, which model uses which endpoint, how to check Responses support, official SDK compatibility, and how to stream.
1. Finding available models
1.1 How do I know which models I can call?
Call GET /v1/models. It returns only the models the current API key is authorized for and that remain available under the account's permissions and actual upstream routing, along with each model's type, supported_protocols, protocol_endpoints, format, and endpoint.
Use the returned IDs verbatim. Field meanings are in List models.
1.2 What does "Model not available" mean?
Check three things, in order:
- The model ID came from the current API key's
GET /v1/models. - The model is authorized for that key.
- The model's selected channel is still available.
1.3 Which model ID should I send?
The LLM ID returned by GET /v1/models, exactly as returned. The gateway routes it through that model's selected channel, and different models on the same key can use different channels.
2. Choosing the right protocol
2.1 Why do OpenAI-format calls to Claude and Gemini fail?
Both have their own native protocol, and the gateway forwards through it:
| Model | Endpoint | Notes |
|---|---|---|
| Claude | POST /v1/messages | See Anthropic format. /v1/chat/completions is rejected |
| Gemini | POST /v1/models/{model}:generateContent | See Gemini format |
One exception: Gemini models whose supported_protocols includes openai-completions can use OpenAI Chat Completions. Claude has no such exception.
2.2 How do I check whether a model supports Responses?
Call GET /v1/models and look for openai-responses in supported_protocols; older clients can check that responses_endpoint reads /v1/responses. If it's there, the model can use the OpenAI Responses API.
Take support from the model-list item, never from the model name — /v1/responses accepts only enabled models that advertise it.
2.3 Can I use the official OpenAI SDK?
Yes, for OpenAI-style endpoints: Chat Completions, Responses on models that advertise responses_endpoint, and GPT Image 2 generations / edits.
Claude uses its native SDK. Gemini uses its native format by default, though models advertising openai-completions can also use the OpenAI SDK. General media generation uses the async task API.
2.4 How do I turn on streaming?
| Protocol | How to enable it |
|---|---|
| Chat Completions | Send "stream":true in the request body |
| OpenAI Responses | Send "stream":true in the request body |
| Anthropic Messages | Send "stream":true in the request body |
| Gemini | Use :streamGenerateContent |
| Media models | No SSE; create a task and poll its status |
3. Parameters & caching
3.1 How do I get prompt-cache hits on GPT models?
Send the session-id header consistently: read its value from the response and send it unchanged with every LLM request in the same associated session. The header is optional but recommended on every request.
thread-id and conversation-id are for conversation tracking only and are not required for cache hits. Media-task endpoints and other custom headers are not forwarded, and none of these headers should carry sensitive credentials.
3.2 Why do Flex claude-opus-4-7 / 4-8 return 400?
These two Flex models are strict about sampling parameters:
- Set
temperatureto exactly1.0, or omit it. - Do not send
temperatureandtop_ptogether.
For other values, switch that model's channel to Standard and keep using the same bare model ID.