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>"
}
}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.
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>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
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.
255Body
Text input, plus image input (input_image) on multimodal models. Audio, files, 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.
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. Audio, files, and item references are not currently supported.
1Show child attributes
Show child attributes