Skip to main content
Use the OpenAI or Anthropic dialect supported by your client. The gateway routes every chat request to the provider’s own API for your dialect where one serves the model, and translates it onto another API the provider serves otherwise. The x-gateway-model-wire response header names the API that answered. A route’s existence does not establish support for every provider. Check the model’s modality and test the request shape your application uses.

Model catalog

GET /openai/v1/models and GET /openai/v1/models/<provider>/<model> report each model’s token limits: the same ceilings the gateway checks requests against. Each limit is reported under the names different client ecosystems read: A field is omitted when the gateway cannot read it. On a model with a deployment pool, each field reports the smallest limit among the deployments that would serve it — a request that fits is accepted by whichever deployment serves the call. A model behind a disabled provider reports only limits stored on the model, and omits the fields when none are stored.

Headers

Request headers

The x-gateway-* headers are read by the gateway and never forwarded to the provider.

Response headers

Embeddings

POST /openai/v1/embeddings takes OpenAI’s request body: model, input as a string or an array of strings, and optional dimensions and encoding_format. The model must be an embedding model; a chat model is refused with 400. The gateway adds one optional field that OpenAI’s API doesn’t have: Only models that embed documents and queries differently use input_type, such as Cohere Embed on Amazon Bedrock. Every other model ignores it, and it is never forwarded to a provider on the OpenAI dialect. Any other value returns 400 with input_type must be `search_document` or `search_query`.
A dimensions value the model can’t produce is refused with 400 before the provider is called.

Model names

Send the exact qualified model id, such as openai-prod/<model-name>, returned by the catalog. The provider prefix selects the configured connection. A bare upstream name can fail to resolve or become ambiguous when more than one connection serves it. Disabled or archived models cannot route. Disabled or archived providers also prevent their models from routing. Catalog queries can include models behind disabled providers when requested, with is_routable: false. When the organization requires zero data retention, only models on zero-data-retention providers — or deployment pools with a deployment on one — are listed and can route. See Zero data retention.

Tools and conversation state

Tool definitions and tool results travel in the client’s request dialect. Your application executes client-side tools and sends their results in a later request. On a Vertex provider, the gateway translates a tool name Gemini does not accept, such as an MCP server’s atlan/search, into a name Gemini accepts, and replies read the call back under the name your client sent. Hosted tools such as provider-run web search are unavailable through the Responses compatibility surface. An OpenAI-dialect client sends the results of parallel tool calls as one tool message per call. When the selected model is served over the Anthropic Messages API or Amazon Bedrock’s Converse API, the gateway combines consecutive messages of the same role into one, so those results reach the model together, in the order sent. On the Messages dialect, a message with the role system among messages — which Claude Code sends on every turn — is accepted. It is forwarded in place only on Anthropic’s own Messages API, and only when the request names a mid-conversation-system beta in anthropic-beta. Served on any other API, or on Anthropic without that beta named, it goes out as a user turn where it was sent, its content prefixed with System instruction:, and a named mid-conversation-system beta is dropped rather than forwarded. The turn keeps its place in the conversation rather than its text moving into system, so an instruction sent mid-conversation applies only from there on, and the provider’s cached prompt prefix is not invalidated. Tool search is another Messages-dialect form Claude Code sends: its tools can carry defer_loading, so the model sees a tool only once a search returns a tool_reference to it. Served on Anthropic’s own Messages API, tool search passes through as sent. Served on any other API, the gateway sends every deferred tool loaded — the model can call the same tools without searching — turns a tool_reference block that only names a tool into the text Tool loaded: <tool name>, and drops a beta whose name begins with advanced-tool-use- or tool-search-tool- from anthropic-beta. A turn of a Messages request can also carry its own output_config: Claude Code sets each turn’s effort on it, behind a beta whose name begins with per-turn-control-. Served on Anthropic’s own Messages API, a turn’s output_config passes through as sent. Served on any other API, the gateway drops the turn’s output_config, and a beta whose name begins with per-turn-control- is dropped from anthropic-beta. The request-level effort the caller also sends still sets how hard the model works. The gateway does not provide the Assistants API, vector stores, batches, fine-tuning, or Anthropic token counting. Responses requests must carry the conversation state they need. Anthropic metadata and context_management pass through as sent on the Messages API; when a request is served on another API, fields that API has no slot for are dropped and named in x-gateway-model-dropped, and a field that would change what the reply carries is refused. On the Messages API, anthropic-beta header values are forwarded with the request, up to 16 and each a beta name; betas that reach the provider account’s own files, skills, code-execution containers, MCP connections, or OAuth grants are dropped.

Provider-specific requests

Reasoning effort, structured output, images, audio, cache controls, and provider-specific parameters depend on the model family and provider. A parameter your client accepts may still be refused for the selected model. For several families the gateway checks the parameter ranges the vendor or host publishes, such as temperature from 0 to 2 for Qwen, AI21 Jamba, Writer Palmyra, or an OpenAI model served through Amazon Bedrock, and refuses a value outside the range, naming the field. Use the returned error’s field and reason to adjust the request. A chat request’s service_tier names the service tier to serve it at: default, priority, flex, or ultrafast (auto leaves the choice to the provider). The call is billed at that tier’s rates; when the provider’s reply names the tier it actually served, that tier’s rates apply. A tier the model has no rates for is not sent: the call is served at the standard tier, and service_tier is named in x-gateway-model-dropped. On Amazon Bedrock, an ultrafast request on the Converse API is refused with 400 naming service_tier; Bedrock’s OpenAI-compatible routes take ultrafast as sent. A Responses reply carries the tier the provider served at in its service_tier field. Reasoning is returned in each dialect’s own shape: as reasoning_content on chat completions, as thinking blocks on Messages, and as reasoning output items on Responses. Where the provider signed its reasoning, a Responses reply carries the signature in the item’s encrypted_content, which replays in the next request’s input. For Vertex image generation, Gemini image models use Gemini’s native image API. Responses return base64 image data in PNG or JPEG. Unsupported size ratios, URL responses, and transparent backgrounds are refused. See the image constraints before using OpenAI image options with Vertex. See Model Gateway errors for resolution, compatibility, throttling, and upstream errors.