Text protocol conversion
Last updated September 1, 2026
Compatibility and parameter differences between OpenAI Chat, Responses, Anthropic Messages, and Gemini.
Amux 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. 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.budget_tokens | 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 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.
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.
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 - If
max_tokensis absent, it is filled from the model limit; reasoning budgets are adjusted to a valid range 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
To Chat
- Stop sequences beyond the first four are truncated
top_k, token-based reasoning budgets, reasoning signatures, and cache breakpoints cannot be preservedtext.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
To Responses
- Stop sequences,
seed, penalty fields, andtop_kcannot be preserved - Top-level
verbositybecomestext.verbosity - A token-based reasoning budget cannot be converted into an effort level
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 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 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 |
| Reasoning | completion_tokens_details.reasoning_tokens | output_tokens_details.reasoning_tokens | Included in output | thoughtsTokenCount |
Conversion normalizes these accounting differences:
- Chat, Responses, and Gemini input tokens include cache reads; Messages
input_tokensdoes not - 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 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.