Text protocol conversion
Last updated November 9, 2026
Compatibility and parameter differences between OpenAI Chat, Responses, Anthropic Messages, and Gemini.
Amux AI converts requests among four text-generation protocols. You can keep using your existing SDK while the gateway converts the request to a protocol supported by the model provider and returns the response in the protocol you called.
This page covers text protocols only. OpenAI Images and Amux Tasks are not part of this conversion layer.
Supported protocols
| Short name | Protocol | Endpoint |
|---|---|---|
| Chat | OpenAI Chat Completions | POST /v1/chat/completions |
| Responses | OpenAI Responses | POST /v1/responses |
| Messages | Anthropic Messages | POST /v1/messages |
| Gemini | Google Gemini | POST /v1beta/models/{model}:generateContent |
All four protocols can be converted in either direction:
| Calling protocol ↓ / upstream protocol → | Chat | Responses | Messages | Gemini |
|---|---|---|---|---|
| Chat | Direct | Convert | Convert | Convert |
| Responses | Convert | Direct | Convert | Convert |
| Messages | Convert | Convert | Direct | Convert |
| Gemini | Convert | Convert | Convert | Direct |
The gateway prefers an upstream protocol matching the protocol you called and converts only when a direct route is unavailable. Some provider channels enable only some upstream protocols; if the calling protocol is not enabled, the request is converted to an enabled one. Direct requests do not undergo schema conversion, but model routing, required parameter filtering, and response normalization still apply.
Conversion support does not mean every model exposes every calling protocol. See the model page for its available entry points. Unsupported combinations return an error rather than silently using a different endpoint.
Request parameters
“—” means that the target protocol has no direct equivalent and cannot preserve the field during cross-protocol conversion.
| Parameter | Chat | Responses | Messages | Gemini |
|---|---|---|---|---|
| System prompt | system message | instructions | system | systemInstruction |
| Maximum output | max_tokens | max_output_tokens | max_tokens (required) | maxOutputTokens |
temperature | 0–2 | 0–2 | 0–1 | 0–2 |
top_p | ✓ | ✓ | ✓ | ✓ |
top_k | — | — | top_k | topK |
| Stop sequences | stop (up to 4) | — | stop_sequences | stopSequences (up to 5) |
seed | ✓ | — | — | ✓ |
presence_penalty | ✓ | — | — | ✓ |
frequency_penalty | ✓ | — | — | ✓ |
| Tool definitions | tools | tools | tools | functionDeclarations |
| Tool choice | tool_choice | tool_choice | tool_choice | functionCallingConfig |
| Parallel tool calls | parallel_tool_calls | parallel_tool_calls | disable_parallel_tool_use (inverse) | — |
| JSON output | response_format | text.format | — | responseMimeType |
| Reasoning effort | reasoning_effort | reasoning.effort | thinking, output_config.effort | thinkingConfig |
| Reasoning summary | — | reasoning.summary | — | includeThoughts |
| Reasoning mode | — | reasoning.mode | — | — |
| Reasoning context | — | reasoning.context | — | — |
| Output verbosity | verbosity | text.verbosity | — | — |
| End-user identifier | user | user | metadata.user_id | — |
| Image input | base64 / URL | base64 / URL | base64 / URL | base64 / Files API URI |
| Prompt caching | Automatic | Automatic | cache_control | Automatic |
Valid reasoning values depend on the model. Amux AI converts these fields where the target protocol can express them, but does not prevalidate whether a model accepts a particular value. The upstream returns an error for unsupported values. When converting to Messages, Amux AI builds the reasoning configuration according to the Claude model generation; see To Messages.
The following fields have no stable cross-protocol equivalent and are generally preserved only on direct routes: logprobs, top_logprobs, n, candidateCount, logit_bias, safety_identifier, prompt_cache_options, prompt_cache_retention, max_tool_calls, prediction, moderation, and protocol-native web search tools.
Claude Opus 4.7, Opus 4.8, Opus 5, Opus 5.5, Sonnet 5, Sonnet 5.5, Haiku 5.5, Fable 5, and Fable 5.1 do not accept sampling parameters. temperature, top_p, and top_k are filtered for these models, including on direct routes.
service_tier, serviceTier, and Anthropic inference_geo are filtered even on direct routes. Do not rely on them to select a billing tier or inference region. To constrain the region, select a provider channel that meets the requirement.
Parameters explicitly filtered by the platform are reported in amux.droppedParams for non-streaming responses or the x-amux-dropped-params response header for streaming responses. Fields that cannot be represented by the target protocol do not necessarily appear in that list; use the compatibility rules on this page as the reference.
Conversion differences
To Messages
temperaturevalues above 1 are capped at 1- When reasoning is enabled,
temperature,top_p, andtop_kare removed - For Claude Opus 4.6 and Sonnet 4.6,
top_pis removed when it is sent together withtemperature - Claude 4.6 and later models use
thinking.type: adaptive, and the reasoning effort is written tooutput_config.effort.minimalbecomeslow; a level the model does not support is lowered to the nearest supported level; if only a reasoning budget is provided, it is converted to an effort level using the same rules as To Chat - Claude 4.5 and earlier models use
thinking.budget_tokens; the reasoning effort is converted into a budget based onmax_tokens, and the budget is adjusted to a valid range - A reasoning effort of
noneomits thethinkingfield. Claude Opus 5.5, Fable 5, and Fable 5.1 always use reasoning - For Claude 4.5 and earlier models, reasoning is disabled for a request in a tool-use loop when the previous assistant message has no signed thinking block. Chat and Responses cannot return thinking block signatures
- If
max_tokensis absent, it is filled from the model limit parallel_tool_callsis inverted intodisable_parallel_tool_useseed, penalty fields, JSON output, output verbosity, and Responses-only reasoning options cannot be preserved- Audio, video, and file content cannot be converted and cause the request to fail; images are supported
- If the request contains no
cache_control, some provider channels add cache breakpoints at the end of the system prompt and the last two conversation turns. Cached input is billed at the cache read rate, and newly cached input at the cache write rate
To Chat
- Stop sequences beyond the first four are truncated
top_k, reasoning signatures, and cache breakpoints cannot be preserved- Messages
output_config.effortbecomesreasoning_effort - If only a token-based reasoning budget is provided, it is converted to
reasoning_effort: below 4000 becomeslow, 4000 to 15999 becomesmedium, and 16000 or more becomeshigh - If Messages
thinking.typeisdisabled,reasoning_effortis omitted and the upstream default applies text.verbositybecomes top-levelverbosity- Responses-only reasoning summary, mode, and context cannot be preserved
To Gemini
- Stop sequences beyond the first five are truncated
- Media supplied as public URLs cannot be preserved; use base64 or a Gemini Files API URI
- Parallel tool calls, end-user identifiers, and output verbosity cannot be preserved
- Reasoning summaries retain only whether thoughts should be returned; summary detail, reasoning mode, and context cannot be preserved
reasoning.effort: nonebecomesthinkingBudget: 0- Messages
thinking.type: adaptiveenables returning thoughts;output_config.effortbecomesthinkingLevel, withxhighandmaxmapped toHIGH
To Responses
- Stop sequences,
seed, penalty fields, andtop_kcannot be preserved - Top-level
verbositybecomestext.verbosity - Messages
output_config.effortbecomesreasoning.effort - If only a token-based reasoning budget is provided, it is converted to
reasoning.effortusing the same rules as Chat
Message structure
To satisfy the target protocol, cross-protocol conversion may:
- Merge consecutive messages with the same role
- Remove tool results with no matching call, or assistant messages containing calls with no result
- Insert placeholders for empty content
- Limit Anthropic cache breakpoints to four
These normalizations aim to preserve intent, but incomplete tool-call structures and similar cases can affect model behavior. Anthropic document (PDF) content blocks are not converted across protocols.
Response fields
Responses use the protocol you called, and the model field contains the Amux AI model ID.
| Chat | Responses | Messages | Gemini | |
|---|---|---|---|---|
| Content | choices[0].message.content | output[] | content[] | candidates[0].content.parts |
| Assistant role | assistant | assistant | assistant | model |
| Finish reason | finish_reason | status + incomplete_details | stop_reason | finishReason |
| Tool calls | tool_calls | output[].function_call | content[].tool_use | parts[].functionCall |
Gemini and Responses do not have a distinct “finished because of tool calls” value. Amux AI maps it based on whether the response contains tool calls.
Usage fields
| Chat | Responses | Messages | Gemini | |
|---|---|---|---|---|
| Input | prompt_tokens | input_tokens | input_tokens | promptTokenCount |
| Output | completion_tokens | output_tokens | output_tokens | candidatesTokenCount |
| Cache read | prompt_tokens_details.cached_tokens | input_tokens_details.cached_tokens | cache_read_input_tokens | cachedContentTokenCount |
| Cache write | — | — | cache_creation_input_tokens | — |
| Reasoning | completion_tokens_details.reasoning_tokens | output_tokens_details.reasoning_tokens | Included in output | thoughtsTokenCount |
Conversion normalizes these accounting differences:
- Chat and Responses input tokens include cache reads and cache writes, Gemini input tokens include cache reads, and Messages
input_tokensincludes neither - Gemini
candidatesTokenCountexcludes thought tokens; output tokens in the other three protocols include them
Streaming responses
All four protocols support streaming. During cross-protocol conversion, Amux AI regenerates the event sequence in the calling protocol and completes the required end markers and content-block boundaries.
Usage already incurred is still billed if the client disconnects before the stream completes.