Skip to main content
POST
Messages
Creates a model response using the Anthropic Messages request and response format. Requests are served through the attested gateway and return an x-receipt-id header for verification.

Endpoint

Request Body

string
required
Model id returned by List Models.
integer
required
Maximum number of tokens to generate.
array
required
Conversation turns. Each item has a role (user or assistant) and content.
string
System prompt, sent as a top-level field.
number
Sampling temperature.
boolean
Stream the response as server-sent events.
object
Routing constraints for this request, applied together. zdr restricts routing to providers that do not retain content; aci_verified restricts it to an upstream verified inside the TEE; aci_session_ids pins it to specific attested channels.
If no provider satisfies the constraints the request fails before the prompt is sent, and failover retries stay inside the allowed set. Field reference: Chat Completions. See Attested Routing and Zero Data Retention.

Example

Response

Read assistant text from content[].text on blocks with type: "text". stop_reason is usually end_turn, max_tokens, stop_sequence, or tool_use.

Verification

Use the response x-receipt-id header with Get Receipt. A confidential response has upstream.verified.result = verified and required = true.

Responses

Trust Boundary