Skip to main content

Any-to-any formats

Keep the SDK you have, call the model you want. The LLM Gateway accepts every major conversational API format and reaches every conversational provider from it: an OpenAI Agents SDK app on Responses can call Claude on Bedrock, Claude Code on Anthropic Messages can call GPT on Azure, and a Gemini SDK app can call OpenAI, all with no code change beyond the base URL and the model name.

Your client keeps its own format end to end: requests, streams, tool calls, usage and errors all come back exactly as your SDK expects them.

Client formatGateway pathTypical clients
OpenAI Chat Completions/openai_compatible/v1/chat/completionsOpenAI SDKs, LangChain, LiteLLM, most frameworks
OpenAI Responses/openai_responses/v1/responsesOpenAI Agents SDK, Codex
Anthropic Messages/anthropic_messages/v1/messagesAnthropic SDKs, Claude Code
Gemini generateContent/vertex_ai/...Google GenAI SDK, Vertex AI SDK
Bedrock Converse/bedrock-runtime/model/{id}/converseboto3 bedrock-runtime
Bedrock InvokeModel (Claude body)/bedrock-runtime/model/{id}/invokeboto3 bedrock-runtime, Anthropic Bedrock SDK

Combine a path with your regional base URL and authenticate with your Quilr key as usual.

How the gateway reaches a provider​

After the gateway picks the provider and model (routing group, provider selector, Policy Engine route), it asks these questions in order. The first yes wins.

  1. Does the provider speak your format?Anthropic Messages to Anthropic, Responses to OpenAI
    yes:
    Native: forwarded as sentNothing is converted
  2. Does the same provider have an endpoint that speaks it?Responses to xAI, Messages to DeepSeek, Gemini to the Gemini API
    yes:
    Endpoint switchSame credential, body unchanged
  3. Is there a built-in Chat Completions adapter?Chat Completions to Bedrock Converse, Vertex Gemini or Anthropic
    yes:
    AdapterSee Chat Completions adapters
  4. Can the request be converted without losing provider-held state?Responses to Claude on Bedrock, Messages to GPT on Azure
    yes:
    Translate both waysRequest out, response back
  5. None of the above
    Error in your client's format
QuilrAI

Conversion happens only when the native path cannot serve the request. A request that worked before this release takes exactly the same path it always did.

Format explorer​

Pick what you send and where it goes, or click any cell in the matrix. Cells marked * depend on the model; pick the model family above the ladder.

Depends on the model:
  1. Does the provider speak this format natively?
    yes:
    Forward as sent
  2. Does the same provider have an endpoint that speaks it?
    yes:
    Switch endpoint
  3. Is there a built-in Chat Completions adapter for the provider?
    yes:
    Use the adapter
  4. Can the request be converted without losing provider-held state?
    yes:
    Translate both ways
    POST /openai_responses/v1/responses→Bedrock InvokeModel (Claude)

    The gateway converts the request to the provider’s format and the response back to yours.

    • Supported: Text, system prompt, history, tools and tool calls, streaming, images and inline files
    • Supported: Billed on the provider’s own token usage
    • Supported: Prompt-cache breakpoints are added automatically
    • Parameters without an equivalent are dropped. See “Parameters when converting” on this page.
    • Hosted tools and provider-only settings are dropped and the request still runs; stored state and provider file ids return an error. See “Limits and coming soon” on this page.
  5. None of the above
    Error in your client’s format
QuilrAI
NativeEndpoint switchAdapterTranslateNot supportedComing soondepends on the model
Provider you sendChat CompletionsResponsesAnthropic MessagesGemini generateContentBedrock ConverseBedrock InvokeModel
OpenAI and Azure OpenAI
OpenAI
OpenAI (Responses type)
Azure OpenAI
Azure OpenAI (Responses type)
Anthropic
Anthropic
Anthropic (OpenAI-compatible)
Anthropic on Azure AI Foundry
Anthropic on AWS Bedrock
Google
Google Gemini API
Google Vertex AI
AWS
AWS Bedrock
More providers
xAI
xAI (Responses type)
Mistral
DeepSeek
Oracle OCI (Chat)
Oracle OCI (Responses)
Sarvam
Custom OpenAI-compatible

Format support by provider

Select a cell to return to its format and provider details.

Native first: why it matters​

When the provider already speaks your format, the gateway forwards your request as sent and returns the provider's response as received. Nothing is rewritten, so:

  • Every provider feature works, including ones the gateway does not know about yet: new parameters, beta headers, stored conversations, hosted tools.
  • Prompt caching is untouched. The bytes the provider caches are the bytes you sent.
  • Nothing is lost in a round trip, and there is no conversion latency.

