Messages (Anthropic)
POST /v1/messages — for Claude Code and Anthropic-style clients.
bash
curl https://api.hoyoai.cn/v1/messages \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "anthropic-version: 2023-06-01" \
-d '{"model":"claude-sonnet-4-6","max_tokens":1024,"messages":[{"role":"user","content":"Hello"}]}'Point Anthropic Base URL to https://api.hoyoai.cn and use your HOYOAI key.