v1

latestOpenAPI 3.1.02026-07-26105141.0 KB
Responses API

Create a response

Creates an OpenAI Responses API task. Returns 202 when background=true, otherwise returns 200 after completion. Foreground stream=true requests return OpenAI Responses Server-Sent Events.

post/responses

Headers

Idempotency-Keystring

Makes the request retry-safe. Sail stores a reservation keyed by (organization, API key, Idempotency-Key); retrying with the same value returns the previously stored response instead of re-running inference. Keys are capped at 255 characters. See Idempotent Requests for full semantics.

Request body

modelstring required
raw_prompt_tokensinteger[]

Sail extension: pre-tokenized prompt as an array of token ids, forwarded to the model verbatim (no chat templating or tokenization). When set, input is still required but ignored — pass a placeholder string.

max_output_tokensinteger nullable
temperaturenumber nullable
top_pnumber nullable
instructionsstring

Prepended to the input as a system message.

parallel_tool_callsboolean

Accepted for OpenAI compatibility. Models decide their own tool-call cadence, so this field has no effect.

includestring[]

Additional data to include. reasoning.encrypted_content is accepted for OpenAI-client compatibility, but reasoning items are returned without encrypted content.

backgroundboolean
prompt_cache_keystring

Optional routing hint for prompt-prefix cache locality. Requests with the same key are preferentially routed to maximize cache hit rates.

storeboolean

Accepted for OpenAI compatibility. false does not change Sail's normal temporary request/response storage for processing, retries, polling, and idempotency; Customer Data remains governed by Sail's DPA retention and deletion terms.

truncation'disabled'
streamboolean

When true on a foreground request, returns OpenAI Responses Server-Sent Events. background=true requests cannot be streamed.

userstring

Response

Response completed and returned synchronously. When stream=true, returns Server-Sent Events.

idstring required
object'response' required
created_atinteger required
status'pending' | 'running' | 'failed' | 'completed' | 'cancelled' required
modelstring required
errorobject nullable
incomplete_detailsobject nullable
max_output_tokensinteger nullable
reasoningobject
storeboolean
temperaturenumber
top_pnumber
parallel_tool_callsboolean
toolsobject[]
userstring nullable
metadataobject required