Guardrails, logging, quotas and routing still run on native requests, as they always have.

Endpoint switch: same provider, the right endpoint​

Many providers expose more than one API with the same credential. When your format is not the provider's main one but the provider has an endpoint that speaks it, the gateway sends your request there unchanged. Only the URL and envelope change.

You sendProviderSent to
ResponsesxAIxAI /v1/responses
Chat CompletionsxAI (Responses type)xAI /v1/chat/completions
Anthropic MessagesDeepSeekDeepSeek's Anthropic-compatible endpoint
Gemini generateContentGoogle Gemini APIGemini API generateContent, same API key
Chat CompletionsAzure OpenAI with a /openai/v1 base URLAzure OpenAI v1 Chat Completions
Chat CompletionsVertex AI, Model Garden open modelsVertex AI OpenAI-compatible chat
Bedrock InvokeModel (Claude body)Anthropic, Azure AI Foundry Anthropic, DeepSeekTheir Messages endpoint; only the Bedrock envelope changes
ResponsesAWS Bedrock, OpenAI models (gpt-oss)Bedrock Mantle Responses, when the Runtime endpoint does not serve the model
Anthropic Messages, Bedrock InvokeModel (Claude body)xAI, Custom OpenAI-compatibleThe provider's /v1/messages endpoint, only when the provider settings list Anthropic Messages (opt-in); otherwise translated to Chat Completions

An OpenAI or Azure OpenAI key also serves Responses requests directly, and a Responses-type key serves Chat Completions, so you no longer need a separate provider for each OpenAI API. The body is not converted, so every parameter you send reaches the provider; Parameters when converting does not apply.

What is kept when converting​

This applies to every client format and provider on an adapter or translated pair. Parameter mapping is in Parameters when converting, and what comes back in Responses you get back.

AreaBehaviour on adapter and translated pairs
Text, system prompts and historyKept, including multi-turn conversations.
ToolsFunction and custom tools, tool choice and full tool loops, including parallel tool results.
StreamingRe-framed into your client's stream format (SSE events or the Bedrock event stream).
Images and inline filesCarried and fitted to the provider's format on translated pairs. The Vertex AI and Anthropic Chat Completions adapters are text only; see Limits.
Prompt cachingYour cache markers are carried where the provider supports them (see Parameters). Responses and Gemini clients, which cannot send markers, get cache breakpoints added automatically on Claude.
GuardrailsRequest-side checks (DLP, redaction, OCR, token saving, Guardian) run on your request in your format, before conversion. Response-side checks run on the converted-back response or stream, the same way they run on a native request in your format.

Parameters when converting​

When a request is translated, each parameter is mapped to the target API's field, or dropped when the target has no equivalent. A dropped parameter is removed and the request still runs. Columns are the API the request is sent to (the explorer's wire line shows it for each pair):

  • Chat Completions targets: OpenAI, Azure OpenAI, Gemini API, xAI, Mistral, DeepSeek, custom OpenAI-compatible, Bedrock OpenAI models, Vertex AI Model Garden.
  • Responses targets: OpenAI and Azure OpenAI Responses-type keys and Responses-only models, xAI Responses.
  • Anthropic targets: Anthropic, Azure AI Foundry Anthropic, Claude on Bedrock InvokeModel.
  • Gemini targets: Gemini models on Vertex AI.
  • Converse targets: non-Claude models on AWS Bedrock (such as Nova).
ParameterChat CompletionsResponsesAnthropicGeminiConverse
Max output tokensmax_completion_tokensmax_output_tokensmax_tokens (4096 when not set)maxOutputTokensmaxTokens
temperatureMappedMappedCapped at 1 (a)MappedCapped at 1
top_pMappedMappedMapped (a)MappedMapped
top_kDroppedDroppedMapped (a)MappedClaude models only
Stop sequencesMapped (b)DroppedMappedMappedMapped
Frequency and presence penalty, seedMapped (b)DroppedDroppedMappedDropped
logit_biasMapped (b)DroppedDroppedDroppedDropped
logprobsMappedtop_logprobs onlyDroppedDroppedDropped
n above 1MappedDroppedDroppedcandidateCountDropped
Tools and tool choiceMappedMappedMappedMappedMapped; a forced tool choice is dropped on models that accept only automatic
Parallel tool calls switchMappedMappeddisable_parallel_tool_useDroppedDropped
JSON schema outputMappedtext.formatStructured outputsresponseJsonSchemaoutputConfig
JSON mode (json_object)MappedMappedDroppedapplication/jsonDropped
Reasoning effort or thinkingreasoning_effort (b)reasoning.effort; a token budget is droppedthinking (adaptive or budget) and effortThinking configClaude models only
End-user id (user, metadata.user_id)user (not on Mistral)usermetadata.user_id (not on Bedrock)DroppedDropped
Prompt-cache breakpointsNot sent; prompt_cache_key is mappedNot sent; prompt_cache_key is mappedUp to 4 breakpointsNot sentUp to 4 cachePoint blocks
Bedrock Converse options (additionalModelRequestFields, performanceConfig ...)DroppedDroppedDroppedDroppedMapped
Other fields (metadata, store, service_tier, ...)DroppedDroppedDroppedDroppedDropped

