Create a model response

Compatible with OpenAI Responses, for inference on conversational models. The official SDK works as-is.

post/v1/responses

Request

  • Base URL: https://gateway.amux.ai
  • URL: https://gateway.amux.ai/v1/responses
  • Auth: HTTP bearer

Headers

Content-Typestring required

Always application/json.

Request body

modelstring required

Canonical ID shaped like vendor/model. The colon suffix pins a provider (:provider) or chooses a routing strategy (:@price and friends); the two cannot be combined. See the overview.

backgroundboolean

Whether the upstream should run the response in the background. The gateway does not add its own semantics here: same-protocol direct routes usually pass it through, while cross-protocol routes do not preserve it by default.

context_managementobject[]

Context management configuration. The gateway does not add its own semantics here: same-protocol direct routes usually pass it through, while cross-protocol routes do not preserve it by default.

instructionsstring

Top-level system prompt. Not an entry in input — putting it there makes it part of the conversation instead.

max_output_tokensinteger

Maximum tokens to generate. Note the field name differs from Chat's max_tokens.

temperaturenumber

Sampling temperature, 0–2.

top_pnumber

Nucleus sampling.

streamboolean

Return an SSE stream. Responses events are named (response.output_text.delta and friends) rather than a series of uniform chunks.

toolsobject[]

Callable tools. The shape is flat — { type: "function", name, description, parameters } — not nested under function the way Chat does it.

tool_choicestring

auto / none / required, or { type: "function", name }.

parallel_tool_callsboolean

Whether the model may issue several tool calls at once. Only sent when tools is present.

includestring[]

Extra fields to include in the response, passed through to the upstream.

previous_response_idstring

Not supported. This gateway is stateless and consecutive requests may reach different upstreams. Send the full context in input instead of relying on an upstream-side previous response ID.

promptobject

Prompt template reference and variables. The gateway does not add its own semantics here: same-protocol direct routes usually pass it through, while cross-protocol routes do not preserve it by default.

truncation'auto' | 'disabled'

Truncation strategy when the context overflows; passed through.

metadataobject

Free-form key/value pairs passed through.

storeboolean

Whether the upstream should retain this response.

userstring

End-user identifier. Also drives session affinity — see the same parameter on the Chat page.

prompt_cache_keystring

Session key, taking precedence over user. Requests sharing a value are routed to the same provider.

service_tier'auto' | 'default' | 'flex' | 'scale' | 'priority' | 'fast' | 'ultrafast'

Service tier. Not supported — we forward it to no upstream, on either path. Sending it is not an error. What was stripped is reported back: amux.droppedParams in the body, or the x-amux-dropped-params header when streaming.

top_logprobsinteger

How many candidate probabilities to return per position, 0-20. Passed through unchanged, not carried across protocols by default.

max_tool_callsinteger

Upper bound on tool calls in this response. Passed through unchanged, not carried across protocols — the other three have no equivalent.

safety_identifierstring

End-user identifier; OpenAI uses it in place of user for abuse detection. Passed through unchanged, not carried across protocols by default. It takes no part in session affinity — use prompt_cache_key to keep one conversation on one provider.

prompt_cache_retention'in_memory' | '24h'

How long prompt cache entries survive. Models before gpt-5.6 use this; 5.6 and later use prompt_cache_options. Passed through unchanged, no effect on pricing, not carried across protocols by default.

moderationobject

Moderation configuration, { model, policy }. Passed through unchanged, not carried across protocols by default.

Example request

{
  "model": "openai/gpt-5.6",
  "input": "Hello!"
}

Response

Inference succeeded. model is the canonical ID — the same value you sent.

idstring

The ID of this response.

objectstring

Object type; always response.

modelstring

The Amux model ID — the same value you sent.

statusstring

Response status, e.g. completed, incomplete.

Example response

{
  "id": "resp_8f3c1a",
  "object": "response",
  "model": "openai/gpt-5.6",
  "status": "completed",
  "output": [
    {
      "type": "message",
      "role": "assistant"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.