Requests (API)
/v1/messages
Anthropic-compatible endpoint for Claude Code, Cline and the Anthropic SDK.
POST /v1/messages
Anthropic compatible
Request format
Body is the Anthropic shape: model, max_tokens, messages, system, tools. We translate the request upstream and return the response back in Anthropic format, including native SSE events when streaming.
curl https://api.alicode.store/v1/messages \ -H "x-api-key: sk-ali-•••" \ -H "anthropic-version: 2023-06-01" \ -d '{"model":"anthropic/claude-sonnet-4.6","max_tokens":1024,"messages":[{"role":"user","content":"hi"}]}'