Effort values are moved to the nearest value the target accepts. Streams sent to a Chat Completions target always ask for usage, so billing has it; a Chat Completions client gets the usage chunk only when it sets stream_options.include_usage. A Converse guardrailConfig sent to a non-Bedrock provider is dropped and the request still runs; QuilrAI guardrails on the app still apply (see Limits).

Per-model rules, applied only to translated requests:

  • (a) Claude: combinations a Claude model rejects are dropped: temperature with top_p (top_p dropped), temperature other than 1 or top_k with thinking, and temperature, top_p and top_k on models that deprecate them.
  • (b) OpenAI reasoning models: sampling parameters, penalties and logprobs are dropped (unless reasoning is off), stop and logit_bias are dropped on Chat Completions, and the effort is fitted to what the model accepts.
  • (b) xAI: logit_bias is dropped on every model; reasoning models drop penalties and stop. Efforts: grok-4.3 takes none to xhigh, grok-4.5 and later minimal to xhigh, grok-4.20 and grok-build none.
  • Mistral: seed is sent as random_seed; user, logit_bias, store, verbosity and safety_identifier are dropped; developer messages become system; tool call ids are rewritten to Mistral's 9-character format; inline PDF parts are sent as Mistral documents. Codestral, Ministral and Voxtral models drop reasoning effort and logprobs.

Chat Completions adapters​

The adapter step takes a Chat Completions request on /openai_compatible/v1/chat/completions straight to a provider's own chat API, without the translator:

Provider typeModelsUpstream callImages and files
bedrockModels Bedrock serves through Converse (such as Nova)Bedrock Converse / ConverseStreamEmbedded (data URL) images and documents
vertex_aiGemini modelsVertex AI generateContent / streamGenerateContentText only
anthropic_messages, anthropic_messages_azureClaude modelsAnthropic Messages (direct or Azure AI Foundry)Text only
anthropic_messages_bedrockClaude modelsBedrock InvokeModel with the Claude Messages bodyText only

On bedrock, a model that supports Bedrock's own OpenAI-compatible Chat Completions is called there natively; the Converse adapter serves the rest, application inference profiles, and requests that carry Converse options. Send the provider's own model name as model.

Where the adapters differ from the table above:

  • Unknown parameters are rejected, not dropped. The adapters accept max_tokens / max_completion_tokens, temperature, top_p, stop, tools, tool_choice, functions, parallel_tool_calls, response_format, stream_options, metadata, user and n of 1. Vertex AI also accepts penalties and seed; Bedrock also accepts Converse options (such as guardrailConfig and additionalModelRequestFields), top level or in extra_body. Anything else, including reasoning_effort, logprobs and logit_bias, returns unsupported_<provider>_openai_parameter (<provider> is bedrock, vertex or anthropic).
  • response_format: Bedrock takes json_schema only, Vertex AI takes json_object and json_schema (the schema is reduced to what Gemini accepts), Anthropic takes text only.
  • parallel_tool_calls: false is accepted but not enforced. user is sent as metadata.user_id on Anthropic only.
  • Tool calls need an id on every assistant.tool_calls entry for Bedrock and Anthropic.
  • Cache markers (cache_control) become Converse cachePoint blocks on Bedrock and stay cache_control on Anthropic.
  • Bedrock reasoning comes back as message.reasoning_content, and the original Converse content as message.bedrock_content when it holds reasoning or citations, so the next turn can send it back.
  • Validation errors use the codes unsupported_<provider>_openai_parameter, invalid_<provider>_openai_parameter, unsupported_<provider>_openai_content, invalid_<provider>_openai_messages and invalid_<provider>_openai_tools.

Responses you get back​

On every adapter and translated pair, the response is rebuilt in your client's format, streamed or not:

