API conventions glossary
Terms shared by every endpoint. Shorter definitions of the core API terms are on the main Glossary.
Annotation
Extra information attached to a reply, such as a citation. See citations.
Compaction
Replacing old turns with a summary so a conversation fits the context window.
Context management
Server-side clearing of old tool results and compaction of long conversations. See context management.
Cursor pagination
Paging with after_id and before_id, using first_id, last_id and has_more from each page.
Error code
The specific, stable reason for an error. Branch detailed handling on it. See error codes.
Error envelope
The one shape every error uses: error.type, error.code, error.message, error.param, error.request_id. See errors.
Error type
The broad category of an error, fixed by HTTP status. Decide whether to retry from it.
Extended context
An opt-in context window of up to 1,048,576 tokens on supported models. See extended context.
Idempotency key
A value you send so a retried create does not happen twice. Kept for 24 hours.
Keep-alive
A comment line sent during long streams so connections are not closed as idle. See stream format.
Refusal
A reply in which the model declines; finish_reason is refusal and message.refusal explains. See edge cases.
response_format
The request field that asks for JSON output, optionally matching a schema. See json output.
Retry-After
Seconds to wait before retrying, on 429 and 503 responses. See rate limit headers.
syntic-beta
The header that turns on preview features by flag. See versioning.
syntic-deprecation
A response header warning that a version or model you use is scheduled to go away. See deprecation policy.
syntic-version
The header that pins an API version by date. See versioning.