API reference: Responses
POST /v1/responses creates a model answer. It follows the
OpenAI Responses API, so the official libraries
and frameworks built on them work after you change the base URL and the model name. For a walk-through
with code, read the Responses guide.
POST https://dummydomain/v1/responsesAuthorization: Bearer YOUR_API_KEYContent-Type: application/jsonRequest body
Section titled “Request body”| Field | Type | Description |
|---|---|---|
model |
string, required | A tier: Instant, Fast, Smart or Genius. GET /v1/models lists the tiers your key may use |
input |
string or array | The conversation. A string is one user message. An array holds input items |
instructions |
string | The system prompt for this request |
tools |
array | Function tools the model may call, and on Genius one computer tool |
tool_choice |
string or object | auto (default), none, required, {"type": "function", "name": "..."} to force one function, or {"type": "computer"} / {"type": "computer_use_preview"} to force the computer tool |
parallel_tool_calls |
boolean | Let the model ask for several functions in one turn. Default true |
text.format |
object | {"type": "text"} (default), {"type": "json_object"}, or {"type": "json_schema", "name": "...", "schema": {...}, "strict": true} |
max_output_tokens |
integer or null | The longest answer you want, in tokens, up to the tier’s max_output_tokens in /v1/models. A larger value gets HTTP 400. Left out or null: the default output limit |
temperature |
number | 0 to 2. Lower is more focused |
top_p |
number | 0 to 1. Use this or temperature |
stream |
boolean | true sends stream events as the answer is written |
metadata |
object | Up to 16 string values. Sent back in the response, and kept with it only when store is true |
store |
boolean | true keeps the response on your server so you can continue, read or delete it. Default false. See stored responses |
previous_response_id |
string or null | Continue from a stored response: its input and output items come before this request’s input. See stored responses |
truncation |
string | "disabled" (default) or "auto". See long conversations |
include |
array | [], or ["reasoning.encrypted_content"], which is accepted and returns no reasoning item. Other values get HTTP 400 |
reasoning |
object or null | effort switches thinking on for Genius and is echoed in the response; see thinking on Genius. summary is accepted and ignored |
text.verbosity |
string | low, medium or high. Accepted, echoed in the response and ignored |
Fields that OpenAI clients send with their default values are accepted, so you never have to strip them:
store: false, user, prompt_cache_key, safety_identifier, max_tool_calls, client_metadata,
service_tier: "auto", include: [], background: false and top_logprobs: 0.
The full field contract, including values that get HTTP 400, is in Errors.
Default output limit
Section titled “Default output limit”If you send no max_output_tokens (or send null), the answer limit on a turn without active tools is what the
context window leaves after your prompt. It is never below 2,048 tokens, never above 8,192, and never above
the tier’s max_output_tokens in /v1/models. A request that fits is never refused because
of the default. Before 25-10-2026 it was always 2,048.
A turn with active tools defaults to the tier’s max_output_tokens_with_tools. A turn with
tool_choice: "none" has no active tools. For a longer answer, ask for it explicitly, up to the tier’s
max_output_tokens.
Thinking on Genius
Section titled “Thinking on Genius”reasoning.effort works as reasoning_effort does on Chat Completions. On Genius, low, medium, high and
xhigh let the model think before it answers or calls a tool; none, minimal or no reasoning give a
direct answer. Other tiers accept it and ignore it. Live since 26-10-2026; servers get it with the next installer after 4.6.0.
r = client.responses.create(model="Genius", reasoning={"effort": "medium"}, input="Plan the steps, then answer.")- The extra tokens (1,024 for
low, 2,048 formedium, 4,096 forhighandxhigh) are reserved on top ofmax_output_tokens.usage.output_tokensincludes the thinking;output_tokens_details.reasoning_tokensstays 0. - No
reasoningitem is returned. The response’sreasoningechoes the effort you sent. - Turns are slower, and a turn whose thinking runs out of room or time is answered once more without thinking. Timing, sampling and the token check are in thinking on Genius.
Fields that are accepted and ignored
Section titled “Fields that are accepted and ignored”Newer OpenAI SDKs send these fields. ZenithAI accepts them and they have no effect: the tier decides how
long the answer is. reasoning.effort is the exception on Genius, see thinking on Genius.
| Field | Accepted values |
|---|---|
reasoning.effort |
none, minimal, low, medium, high, xhigh. Ignored on tiers other than Genius |
reasoning.summary |
auto, concise, detailed. No reasoning item is returned |
text.verbosity |
low, medium, high. Echoed back in the response text |
prompt_cache_key, safety_identifier |
A string of up to 512 characters |
Any other value is refused with HTTP 400, with param naming the field and the message listing the accepted
values. Other reasoning keys, and include values other than "reasoning.encrypted_content", are still refused.
Input items
Section titled “Input items”| Item | Shape |
|---|---|
| Message | {"role": "user", "content": "..."}. Roles: system, developer, user, assistant. content is a string or a list of parts |
input_text part |
{"type": "input_text", "text": "..."} |
input_image part |
{"type": "input_image", "image_url": "data:image/png;base64,..."}. PNG, JPEG, WebP, GIF or BMP. detail may be left out or set to auto, low, high or original. It is taken as a hint and changes nothing: every image is read at the tier’s own resolution. Other values get HTTP 400 invalid_image_detail |
| Assistant history | output_text and refusal parts, as you got them in output |
function_call |
An item from a previous output, sent back unchanged |
function_call_output |
{"type": "function_call_output", "call_id": "...", "output": ...}. output is a string, or a list of input_text and input_image parts |
reasoning |
Accepted and dropped, so replayed history works |
computer_call, computer_call_output |
The computer tool calls, sent back unchanged, and your screenshot after each action |
A request holds up to 400 input items and 100 messages. Images, from user messages and from your functions
together, are limited to 8 per request, 10 MiB each and 20 MiB in total. Send images as data: URLs.
An https image address works only if your administrator has allowed its host; this is off by default, and the server then fetches the image itself, with no redirects.
Images work on tiers whose capabilities.vision is true in /v1/models.
With truncation: "auto" a request over these limits drops its
oldest items instead of being refused.
{ "model": "Fast", "input": [ {"role": "user", "content": [ {"type": "input_text", "text": "What is written on this label?"}, {"type": "input_image", "image_url": "data:image/png;base64,iVBORw0KGgo..."} ]} ]}Function tools
Section titled “Function tools”{ "type": "function", "name": "get_order_status", "description": "Look up an order by its number", "parameters": { "type": "object", "properties": {"order_id": {"type": "string"}}, "required": ["order_id"], "additionalProperties": false }, "strict": true}Function calling works on tiers whose capabilities.tools is true in /v1/models. function tools are
taken, plus one computer tool on Genius. Hosted tools such as web_search and
file_search get HTTP 400 unsupported_tool.
tool_choice |
What the model may do |
|---|---|
"auto" |
Answer in text, or call one or more of your functions. The default |
"none" |
Text only. See answer turns after tool use |
"required" |
Must call a function |
{"type": "function", "name": "get_order_status"} |
Must call that one function |
Strict mode
Section titled “Strict mode”Strict mode follows OpenAI Structured Outputs for function calling. It applies when every function in
the request has "strict": true and tool_choice is auto or required. The model’s output is then
constrained to the schemas while it is generated:
- The turn is one
function_callto one of the functions, with arguments that match its schema. Withautoit can be a text answer instead. - A call can come with a short
messageitem next to it, one sentence on what the model is doing, as OpenAI allows. It is not the final answer: run the call and continue. The run is finished when a turn holds a message and no call. - Enums, required properties,
const,minItemsandmaxItemshold by construction.minLengthandpatternare checked after generation. - A strict turn returns at most one call, as with
parallel_tool_calls: false. - A strict text answer cut by the output limit is returned as the text so far, with
status: "incomplete"andincomplete_details.reason: "max_output_tokens".
A strict schema must close every object with additionalProperties: false, list every property in
required, and use nullable types, such as ["string", "null"], for optional values. The OpenAI Agents SDK
marks its function tools strict by default. Strictness guarantees the shape of the arguments, not that the
model chose the right action.
Non-strict tools
Section titled “Non-strict tools”With non-strict tools, or a mix of strict and non-strict functions, the arguments are checked against the
schema after generation, with at most one regeneration. A call that still does not match ends with HTTP 502
invalid_tool_call, reason: "arguments_schema_mismatch" and retryable: true, with
details of the rule it broke. You never receive a partial or
invalid call.
Answer turns after tool use
Section titled “Answer turns after tool use”With tool_choice: "none", or with no tools sent, earlier function_call and function_call_output items
in input are given to the model as plain conversation. A short instruction follows: answer in prose from
what the earlier steps showed, without calling tools and without inventing links or details. The answer is
a normal message, and your input is not changed. If the model still produces a call, the request ends
with HTTP 502 tool_choice_violation and retryable: false. This is rare.
For loops and examples, read Function calling and tools.
Function results
Section titled “Function results”A function’s result goes back as a function_call_output with the same call_id. It can be text, or text
and images:
{ "type": "function_call_output", "call_id": "call_8f2c...", "output": [ {"type": "input_text", "text": "Scan of bill B-17:"}, {"type": "input_image", "image_url": "data:image/png;base64,iVBORw0KGgo..."} ]}Send an output that carries images right after the function_call it answers, in the run of outputs that
follows that call.
The response object
Section titled “The response object”{ "id": "resp_0c9e2b...", "object": "response", "created_at": 1791959528, "completed_at": 1791959529, "status": "completed", "model": "Fast", "output": [ { "type": "message", "id": "msg_ead541...", "role": "assistant", "status": "completed", "content": [{"type": "output_text", "text": "Your order SO-4471 was shipped.", "annotations": []}] } ], "usage": { "input_tokens": 38, "input_tokens_details": {"cached_tokens": 0}, "output_tokens": 9, "output_tokens_details": {"reasoning_tokens": 0}, "total_tokens": 47 }, "error": null, "incomplete_details": null, "metadata": {"order": "SO-4471"}, "instructions": null, "tools": [], "tool_choice": "auto", "parallel_tool_calls": true, "text": {"format": {"type": "text"}, "verbosity": "medium"}, "temperature": null, "top_p": null, "max_output_tokens": null, "store": false}| Field | Description |
|---|---|
id |
resp_..., unique per response. Quote it with request_id when you report a problem |
status |
completed, incomplete (incomplete_details.reason is max_output_tokens: the answer reached the output limit) or failed |
output |
A message item with output_text parts (left out when the model only calls functions, or a short note next to a strict call), a function_call item (call_id, name, arguments as a JSON string) for each function the model wants run, and a computer_call item for each computer action |
usage |
Token counts for this request |
error |
null, or code and message when status is failed |
| Settings | model, instructions, tools, tool_choice, text, temperature, top_p, max_output_tokens, metadata, truncation, store (false unless you sent true) and previous_response_id as used |
The OpenAI libraries add output_text: all the text of output joined together.
Nothing is kept on the server after the answer unless you send store: true (see
stored responses). There is no /cancel. The /v1 endpoints are POST /v1/responses,
GET /v1/responses/{id}, DELETE /v1/responses/{id}, GET /v1/responses/{id}/input_items,
POST /v1/chat/completions, GET /v1/models and GET /v1/models/{id}.
Stream events
Section titled “Stream events”With "stream": true the answer is a server-sent event stream. Each event has a type and a
sequence_number. Lines that start with :, such as : ping, are heartbeat comments that keep the
connection open and can be ignored.
| Event | When |
|---|---|
response.created, response.in_progress |
At the start |
response.output_item.added |
A message or function call starts |
response.content_part.added |
A text part starts |
response.output_text.delta |
A piece of text. Show delta as it arrives |
response.output_text.done, response.content_part.done |
The text part is finished |
response.function_call_arguments.delta, .done |
The arguments of a function call. A computer_call has no argument events: it arrives whole in response.output_item.added and .done |
response.output_item.done |
The item is finished, with its final content |
response.completed |
The last event, carrying the whole response |
response.incomplete |
The last event when the answer reached max_output_tokens |
response.failed |
The last event when the request failed. response.error has code, message and request_id |
event: response.output_text.deltadata: {"type":"response.output_text.delta","sequence_number":4,"item_id":"msg_ead541...","output_index":0,"content_index":0,"delta":"Your order"}A failure before the stream starts is a normal JSON error with an x-should-retry header when it carries
retryable. A failure after the stream has started arrives as an error event, with no header.
Limits and errors
Section titled “Limits and errors”Each tier has its own limits. Read context_window, tool_context_window, max_output_tokens,
max_output_tokens_with_tools and max_images_per_request from GET /v1/models rather
than hard-coding them. Request rates and open streams per key are on the
Errors and limits page.
Every JSON error that carries retryable also sends the header x-should-retry with the same decision.
The official OpenAI libraries honour it, so errors marked false, such as tool_choice_violation, are not
resent. Read which errors to retry.
Stored responses
Section titled “Stored responses”By default nothing is kept after the answer. Send store: true and the response, with its input items, is kept
on your server for the API key that made it. You can then continue it with previous_response_id, read it again
or delete it. Different from OpenAI: OpenAI stores responses unless you send store: false. ZenithAI stores
one only when the request sends store: true. Live since 26-10-2026; servers get it with the next installer
after 4.6.0.
first = client.responses.create(model="Smart", input="Name three primes.", store=True)second = client.responses.create(model="Smart", input="And their sum?", previous_response_id=first.id, store=True)print(second.output_text)client.responses.delete(first.id)client.responses.delete(second.id)- Continuing.
previous_response_idputs the stored response’s input items and output items before this request’sinput, then the request runs as usual. All earlier tokens count again as input, andtruncation: "auto"applies to the combined input.instructionsare not carried over: send them with every request, as on OpenAI. - Chains. Only a response sent with
store: truecan be continued. To chain turn after turn, including the tool-call turns of one agent run, sendstore: trueon every request. In the OpenAI Agents SDK, setModelSettings(store=True)and useprevious_response_idorauto_previous_response_id=True. - What is kept. A completed or incomplete response, never a failed one, for 30 days, and at most 1,000 per API key; the oldest go first. Your administrator can change both. No other key can see it.
- Size. A response over about 25 MB with its input and output is refused before the model runs, with
HTTP 400
store_too_large. When the server’s store is full,store: truegets HTTP 400store_full. Sendstore: falsein both cases. - Store not available. If the server cannot save responses right now,
store: truegets HTTP 503store_unavailable, marked retryable, before the model runs. Try again later, or sendstore: false: you still get the answer, it is just not kept. If saving fails after the answer, the response saysstore: false. - Deleted keys. Deleting an API key deletes the responses it stored. Settings › API keys shows how many each key holds, and the delete confirmation names them. When an administrator deletes a person’s data, their stored responses go too.
- Not found. An unknown, expired, deleted or never stored
previous_response_id, or one stored with another key, gets HTTP 400previous_response_not_found.conversation(OpenAI’s Conversations API) is still refused.
| Method and path | Result |
|---|---|
GET /v1/responses/{id} |
The response as it was returned. stream=true gets HTTP 400 unsupported_parameter |
DELETE /v1/responses/{id} |
{"id": "resp_...", "object": "response.deleted", "deleted": true} |
GET /v1/responses/{id}/input_items |
{"object": "list", "data": [...], "first_id": ..., "last_id": ..., "has_more": ...}. Query: limit 1 to 100 (default 20), order asc or desc (default desc), after (an item id) |
An unknown id, or another key’s, gets HTTP 404 with code: null, as on OpenAI. These calls count toward your
key’s requests a minute and are not counted as model usage. In the OpenAI Python library they are
client.responses.retrieve, client.responses.delete and client.responses.input_items.list.
Long conversations: truncation auto
Section titled “Long conversations: truncation auto”Unless you use stored responses, every request carries the whole conversation, and an
agent’s history keeps growing. With stored responses the stored history counts too. With truncation: "disabled" (the default) a request that no longer fits is refused, for example
with HTTP 400 context_length_exceeded or too_many_images. With truncation: "auto", as on OpenAI, the
server drops the oldest input items until the request fits:
- Every limit counts: the context window (the tool window on tool turns), 8 images, the image bytes, 400 items, 100 messages and the character limit.
- Leading
systemanddevelopermessages, andinstructions, are always kept. - A call and its output are kept or dropped together, so the history stays valid.
- Your
inputis not changed. The response echoestruncation: "auto".
{"model": "Genius", "truncation": "auto", "input": [ ... the whole history ... ]}Use it for screen agents, where each turn adds a screenshot, and for long chats. A request that cannot fit
even with only the latest items left is still refused. In the OpenAI Agents SDK, set
ModelSettings(truncation="auto").
Computer tool
Section titled “Computer tool”On the Genius tier /v1/responses takes OpenAI’s built-in computer tool. The model looks at your
screenshots and answers with computer_call items in screen pixels. Your code performs each action and
sends back a new screenshot. The Computer use guide has the whole loop and
runnable code.
| Tool | Shape | Coordinates you receive |
|---|---|---|
| Preview | {"type": "computer_use_preview", "display_width": 1440, "display_height": 900, "environment": "browser"}. Sizes are integers from 1 to 10000. environment is windows, mac, linux, ubuntu or browser |
Pixels of the declared display size |
| GA | {"type": "computer"}, with no other fields |
Pixels of the latest screenshot in input |
- At most one computer tool per request. It may sit next to function tools that are
strict: true. A non-strict function next to it, or a function namedcomputer, is refused. - On Instant, Fast or Smart a computer tool gets HTTP 400
unsupported_tools, unlesstool_choiceisnone. - The computer tool is not available on
/v1/chat/completions.
| Item | Fields |
|---|---|
computer_call (in output) |
id (cu_...), call_id, status: "completed", pending_safety_checks: [], and the actions: action, exactly one, with the preview tool, or actions, a list of 1 to 5 to perform in order before the next screenshot, all in pixels of the same screenshot, with the GA tool. A computer_call you send back may hold up to 16 actions with the GA tool, and exactly one with the preview tool |
computer_call_output (in input) |
call_id, and output: {"type": "computer_screenshot", "image_url": "data:image/png;base64,..."}. Screenshots must be data: URLs. acknowledged_safety_checks and current_url are accepted and ignored |
| Action | Fields |
|---|---|
click |
x, y, button (left, right, wheel, back, forward) |
double_click, move |
x, y |
drag |
path, a list of 2 to 16 points {"x", "y"} |
keypress |
keys, 1 to 8 key names such as CTRL, ENTER |
scroll |
x, y, scroll_x, scroll_y in pixels. Positive scroll_y scrolls down, positive scroll_x right |
type |
text |
screenshot, wait |
No fields. Take a screenshot (after a short pause for wait) and send it back |
keys on click, double_click, drag, move and scroll |
Up to 4 modifier keys to hold during the action, such as ["CTRL"] for a ctrl-click. Left out when no key is held |
The preview tool gets one action per computer_call, the GA tool up to 5. With the GA tool and no screenshot
in input yet, the first call is a single screenshot or wait action. ZenithAI has no safety classifier, so pending_safety_checks is always
empty: your code must confirm sensitive actions itself.
Related
Section titled “Related”- Responses guide: follow-ups, function loops, images from functions, the Agents SDK
- Function calling and tools: tool_choice, strict mode and agent loops
- Computer use: screenshots in, clicks and typing out
- Models: tiers and what each one can do
- Errors: status codes, error codes and limits
Common questions
Which fields does ZenithAI's /v1/responses accept?
model, input, instructions, tools, tool_choice, parallel_tool_calls, text.format, max_output_tokens, temperature, top_p, stream, truncation, metadata, store and previous_response_id. Client defaults such as store false are accepted too, so the OpenAI libraries work without changes.
Does ZenithAI's /v1/responses support truncation auto?
Yes. With truncation auto, when the input does not fit, the oldest input items are dropped until it does. The context window, the 8-image limit, the image bytes, 400 items, 100 messages and the character limit all count. System and developer messages and each call with its output are kept.
Does a ZenithAI response object look like OpenAI's?
Yes. It has the same fields, such as id, object, created_at, status, model, output and usage, plus the settings you sent. The OpenAI libraries read it as is, including output_text.
Does ZenithAI's /v1/responses store responses like OpenAI?
Only when you ask. OpenAI stores responses by default, while ZenithAI keeps one only when the request sends store true. It is then kept for 30 days for your API key, and previous_response_id, retrieve, delete and input_items work on it. Without store true nothing is kept.
Does reasoning.effort change anything on ZenithAI's /v1/responses?
On Genius, yes. low, medium, high or xhigh lets the model think before it answers or calls a tool, which is slower and usually more careful. none, minimal or no value give a direct answer. Other tiers accept it and ignore it. The thinking is never returned, and the response echoes the effort in reasoning.
