Anthropic Messages

POST
/v1/router/anthropic/v1/messages

Proxy to Anthropic Messages API endpoint. Supports streaming via SSE.

Authorization

AuthorizationBearer <token>

API key as Bearer token: Authorization: Bearer dp_sk_xxx

In: header

Header Parameters

x-session-id?string

Public session affinity key. Body session_id takes precedence.

Lengthlength <= 256

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/router/anthropic/v1/messages" \  -H "Content-Type: application/json" \  -d '{    "model": "string",    "messages": [      {        "role": "user",        "content": "string"      }    ],    "max_tokens": 0  }'
{  "id": "string",  "type": "string",  "content": [    {}  ]}