Quotaflow
llms.txtOpenAPIDashboard
OpenAI-compatible

Responses API

When to use this page

Use this page for Codex-style agent calls, tool-capable workloads, and modern OpenAI-compatible clients that natively send Responses-shaped requests. Keys enabled for Claude-compatible models can also use Claude model ids on this OpenAI-compatible endpoint while receiving Responses-shaped output. Gemini text model ids are accepted here too, with or without the google/ prefix — see the stateless note below. GLM, Kimi, DeepSeek and MiMo also support this public endpoint with Responses-shaped output, without substituting another model. Their Responses integration is stateless: send the full input each time; do not use previous_response_id, conversation, prompt, background, or store: true. See the Model Library for family-specific examples and output caps.

Grok on this endpoint

The Grok catalog includes grok-4.20-0309-non-reasoning, grok-4-1-fast-non-reasoning, and grok-4.7, with matching x-ai/ aliases. Grok uses /responses, not /chat/completions. Send the full conversation in input; this line does not provide a stored-response continuation service. Check your key's model discovery response for current availability; catalog membership is not a guarantee of live supply.

grok-4-1-fast-non-reasoning is a legacy compatibility name: xAI redirects it to Grok 4.3 with no reasoning. Its official price basis is the current Grok 4.3 rate, not the retired 4.1 Fast rate.

Gemini on this endpoint

Gemini text ids (gemini-3.8-flash, gemini-3.7-flash, gemini-3.1-pro-preview, and the other ids your discovery endpoint returns) are accepted on /responses as well as on /chat/completions. This endpoint is stateless for them: send the whole turn in input on every request, and store: true, previous_response_id, conversation, prompt and background return 400 invalid_request_error, because Quotaflow keeps no response store to read them back from. Reasoning items you received on a previous turn should be replayed unchanged — Quotaflow passes a Gemini transcript's reasoning state back to the upstream untouched.

Gemini fields and output. Instructions, text input, function calls and tool results map to a request for the same Gemini model; the response keeps the Responses object/event shape. Use only shapes enabled for that model and surface. Preserve returned reasoning items and encrypted content unchanged rather than editing them as text. See the Gemini text quickstart for complete examples.

If your client sends Chat Completions messages and tools, use /chat/completions instead. Quotaflow keeps Chat Completions and Responses as separate protocol surfaces so fallback and streaming parsers stay consistent.

Muse

Muse Wonder and Spark use this endpoint for keys with Muse access. See the Muse API quickstart for model discovery, copyable requests, output budgets, and protocol-specific limits.

Model-specific guides

GPT | Gemini text | GLM | Kimi | DeepSeek | MiMo | Muse | Grok

Endpoint

POST https://api.quotaflow.ai/openai/v1/responses

Required output bound

max_output_tokens is required on every /responses request. It bounds generated output tokens including reasoning tokens, and it is the value the request is priced against before a vendor is selected. A request without it is rejected with 400 invalid_request_error. Quotaflow does not substitute a vendor default, because an invented bound would reserve against a price the request never declared.

Chat Completions bounds are not interchangeable here. max_completion_tokens and max_tokens are not part of the Responses request contract and are rejected on this surface; use max_completion_tokens on /chat/completions instead.

Refused request shapes

For GPT/Codex models, the following are refused at admission with 400 invalid_request_error rather than routed, because none of them carries a bounded price before the upstream call:

Client-executed tools are unaffected. function, custom, and local_shell remain accepted, including the gpt-5.6 tool support described below.

Minimal request

{
  "model": "gpt-5.5",
  "input": "Write a concise deployment checklist.",
  "stream": false,
  "max_output_tokens": 512
}

Streaming request

{
  "model": "gpt-5.5",
  "input": "Explain this repository structure.",
  "stream": true,
  "max_output_tokens": 1024
}

Fast mode routing

Send the optional X-QuotaFlow-Routing: fast header to start a new conversation on the capacity predicted to give the first answer soonest, choosing the most economical option among those within 15 % of the fastest. It changes routing order only: the model, every request parameter, the response and the price are unchanged, the header is never forwarded upstream, later turns of a conversation stay where their prompt cache is, and any other value is ignored. See Fast mode routing.