AreaWhat you get
IdsYour format's usual id shape (chatcmpl-, msg_). Responses ids are minted by the gateway and start with resp_qtx_; they cannot be retrieved or chained (see Limits).
Usage and billingToken usage in your format's usage fields. Cost is always computed from the provider's own usage, never from the converted body.
Finish reasonMapped to your format's equivalent; see the table below.
StreamingRe-framed as your format's stream: Chat Completions chunks ending in [DONE], Anthropic and Responses SSE events, Gemini chunks, or Bedrock event-stream frames.
ReasoningReturned in your format's reasoning field: Chat Completions reasoning_content, Responses reasoning items, Anthropic thinking blocks, Gemini thought parts, Converse reasoningContent.
ErrorsIn your client's format with the provider's status code: a 429 stays a 429 with its retry headers. A stream that fails midway ends with your format's error event, never a fake success. Shapes and codes are in Limits.
OutcomeChat CompletionsResponses statusAnthropic stop_reasonGemini finishReasonConverse stopReason
Finishedstopcompletedend_turnSTOPend_turn
Output token limitlengthincomplete (max_output_tokens)max_tokensMAX_TOKENSmax_tokens
Tool calltool_callscompletedtool_useSTOPtool_use
Blocked by the provider's safety filtercontent_filterincomplete (content_filter)refusalSAFETYcontent_filtered

Limits and coming soon​

Some features live inside one provider, such as a stored conversation or a hosted tool the provider runs. They work on native pairs. When converting, settings and tools the target cannot carry are dropped and the request still runs: the model answers without that tool or setting, and nothing else changes in the response you get back. State the conversation depends on, such as a stored conversation or a provider file, returns an error instead. This is the single list for every format; the explorer's cell notes point here.

FeatureWhen convertingError code
Responses stored state: previous_response_id, conversation, stored prompt, item references, compaction itemsNot supported. Works on native Responses pairs only.translation_unsupported_state or state_not_portable
Responses background: trueDropped, request still runs. The request runs synchronously and the completed response is returned.None
Retrieve, cancel, delete or list input items of a converted response (ids starting resp_qtx_)Not supported. Converted responses are not stored.response_not_found (404)
Hosted and server tool definitions: Responses web_search, file_search, code_interpreter, computer use, MCP, image generation, shell; Chat web_search_options; Anthropic server tools (web search, web fetch, code execution, MCP toolset, tool search); Gemini built-in tools (Google Search, code execution, URL context, file search, Maps)Dropped, request still runs. The model answers without the hosted tool; your function tools are kept. A tool_choice that forces a dropped tool becomes auto.None
Hosted-tool history: earlier hosted tool calls and their results in the conversationDropped, request still runs. The call and result structures are removed; their readable text output (such as MCP results or code output) is kept in the conversation as plain text.None
Anthropic container and mcp_servers to providers outside the Anthropic familyDropped, request still runs.None
Bedrock Converse guardrailConfig on non-Bedrock providersDropped, request still runs. QuilrAI guardrails on the app still apply.None
Anthropic-schema client tools (bash, text_editor, computer, memory) on non-Anthropic providersNot supported. These tools use a schema only Claude understands.translation_unsupported_state
Provider file ids (OpenAI file_id, Anthropic Files API, Gemini Files URIs)Not supported. The file lives in one provider account.state_not_portable
Gemini cachedContent on non-Google providersComing soon. Today returns an error.translation_unsupported_state
Bedrock InvokeModel with a Nova, Llama or Cohere body to a non-Bedrock providerComing soon. Works on Bedrock providers today.Error in Bedrock format
Office and scanned files (docx, xlsx, scanned PDF) to providers that cannot read themComing soon. Today the file is dropped with a warning.None
Anthropic document citations, redacted_thinking, Responses encrypted reasoning, Converse response image or document blocks, Chat verbosityDropped on cross-format pairs.None
Claude on Vertex AI, from any client formatComing soon. Gemini and Model Garden models on Vertex AI work today.-
Claude models served only through Bedrock Mantle (such as Claude Mythos)Coming soon. Other Claude models on Bedrock work today.-
Oracle OCI from other formatsComing soon. Native OCI Chat Completions and Responses work today.-
Sarvam from other formatsComing soon. Native Sarvam Chat Completions work today.-
Images and files on the Vertex AI and Anthropic Chat Completions adapters (Chat Completions to Gemini on vertex_ai or Claude on anthropic_messages*)Not supported. These adapters are text only; send images from another client format or use a native route. The Bedrock Converse adapter carries embedded images and documents.unsupported_<provider>_openai_content
Embeddings, rerank, audio, images, moderations, Realtime and AssistantsNever converted. These APIs are not conversational; call them on their own endpoints.provider_not_conversational

