curl --request POST \
--url https://api.sailresearch.com/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "zai-org/GLM-5.3",
"input": "Explain the key ideas behind transformer architectures."
}
'{
"id": "<string>",
"object": "response",
"created_at": 123,
"status": "queued",
"model": "<string>",
"usage": {
"input_tokens": 123,
"input_tokens_details": {
"cached_tokens": 123,
"reasoning_tokens": 123
},
"output_tokens": 123,
"output_tokens_details": {
"cached_tokens": 123,
"reasoning_tokens": 123
},
"total_tokens": 123,
"prompt_tokens": 123,
"completion_tokens": 123
},
"metadata": {
"supercached_input_tokens": "<string>",
"supercache_write_input_tokens": "<string>"
},
"input": "<string>",
"output": "<string>",
"error": {},
"incomplete_details": {},
"max_output_tokens": 123,
"reasoning": {},
"text": {
"format": {
"type": "text"
}
},
"store": true,
"temperature": 123,
"top_p": 123,
"parallel_tool_calls": true,
"tool_choice": "<string>",
"tools": [
{}
],
"truncation": "<string>",
"user": "<string>"
}{
"id": "<string>",
"object": "response",
"created_at": 123,
"status": "queued",
"model": "<string>",
"usage": {
"input_tokens": 123,
"input_tokens_details": {
"cached_tokens": 123,
"reasoning_tokens": 123
},
"output_tokens": 123,
"output_tokens_details": {
"cached_tokens": 123,
"reasoning_tokens": 123
},
"total_tokens": 123,
"prompt_tokens": 123,
"completion_tokens": 123
},
"metadata": {
"supercached_input_tokens": "<string>",
"supercache_write_input_tokens": "<string>"
},
"input": "<string>",
"output": "<string>",
"error": {},
"incomplete_details": {},
"max_output_tokens": 123,
"reasoning": {},
"text": {
"format": {
"type": "text"
}
},
"store": true,
"temperature": 123,
"top_p": 123,
"parallel_tool_calls": true,
"tool_choice": "<string>",
"tools": [
{}
],
"truncation": "<string>",
"user": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}Create a response
Creates an OpenAI Responses API task. Accepted background requests return 202; foreground requests return 200 after completion. Foreground stream=true requests return OpenAI Responses Server-Sent Events.
curl --request POST \
--url https://api.sailresearch.com/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "zai-org/GLM-5.3",
"input": "Explain the key ideas behind transformer architectures."
}
'{
"id": "<string>",
"object": "response",
"created_at": 123,
"status": "queued",
"model": "<string>",
"usage": {
"input_tokens": 123,
"input_tokens_details": {
"cached_tokens": 123,
"reasoning_tokens": 123
},
"output_tokens": 123,
"output_tokens_details": {
"cached_tokens": 123,
"reasoning_tokens": 123
},
"total_tokens": 123,
"prompt_tokens": 123,
"completion_tokens": 123
},
"metadata": {
"supercached_input_tokens": "<string>",
"supercache_write_input_tokens": "<string>"
},
"input": "<string>",
"output": "<string>",
"error": {},
"incomplete_details": {},
"max_output_tokens": 123,
"reasoning": {},
"text": {
"format": {
"type": "text"
}
},
"store": true,
"temperature": 123,
"top_p": 123,
"parallel_tool_calls": true,
"tool_choice": "<string>",
"tools": [
{}
],
"truncation": "<string>",
"user": "<string>"
}{
"id": "<string>",
"object": "response",
"created_at": 123,
"status": "queued",
"model": "<string>",
"usage": {
"input_tokens": 123,
"input_tokens_details": {
"cached_tokens": 123,
"reasoning_tokens": 123
},
"output_tokens": 123,
"output_tokens_details": {
"cached_tokens": 123,
"reasoning_tokens": 123
},
"total_tokens": 123,
"prompt_tokens": 123,
"completion_tokens": 123
},
"metadata": {
"supercached_input_tokens": "<string>",
"supercache_write_input_tokens": "<string>"
},
"input": "<string>",
"output": "<string>",
"error": {},
"incomplete_details": {},
"max_output_tokens": 123,
"reasoning": {},
"text": {
"format": {
"type": "text"
}
},
"store": true,
"temperature": 123,
"top_p": 123,
"parallel_tool_calls": true,
"tool_choice": "<string>",
"tools": [
{}
],
"truncation": "<string>",
"user": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Identifies one submission within your organization and API key. Reuse the same value and request body when retrying; use a new value for new work. See Idempotency.
255Completion window for this request, for clients that cannot set metadata.completion_window in the body. A window in the body takes precedence. See Completion windows.
asap, balanced, flex Body
Text input, plus image input (input_image) on multimodal models and inline PDF input (input_file) on every model. Audio, files referenced by file_id or file_url, and item references are not currently supported.
1Sail 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.
1 - 2000000 elements0 <= x <= 2147483647x >= 10 <= x <= 20 <= x <= 1Show child attributes
Show child attributes
Show child attributes
Show child attributes
Prepended to the input as a system message.
Accepted for OpenAI compatibility. Models decide their own tool-call cadence, so this field has no effect.
Additional data to include. reasoning.encrypted_content is accepted for OpenAI-client compatibility, but reasoning items are returned without encrypted content.
When true, submits a background request using a supported balanced or flex window; defaults to false. See Background mode for restrictions and Default behavior for window selection.
Optional routing hint for prompt-prefix cache locality. Requests with the same key are preferentially routed to maximize cache hit rates.
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.
disabled When true on a foreground request, returns OpenAI Responses Server-Sent Events. background=true requests cannot be streamed.
256Optional string metadata. The keys supercached_input_tokens and supercache_write_input_tokens are reserved for response output. A request that supplies either key returns HTTP 400.
Show child attributes
Show child attributes
Response
Response completed and returned synchronously. When stream=true, returns Server-Sent Events.
response queued, in_progress, failed, completed, incomplete, cancelled Show child attributes
Show child attributes
Response metadata. A completed response includes supercached_input_tokens and supercache_write_input_tokens as decimal strings when Supercache accounting data is available. Both fields are included when their value is zero.
Show child attributes
Show child attributes
Text input, plus image input (input_image) on multimodal models and inline PDF input (input_file) on every model. Audio, files referenced by file_id or file_url, and item references are not currently supported.
1Show child attributes
Show child attributes