inference
Anthropic Messages API. The request is translated into a /v1/chat/completions request, served by the chat route with all of its limits, and the answer is translated back. Buffered and streaming answers are supported. POST /v1/messages/count_tokens is not served.
post/v1/messages
Request
- The document declares no server URL.
- Auth
- HTTP bearer
- or API key in header x-api-key
Headers
anthropic-versionstring nullable
Absent or 2023-06-01
anthropic-betastring nullable
Accepted and ignored
X-SIE-MACHINE-PROFILEstring nullable
Preferred GPU or machine profile
X-SIE-Poolstring nullable
Explicit pool routing override
X-SIE-Remote'forbid'
Require local serving through a current worker execution fence. A selected remote profile returns 400; no verified local worker returns retryable 503. Duplicate or other values return 400.
Request body
Response
Message, or a text/event-stream of Messages events when stream is true
Changes
- info
endpoint added
- info