anthropic-compat

Serve an Anthropic-compatible Messages request.

post/v1/messages

Request

Request body

cache_controlobject nullable
include_confidenceboolean
include_spansboolean
max_tokensinteger
modelstring required
speed'standard' | 'fast' nullable

Anthropic inference speed mode. "fast" opts into high output-tokens-per-second inference on supported models (e.g. the latest Opus). Fastino forwards this only to the native Anthropic upstream (with the required fast-mode beta header); Bedrock and gateway routes ignore it.

stop_sequencesstring[] nullable
storeboolean
streamboolean
task_typestring nullable

Deprecated. Legacy task hint. The unified schema disambiguates the task automatically. Submitting this field emits Deprecation: true and Sunset: <RFC 7231 date> headers.

temperaturenumber nullable
thinkingobject nullable

Opt-in Anthropic-style extended-thinking controls. Fastino does not enable thinking by default; send the Anthropic-native object: {'type': 'enabled', 'budget_tokens': N, 'display'?: 'summarized'|'omitted'} for manual mode, {'type': 'adaptive', 'effort'?: tier, 'display'?: ...} for adaptive mode (required on Opus 4.7+ / Mythos, recommended on Opus 4.6 / Sonnet 4.6), or {'type': 'disabled'} to turn thinking off on models that have it on by default. Fastino canonicalizes this into InferenceRequest.reasoning at the adapter boundary so the request routes correctly whether the upstream is Anthropic native, Bedrock, or the Vercel AI Gateway (which advertises the normalized reasoning field rather than thinking). On models that require adaptive mode, Fastino auto-upgrades manual configs (mapping budget_tokens to the nearest effort tier) rather than letting the upstream return a 400.

tool_choiceobject nullable
toolsobject[] nullable
top_kinteger nullable
top_pnumber nullable

Response

Non-streaming Anthropic Messages response. When the request sets stream=true the server emits an Anthropic-shaped SSE event stream over text/event-stream instead; that stream shape is documented in the Anthropic Messages API reference.

contentobject[] required
fastino_inference_idstring nullable
idstring required
modelstring required
rolestring
stop_reasonstring nullable
stop_sequencestring nullable
typestring

Changes

    • info

      added the non-success response with the status

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • info

      added the optional property to the response with the status