Skip to main content

Endpoint

Unknown fields at gateway-owned objects are dropped for compatibility. Multipart/form-data (a request JSON part plus image files) is also accepted.

Request

Duplicate feature keys (for example sending web_search twice) are rejected with request body contains duplicate feature fields.

Example

Response

Top-level fields

Choice and message

Usage object

Status codes

All responses set Cache-Control: no-store.

Compatibility endpoints

POST /v1/responses (stateless, plus POST /v1/responses/compact) and POST /v1/messages with POST /v1/messages/count_tokens validate their native shapes and map onto the same pipeline. Schemas: Create a response, Create a message.

End-to-End Encryption

An :encrypted model runs the call with client-side encryption. The model’s attestation names the transport and its headers. Streaming works. For web search, call the standalone search and fetch endpoints first, then add the results to your prompt before encrypting. Images and files work on models that list support for them. See Encrypted requests.