Client APIs
anthropic_messages_request
Read the release-matched anthropic messages request documentation and its scope.
Switching projects opens that project’s default documentation release.
Versions marked “overview” do not contain this page. Selecting one opens that version’s documentation overview.
On this page
Processes an Anthropic create-message body once and publishes its facts.
Configuration Notes
The registry decides which operation this filter owns, so only POST /v1/messages has its body processed. Every other Anthropic Messages operation — token counting, the batch family — is released without body work but still gets the Anthropic error shape, because those are supported endpoints and a chain may carry no other formatter. Traffic outside the Messages surface is left entirely alone.
on_invalid governs the envelope: a missing, malformed, or non-object body is refused with an Anthropic-compatible client error under reject, or forwarded for the backend to answer under continue.
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
on_invalid | continue | reject | error | no | Behavior when the body cannot be classified. |
max_body_bytes | integer | no | Maximum body size in bytes for StreamBuffer mode. |
headers | AnthropicMessagesRequestHeaders | no | Header names for promoted classification facts. Must not be hop-by-hop, framing, Host, credential, API-key, or other internal x-praxis-* names. Dedicated defaults remain allowed. |
headers.format | string | no | Header name for the detected format. Must not be a hop-by-hop, framing, Host, credential, API-key, or other internal x-praxis-* header. Dedicated default x-praxis-ai-format remains allowed. |
headers.model | string | no | Header name for the extracted model value. Must not be a hop-by-hop, framing, Host, credential, API-key, or other internal x-praxis-* header. Dedicated default x-praxis-ai-model remains allowed. Must not overwrite other classification facts such as x-praxis-ai-format. |
headers.stream | string | no | Header name for the extracted stream flag. Must not be a hop-by-hop, framing, Host, credential, API-key, or other internal x-praxis-* header. Dedicated default x-praxis-ai-stream remains allowed. |
Examples
Example 1
filter: anthropic_messages_request
Example 2
filter: anthropic_messages_request
on_invalid: reject
max_body_bytes: 1048576
headers:
format: x-praxis-ai-format
model: x-praxis-ai-model
stream: x-praxis-ai-stream