OpenAPI 3.1.02026-08-14156216299.0 KB

63ee8b82144f

Chat Completions

Anthropic Messages

post/anthropic/v1/messages

Headers

anthropic-versionstring nullable
anthropic-betastring nullable
x-deepinfra-sourcestring nullable
x-deepinfra-service-tierstring nullable
xi-api-keystring nullable
x-api-keystring nullable

Request body

service_tier'default' | 'priority' | 'flex'
fail_fastboolean

If true, the request is rejected immediately with HTTP 429 when the model has no spare capacity, instead of waiting in the queue. Opt-in; the default (false) keeps standard queueing behavior.

modelsstring[] nullable

Ordered list of up to 4 fallback models. The request is attempted on each model in order: when a model rejects it for lack of capacity (HTTP 429 model-busy / flex no-capacity), the next model is tried server-side. The first model that accepts serves the request; the response's model field and billing reflect that model, at that model's pricing. Models before the last are attempted without queueing (as if fail_fast were set); the last model honors the request's own fail_fast value. When models is set, the model field is ignored. Entries must be plain model names (no deploy_id:, custom_hostport, or :revision specifiers); duplicate entries are ignored, keeping the first occurrence.

modelstring required
max_tokensinteger nullable
messagesobject[] required
stop_sequencesstring[] nullable
streamboolean nullable
temperaturenumber nullable
top_pnumber nullable
top_kinteger nullable
metadataobject nullable
tool_choiceobject nullable

Response

Successful Response

{"stackTrail":"paths:/anthropic/v1/messages:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}