Amux AI

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 nameProtocolEndpoint
ChatOpenAI Chat CompletionsPOST /v1/chat/completions
ResponsesOpenAI ResponsesPOST /v1/responses
MessagesAnthropic MessagesPOST /v1/messages
GeminiGoogle GeminiPOST /v1beta/models/{model}:generateContent

All four protocols can be converted in either direction:

Calling protocol ↓ / upstream protocol →ChatResponsesMessagesGemini
ChatDirectConvertConvertConvert
ResponsesConvertDirectConvertConvert
MessagesConvertConvertDirectConvert
GeminiConvertConvertConvertDirect

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.

ParameterChatResponsesMessagesGemini
System promptsystem messageinstructionssystemsystemInstruction
Maximum outputmax_tokensmax_output_tokensmax_tokens (required)maxOutputTokens
temperature0–20–20–10–2
top_p✓✓✓✓
top_k——top_ktopK
Stop sequencesstop (up to 4)—stop_sequencesstopSequences (up to 5)
seed✓——✓
presence_penalty✓——✓
frequency_penalty✓——✓
Tool definitionstoolstoolstoolsfunctionDeclarations
Tool choicetool_choicetool_choicetool_choicefunctionCallingConfig
Parallel tool callsparallel_tool_callsparallel_tool_callsdisable_parallel_tool_use (inverse)—
JSON outputresponse_formattext.format—responseMimeType
Reasoning effortreasoning_effortreasoning.effortthinking, output_config.effortthinkingConfig
Reasoning summary—reasoning.summary—includeThoughts
Reasoning mode—reasoning.mode——
Reasoning context—reasoning.context——
Output verbosityverbositytext.verbosity——
End-user identifieruserusermetadata.user_id—
Image inputbase64 / URLbase64 / URLbase64 / URLbase64 / Files API URI
Prompt cachingAutomaticAutomaticcache_controlAutomatic

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

  • temperature values above 1 are capped at 1
  • When reasoning is enabled, temperature, top_p, and top_k are removed
  • For Claude Opus 4.6 and Sonnet 4.6, top_p is removed when it is sent together with temperature
  • Claude 4.6 and later models use thinking.type: adaptive, and the reasoning effort is written to output_config.effort. minimal becomes low; 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 on max_tokens, and the budget is adjusted to a valid range
  • A reasoning effort of none omits the thinking field. 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_tokens is absent, it is filled from the model limit
  • parallel_tool_calls is inverted into disable_parallel_tool_use
  • seed, 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.effort becomes reasoning_effort
  • If only a token-based reasoning budget is provided, it is converted to reasoning_effort: below 4000 becomes low, 4000 to 15999 becomes medium, and 16000 or more becomes high
  • If Messages thinking.type is disabled, reasoning_effort is omitted and the upstream default applies
  • text.verbosity becomes top-level verbosity
  • 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: none becomes thinkingBudget: 0
  • Messages thinking.type: adaptive enables returning thoughts; output_config.effort becomes thinkingLevel, with xhigh and max mapped to HIGH

To Responses

  • Stop sequences, seed, penalty fields, and top_k cannot be preserved
  • Top-level verbosity becomes text.verbosity
  • Messages output_config.effort becomes reasoning.effort
  • If only a token-based reasoning budget is provided, it is converted to reasoning.effort using 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.

ChatResponsesMessagesGemini
Contentchoices[0].message.contentoutput[]content[]candidates[0].content.parts
Assistant roleassistantassistantassistantmodel
Finish reasonfinish_reasonstatus + incomplete_detailsstop_reasonfinishReason
Tool callstool_callsoutput[].function_callcontent[].tool_useparts[].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

ChatResponsesMessagesGemini
Inputprompt_tokensinput_tokensinput_tokenspromptTokenCount
Outputcompletion_tokensoutput_tokensoutput_tokenscandidatesTokenCount
Cache readprompt_tokens_details.cached_tokensinput_tokens_details.cached_tokenscache_read_input_tokenscachedContentTokenCount
Cache write——cache_creation_input_tokens—
Reasoningcompletion_tokens_details.reasoning_tokensoutput_tokens_details.reasoning_tokensIncluded in outputthoughtsTokenCount

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_tokens includes neither
  • Gemini candidatesTokenCount excludes 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.