Curl example

curl https://api.quotaflow.ai/openai/v1/responses \
  -H "Authorization: Bearer $QUOTAFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "x-session-id: repo-agent-123" \
  -d '{
    "model": "gpt-5.5",
    "input": "Summarize the change in one paragraph.",
    "stream": false,
    "max_output_tokens": 512
  }'

Codex-style agents

If enabled for your API key, Quotaflow accepts tool-capable Codex-style requests while preserving the OpenAI-compatible request shape.

For Claude-compatible claude-sonnet-5, claude-opus-4-8, and claude-opus-4-7, omit non-default temperature, top_p, and top_k from Responses requests. Those adaptive-only Claude models use adaptive behavior instead of explicit sampling controls. Quotaflow strips the fields where possible; use reasoning.effort when your client needs a depth hint.

Do not send Claude-style or Gemini-style top-level thinking to the OpenAI-compatible Responses endpoint. For GPT/Codex Responses requests, use reasoning.effort when the selected model supports reasoning controls. Unsupported parameter families return a clear 400 invalid_request_error and are not retried on another execution path, because they are request contract errors rather than service availability errors.

GPT-5.6 tools

gpt-5.6 supports function and custom tools on /responses, including streamed tool calls, strict function schemas, and agent-sized tool sets. Quotaflow routes each request only to supply with matching provider-scoped evidence; if no verified candidate remains, the request fails closed instead of silently dropping tools or switching models. Tool use, reasoning summaries, and encrypted reasoning items are separate capabilities and are not inferred from one another.

Stateless GPT text and function calls

Text is streamed incrementally. Function-call items are emitted once their identities have been established and the received argument fragments assembled, so partially received function names cannot reach tool dispatch.

If generation is cut off before a function identity is unambiguously established, that call remains unfinished and is not exposed as a dispatchable item. Other output and usage remain available in the incomplete response.

Function-call arguments and tool results in this projection are strings. Replayed strings are preserved, including partial arguments from an incomplete turn; structured tool results retain native Responses behavior.

Function tools must explicitly set strict: true or strict: false for this projection. Omitted/null strict keeps native Responses because its default schema-normalization behavior differs from Chat Completions.

Keys on the standard OpenAI GPT line are served on native Responses capacity first. When the line has no native Responses capacity for the model, stateless text and function-tool requests on this endpoint, including streaming, are still served as described in this section. Send the full conversation in input; replay returned function_call items together with matching function_call_output items to continue a tool loop. The public response remains a Responses object or Responses event stream for the requested model. Usage reports the tokens used, including cache and reasoning details when supplied, and your existing contracted discount still applies.

reasoning is supported here only as {"effort": "none" | "low" | "medium" | "high"}. The response then carries no reasoning output item; usage still reports reasoning tokens. Other efforts, reasoning summaries, temperature and top_p are not part of this compatibility.

This text/function compatibility does not imply support for stored-response continuation, encrypted reasoning replay, images, hosted tools, or additional request fields. Those requests retain their existing native Responses behavior, and on a line with no native Responses capacity for the model they are not served. No unsupported field or reasoning state is silently discarded. Function tools on gpt-5.6-luna, gpt-5.6-sol or gpt-5.6-terra also keep native Responses behavior at any reasoning effort other than none, and when no effort is sent. Azure GPT behavior is unchanged.

Image generation

The current public Responses contract does not expose image_generation. Use the dedicated synchronous Images API for generation. Image edits, reference images and masks use the Images API with model-specific limits; they are not features of this Responses endpoint. Requests that require an unavailable image capability fail closed rather than falling back to an older image route.

Unsupported public HTTP fields

The public HTTP Responses endpoint does not support previous_response_id continuation or background: true asynchronous execution. Requests that include those fields are rejected with invalid_request_error instead of being sent down a single execution path without fallback. Use a fresh Responses request on HTTP, or use the dedicated WebSocket continuation surface when available for your integration.

Response shape

Quotaflow returns OpenAI-compatible JSON for non-streaming calls and server-sent events for streaming calls.