Other errors you may see on a converted pair:

Error codeMeaning
upstream_api_unsupportedNo endpoint of the selected provider can serve this request.
translation_unconvertible_requestThe request has a field or value that cannot be expressed in the provider's format.
translation_response_failed (502)The provider answered, but its response could not be converted back.

Error bodies follow your client's format:

Client formatError shape
Chat Completions, Responses{"error": {"message", "type": "invalid_request_error", "code"}}
Anthropic Messages{"type": "error", "error": {"type": "invalid_request_error", "message"}}
Gemini{"error": {"code": 400, "message", "status": "INVALID_ARGUMENT"}}
Bedrock{"message"} with header x-amzn-ErrorType: ValidationException

How to tell which path ran​

  • x-quilr-served-model on every response names the model that served it, and x-quilr-route the Policy Engine route (or default).
  • Converted Responses ids start with resp_qtx_. Native Responses ids keep the provider's own format.
  • count_tokens on Anthropic Messages returns the header x-quilr-token-count-source: estimate when the model sits behind a converted path and the count is a local estimate.
  • Error codes from the tables above name the reason a pair was refused.

Routing across formats​

Conversion happens after the gateway picks a provider, so it works with every routing feature:

  • Routing groups can mix API families. A Responses group can hold Claude on Bedrock next to GPT on Azure. The group needs at least one member of its own family; while any own-family member is usable, only those members take traffic, and the others are reached by conversion when they are not. See Routing and fallbacks.
  • Policy Engine Route to and content routes use a newly reachable target only when no target of the request's own family is available. If no target can serve the request, normal routing applies. See Route to.
  • A request that worked before keeps its target. Any-to-any never moves working traffic; it only adds targets that were unreachable before.
  • Conversation pinning keeps a conversation on its first provider, whatever the format.
  • Bedrock clients (Converse, InvokeModel) reach a non-Bedrock provider when a routing group picks it (Converse only), when you select it with X-Provider-Name / X-Provider-Label, or when it is the only provider on the app with the model. Bedrock credentials always get the signed request unchanged.

Examples​

OpenAI Agents SDK or Codex (Responses) to Claude on Bedrock​

App provider: Anthropic on AWS Bedrock (anthropic_messages_bedrock) with a Claude model enabled.

from openai import OpenAI

client = OpenAI(
base_url="https://guardrails-usa-2.quilr.ai/openai_responses/v1",
api_key="sk-quilr-xxx",
)

response = client.responses.create(
model="us.anthropic.claude-sonnet-4-5-20250929-v1:0",
instructions="You are a concise assistant.",
input="Summarize the release in two sentences.",
)
print(response.output_text)

Tools, streaming and multi-turn input work. Keep the conversation in input rather than previous_response_id, since the conversation is not stored on Bedrock. Hosted tools such as Codex's web search are dropped on this pair, so the model answers without them.

Claude Code (Anthropic Messages) to GPT on Azure OpenAI​

App provider: Azure OpenAI with a GPT deployment enabled. Point Claude Code at the gateway and name the deployment as the model:

export ANTHROPIC_BASE_URL="https://guardrails-usa-2.quilr.ai/anthropic_messages"
export ANTHROPIC_API_KEY="sk-quilr-xxx"
export ANTHROPIC_MODEL="gpt-4.1"
claude

Claude Code's tool loop and streaming come back in Anthropic format. Anthropic server tools such as web search are dropped on this pair, so the model answers without them (see Limits).

Google GenAI SDK (Gemini) to OpenAI​

App provider: OpenAI with gpt-4.1-mini enabled. Configure the Gemini client as in the integration guide, then send the OpenAI model name:

response = client.models.generate_content(
model="gpt-4.1-mini",
contents="Write a haiku about gateways.",
)
print(response.text)

boto3 Converse to Mistral​

App provider: Mistral with ministral-8b-latest enabled, as the only provider on the app with that model.

import boto3

bedrock = boto3.client(
"bedrock-runtime",
endpoint_url="https://guardrails-usa-2.quilr.ai/bedrock-runtime",
aws_access_key_id="sk-quilr-xxx",
aws_secret_access_key="sk-quilr-xxx",
region_name="us-east-1",
)

response = bedrock.converse(
modelId="ministral-8b-latest",
messages=[{"role": "user", "content": [{"text": "Hello!"}]}],
)
print(response["output"]["message"]["content"][0]["text"])