Skip to main content
When a routing rule sends a request to a provider that speaks a different format than the caller, the gateway translates it both ways. Your OpenAI code can call an Anthropic model, and your Anthropic code can call an OpenAI model, with no change on your side.

How it works

Set up a routing rule that targets a provider in the other format, for example routing OpenAI-format traffic to an anthropic provider. From then on, the gateway:
  • Translates the request from the OpenAI Responses API to the Anthropic Messages API, or the reverse.
  • Translates the response back into the format your client expects.
  • Translates streaming events the same way, so streaming keeps working.

What’s translated

The common shape of a chat request carries over in both directions:
  • Messages and the system prompt.
  • The max-tokens setting.
  • Tools, tool choice, and tool results.
  • Streaming, temperature, and top-p.
Settings with no counterpart in the target format are dropped rather than approximated. Anthropic’s top_k is one, so a translated request runs without it.

Endpoints

Image generation and embeddings are passthroughs to an openai or azure_openai provider. They aren’t translated and can’t be routed to an anthropic upstream. The gateway returns 503 EndpointNotRoutable when a route sends either endpoint to a provider that can’t serve it, or sends embeddings into a model-based routing rule. The error identifies the route to change. Streaming image generation, the gpt-image partial-images mode, isn’t supported: send the request without stream. Keys, usage limits, and model access apply on all four endpoints. Guardrails don’t run on embeddings, because changing input documents would change their vectors and the response contains vectors rather than text. Embedding requests and provider responses otherwise pass through unchanged, and the provider’s prompt_tokens usage is recorded as input tokens.

Limits

  • Content types beyond text are not translated. A request carrying an image or document block across formats fails rather than being silently sent without it.
  • The provider-specific tools in the OpenAI Responses API, web search, file search, and code interpreter, have no Anthropic counterpart and are not translated.
  • The azure_openai format is wire-compatible with openai, so traffic between them is never translated.
Media that isn’t translated between formats is still captured in the trace. The limit is on converting it between provider wire formats, not on recording it. Which models a key may request is separate from translation: model access rules run on the name the client asked for, before routing.