Docs
API: Anthropic
Anthropic Messages dialect for clients and SDKs that speak it. Use the x-api-key header when the server is exposed beyond localhost.
Anthropic Messages dialect for clients and SDKs that speak it. Use the x-api-key header when the server is exposed beyond localhost.
All examples use the local base URL http://127.0.0.1:1337. This page is generated from the api-endpoints.v1 contract — see Server overview for auth, CORS, and exposure, and Settings reference for the controls.
Endpoints
POST /anthropic/v1/messages
Anthropic Messages completion.
Maps the Anthropic Messages request/response to a local chat model. Supports streaming.
Auth: x-api-key · Streaming: yes (SSE)
| Field | Type | Required | Notes |
|---|---|---|---|
model | string | yes | Installed model id. |
messages | array | yes | Anthropic-style message turns. |
max_tokens | integer | yes | Maximum tokens to generate. |
Response. Anthropic message object, optionally streamed as events.
Example request:
curl http://127.0.0.1:1337/anthropic/v1/messages \
-H 'Content-Type: application/json' \
-d '{
"model": "qwen35-7b-4bit",
"max_tokens": 256,
"messages": [{"role": "user", "content": "Hello"}]
}'