GPT All-Model API - Responses Reference
- OpenAI-compatible Responses API for GPT series text models; select the specific model via
model(see the comparison table on themodelparameter for all allowed values) - The whole series consists of reasoning models, with reasoning depth controlled by
reasoning.effort; reasoning tokens are billed as output tokens - Prompt caching applies automatically: cached input tokens are billed at the lower cached rate
- Supports both synchronous and streaming (SSE) modes
- Server-side tools:
web_search(web search),code_interpreter(code execution),file_search(file search) - Plain
functiontools (client-side function calls) are supported as well - Multi-turn conversations can be chained with
previous_response_id - Note Model support varies for some parameters; see the per-parameter notes below
https://direct.evolink.ai, which has better support for text models and long-lived connections. https://api.evolink.ai is the primary endpoint for multimodal services and serves as a fallback address for text models.web_search, code_interpreter, file_search, mcp) run on the server, so results do not need to be sent back by the client, and they are only available on this API. The Chat Completions endpoint supports regular function tool calling only.background: true asynchronous mode is not supported, and there are no endpoints for retrieving, cancelling or deleting a response by its ID. For long-running generations, use stream: true to keep the connection open.The image_generation tool is not available on this model series; for image generation, use the image series model APIs.id returned by the previous turn as previous_response_id on the next turn to continue the context. Responses have a retention period; once it expires the ID is no longer valid and the request is handled as a new conversation. For scenarios with strict context-accuracy requirements, maintaining the full input history yourself is recommended.Authorizations
##All APIs require Bearer Token authentication##
Get API Key:
Visit API Key Management Page to get your API Key
Add to request header:
Body
Model to call:
gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-5.5, gpt-5.4, gpt-5.2, gpt-5.1 "gpt-5.6-sol"
Model input: a plain string, or an array of input items.
The content of an input item supports two block types: input_text (text) and input_image (image):
Image
- Pass the public URL of the image in
image_url image_urlmust be a string; writing it as{ "url": "..." }returns400detailis a sibling ofimage_url(not nested inside it):auto(default) /low/high/original- The image must be downloadable, otherwise
400is returned
Tool results
- The array can also carry back tool result items from the previous turn, such as
function_call_output
Note The block types on this API differ from those on the Chat Completions API (which uses text / image_url). They cannot be mixed; using the wrong ones returns 400.
"Search for AI news from the past week and summarize it in three sentences."
System-level instructions, equivalent to inserting a system message at the very beginning of input. When continuing a conversation with previous_response_id, this parameter is not inherited from the previous turn and must be passed on every turn.
"You are a concise assistant. Answer in no more than three sentences."
Whether to return a streaming response (SSE events, ending with response.completed). Default false.
false
Maximum number of tokens to generate (including reasoning tokens). When the limit is reached, status is incomplete.
2048
Reasoning control.
The allowed values of effort (reasoning depth) vary by model:
summary (reasoning summary): auto / concise / detailed, available across the series. Once enabled, a reasoning item appears in output.
mode (reasoning mode): standard / pro, supported only by the gpt-5.6 family.
context (reasoning context scope): auto / current_turn / all_turns, supported only by the gpt-5.6 family.
Reasoning tokens are billed as output tokens and counted in usage.output_tokens_details.reasoning_tokens.
Output text control:
format:{"type": "text"}(default),{"type": "json_object"}, or{"type": "json_schema", "name": "...", "schema": {...}, "strict": true}for structured outputverbosity:low/medium/high, controls how detailed the answer is
Tool declarations. Server-side tools run on the server, so results do not need to be sent back by the client:
Plain function tools (client-side function calls) are supported as well.
Note image_generation is not available on this model series; use the image series model APIs instead.
Controls tool selection: "auto" (default) / "none" / "required", or an object pinning a specific tool, e.g. {"type": "web_search"}.
none, auto, required Maximum total number of tool calls allowed in this response.
5
Whether the model may call multiple tools in parallel within one turn. Defaults to true.
Note Only the gpt-5.6 family and gpt-5.5 support setting it to false; on gpt-5.4 / gpt-5.2 / gpt-5.1 this parameter has no effect and always behaves as true.
true
The id of the previous response, used to chain multi-turn conversations without re-uploading the history.
Note Must be used together with store: true (the default). Responses have a retention period; once it expires the ID is no longer valid, and the request is handled as a new conversation without inheriting context. For scenarios with strict context-accuracy requirements, maintaining the full input history yourself is recommended.
"resp_0f5c2b2c20c39e8a006a7ef545443081979e478b10927984b5"
Whether to store this response on the server; only stored responses can be referenced by previous_response_id. Defaults to true.
Note Only the gpt-5.6 family and gpt-5.5 support setting it to false; on gpt-5.4 / gpt-5.2 / gpt-5.1 this parameter has no effect and always behaves as true. If you do not want responses stored, choose a model that supports turning it off.
true
Additional content to return in the response. Allowed values:
reasoning.encrypted_contentmessage.output_text.logprobsweb_search_call.resultsweb_search_call.action.sourcesfile_search_call.resultscode_interpreter_call.outputsmessage.input_image.image_urlcomputer_call_output.output.image_url
Sampling temperature, ranging from 0 to 2. Lower values make the output more deterministic.
Note On gpt-5.4 / gpt-5.2 / gpt-5.1 the value 0 has no effect (it is treated as unset and falls back to the default 1); for more deterministic output, use a value greater than 0 such as 0.01.
0 <= x <= 20.7
Nucleus sampling parameter, ranging from 0 to 1. Adjusting it together with temperature is not recommended.
0 <= x <= 10.9
Number of candidate tokens returned at each position, ranging from 0 to 20; must be used together with include: ["message.output_text.logprobs"].
Note Supported only by the gpt-5.6 family and gpt-5.5; other models do not support this parameter.
0 <= x <= 202
Frequency penalty, ranging from -2 to 2, reducing the likelihood of repeated content.
Note Supported only by the gpt-5.6 family; other models do not support this parameter.
-2 <= x <= 20.5
Presence penalty, ranging from -2 to 2, encouraging the model to talk about new topics.
Note Supported only by the gpt-5.6 family; other models do not support this parameter.
-2 <= x <= 20.5
How to handle context that exceeds the window: disabled (default, returns an error) or auto (automatically truncates the middle of the context).
auto, disabled "auto"
Automatic compaction configuration for long conversations, for example [{"type": "compaction", "compact_threshold": 100000}]: the history is compacted automatically once the context exceeds the threshold.
Note Supported only by the gpt-5.6 family; other models do not support this parameter.
Cache grouping key. Passing the same value for requests that share the same prefix improves the prompt cache hit rate.
"app-agent-v1"
Prompt cache retention policy: in_memory (default) or 24h (extends how long the cache is retained).
in_memory, 24h "in_memory"
References an already created prompt template, in the form {"id": "pmpt_xxx", "version": "1", "variables": {...}}.
Custom key-value pairs returned as-is with the response, convenient for tagging on the business side. Both keys and values are strings.
Stable identifier of the end user, used for abuse tracking.
Note Supported only by the gpt-5.6 family; other models do not support this parameter.
"user-1024"
End-user identifier, used to distinguish the source of calls.
"user-1024"
Response
Response generated successfully (JSON object, or an SSE event stream ending with response.completed when stream=true)
Unique ID of this response, which can be used as previous_response_id for the next turn
"resp_0f5c2b2c20c39e8a006a7ef545443081979e478b10927984b5"
Response type
response "response"
Response status: completed for a normal ending, incomplete when generation stopped early for reasons such as reaching max_output_tokens, failed when generation failed
completed, incomplete, failed "completed"
Actual model name used
"gpt-5.6-sol"
Creation timestamp
1786705221
Output items in generation order: the reasoning item (reasoning summary / encrypted reasoning content), tool call items (such as web_search_call and code_interpreter_call), and finally the message item containing output_text content.
Explains the reason when status is incomplete
Token usage statistics. Prompt caching applies automatically, and cached input tokens are billed at the lower cached rate.
Custom key-value pairs passed in the request, returned as-is