Create Response
Generate a model reply in the OpenAI Responses format.
Models: sarvam-105b, sarvam-105b-conversations, glm5.3, gemma4, deepseekv4.1-flash-1017, glm5.3-flash, deepseekv4.1-flash-1017-interactive, and, on Provisioned Throughput, deepseekv4-pro, kimi-k3.1-pro, qwen38-27b (ids are case-sensitive).
Each call is independent. Send the full conversation in input every time — nothing is stored for you. Leave out store or set it to false (true returns 400). You cannot load a past response by id (GET /v2/responses/{id} is always 404).
Streaming is optional. Default is a single JSON body (stream omitted or false). Set stream: true only if you want server-sent events.
Reasoning (glm5.3, deepseekv4.1-flash-1017): both support low, high, and max. On glm5.3, reasoning.effort only accepts low or high — omit reasoning / effort for max-level reasoning, since sending the literal string "max" returns 400. On deepseekv4.1-flash-1017, all three values including max work directly. Read the trace from the reasoning item’s content[0].text; summary is filled only when reasoning.summary is set. Reasoning tokens count toward max_output_tokens, which has no default cap — omitting it means unbounded generation.
Other fields are documented below. See the Responses API guide.
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
Model IDs accepted by POST /v2/responses (case-sensitive; unknown ids return 404):
sarvam-105b— Sarvam flagship model.sarvam-105b-conversations— Sarvam 105B tuned for real-time dialogue.glm5.3— 1,048,576-token context; reasoning inoutputas areasoningitem; flat function tools; max request size 10,485,760 bytes.glm5.3-flash— long context, vision (inline base64 images), tools, and reasoning;reasoning.effortacceptsloworhighonly, as onglm5.3.gemma4— 262,144-token context, vision (inline base64 images), tools, and optional reasoning (reasoning.effortloworhigh).deepseekv4.1-flash-1017— long context, vision (inline base64 images), tools, and reasoning.deepseekv4.1-flash-1017-interactive— same capabilities asdeepseekv4.1-flash-1017, on a high-throughput deployment (more than 200 output tokens per second).deepseekv4-pro(Provisioned Throughput) — long context, text input, tools, and reasoning (defaulthigh).kimi-k3.1-pro(Provisioned Throughput) — long context, image input (inline base64; no video on this route), tools, and reasoning (always on).qwen38-27b(Provisioned Throughput) — 262,144-token context, image input (inline base64), tools, and reasoning (on by default).
Optional. Default false — same as chat completions. Omit or false for one JSON response body. Set true to stream named server-sent events. There is no [DONE] sentinel — the stream ends on response.completed, response.incomplete, or response.failed.
Maximum output tokens to generate, including reasoning tokens on reasoning models. If omitted, there is no default cap — generation is unbounded and continues until the model stops on its own or the context window fills. Always set this explicitly in production. Values above the model context window return 400.
Sampling temperature between 0 and 2. Default 1 on glm5.3 when omitted. Output is not bit-reproducible, even at 0.
Must be false or omitted (omitting is 200 and echoed as false). true is 400 invalid_request_error — nothing created here is retrievable. OpenAI SDKs default this to true, so a default client.responses.create(...) fails.
Function tools use the flat Responses shape (type, name, parameters, strict) — the nested chat-completions tool shape is 400. tool_choice: required with no tools returns 400. Function arguments in output are a JSON string (parse before use). Multiple tool calls per turn are supported; use parallel_tool_calls: true or omit (see that field).
Forwarded exactly as written: none, auto, required, { "type": "function", "name": "..." }, or another object.
Optional reasoning config for glm5.3, glm5.3-flash, gemma4, the DeepSeek models, kimi-k3.1-pro, and qwen38-27b. effort: on glm5.3 and glm5.3-flash, low or high only (the literal string max returns 400; omitting it gives max on glm5.3 and high on glm5.3-flash); on deepseekv4.1-flash-1017, deepseekv4.1-flash-1017-interactive, and deepseekv4-pro, low, high, max, or none (thinking off); on kimi-k3.1-pro, low, medium, high, or max (thinking is always on); on qwen38-27b, none turns thinking off. The trace is in the reasoning item’s content[0].text; summary is filled only when summary is set. Optional summary: auto or detailed.
Merged into the outbound body. Must not overwrite any modelled field (400). max_tool_calls and prompt are 400 here and in extra_body — not supported by any serving deployment.
System-style instructions. Echoed back on the response object when set.
Nucleus sampling. Default 0.95 on glm5.3 when omitted. Must be greater than 0 and at most 1 (0 is rejected on glm5.3).
Not supported on the Responses route for glm5.3; any value returns 400.
Optional. Range -2 to 2. May be accepted and echoed on Responses without changing model output.
Optional. Range -2 to 2. May be accepted and echoed on Responses without changing model output.
Output format, set in format (text, json_object, or json_schema).
false limits a turn to a single tool call on every open-weight model. sarvam-105b ignores it on this route.
Ignored on this route — Responses always returns one output. Accepted for OpenAI SDK compatibility only; omit or leave at 1.
Ignored on Responses. Accepted for SDK compatibility only.
400 invalid_request_error. This endpoint holds no state — replay the conversation in input. OpenAI and Fireworks use this to continue a chat; we do not.
Conversation state is not supported. Omit this field and replay the complete conversation in input.
true is 400 invalid_request_error. This endpoint is synchronous only.
400 invalid_request_error — not supported by any serving deployment, top-level or via extra_body.
How many of the most likely tokens to return at each output position, with their log probabilities. Send it with include: ["message.output_text.logprobs"]; without include, output[].content[].logprobs comes back empty. 0 returns no logprobs. Supported on sarvam-105b, glm5.3-flash, deepseekv4.1-flash-1017, deepseekv4.1-flash-1017-interactive, deepseekv4-pro, and qwen38-27b; glm5.3, gemma4, and kimi-k3.1-pro return 400.
Extra data to add to the response. message.output_text.logprobs returns token log probabilities (use with top_logprobs); reasoning.encrypted_content is accepted. An unknown value returns 400.
Response
Rewritten to this service’s request id. The id is for logs and x-request-id; responses are not stored for retrieval.
Typed output items from the backend — messages, reasoning, function calls, and vendor extras.
Unix timestamp (seconds) when the response was created. Returned as a float (e.g. 1789632469.0), not an integer.
Typically completed, incomplete, or failed. Corrected to incomplete with incomplete_details.reason: max_output_tokens when the caller set max_output_tokens, the backend reported output_tokens >= max_output_tokens, status was completed, and incomplete_details was absent.
Echoed back from the request. Always false — nothing created by this endpoint is retrievable.
Echoed from the request as sent — see the request field description for actual enforcement behavior.
OpenAI-compatible service-tier field, present for schema parity. Observed value: "auto".
Echoed back from the request. true is 400 — see the request field.
Unix timestamp (seconds, float) when generation finished. null while incomplete or failed.
Echoed back from the request. Always 400 if set — not supported by any serving deployment.
Not in the documented request schema, but accepted and echoed back. Defaults to {}.
Echoed back from the request. Always 400 if set — this endpoint holds no state.
Not in the documented request schema, but accepted and echoed back. Observed default: 0. Behavior on this route is otherwise unverified.
Not in the documented request schema, but accepted and echoed back. Observed default: 0. Behavior on this route is otherwise unverified.
Not in the documented request schema. Accepted and echoed back; behavior otherwise unverified.
Not in the documented request schema. Accepted and echoed back; behavior otherwise unverified.
Not in the documented request schema. Accepted and echoed back; behavior otherwise unverified.
Not in the documented request schema. Accepted and echoed back; behavior otherwise unverified.
Not in the documented request schema. Accepted and echoed back. Observed default: 0; behavior otherwise unverified.
Not in the documented request schema. Accepted and echoed back. Observed default: "disabled"; behavior otherwise unverified.
Not in the documented request schema. Accepted and echoed back; behavior otherwise unverified.
Reserved — always observed as null in testing. Shape not yet defined; do not rely on this field.