W / 威肯API 使用文档
开始使用

Anthropic Messages

Anthropic Messages 适合 Claude Code、Anthropic SDK 等使用消息协议的客户端。

最小请求

curl https://panel.weekendapi.site/v1/messages \
  -H "x-api-key: $WEEKENDAPI_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{
    "model": "your-claude-model",
    "max_tokens": 512,
    "messages": [{"role":"user","content":"你好"}]
  }'

请求要点

如果客户端只支持 Authorization Bearer,请按该客户端的 Anthropic 适配说明配置;不要同时发送多个互相冲突的认证值。