Skip to content

Anthropic-compatible API

Reference for using the Qiuqiu Token Anthropic-compatible API, including use cases, authentication, paths, and request format.

Use the Anthropic-compatible API for Claude Code, Claude Desktop, Cherry Studio’s Anthropic provider, or applications that call the Messages endpoint directly.

When a client asks for a Claude, Anthropic, or Gateway Base URL, use the root URL without appending /v1. When you send HTTP requests yourself, call the Messages path under that root URL.

  • Base URL: https://api.qiuqiutoken.net
  • Request path: /v1/messages
  • Full request URL: https://api.qiuqiutoken.net/v1/messages
POST/v1/messages

Use an API token created in the console. For Claude, Anthropic clients, or Claude models, choose the matching token group; do not leave the token in the default group.

For direct HTTP requests, include these headers:

http
content-type: application/json
x-api-key: sk-your-token
anthropic-version: 2023-06-01

Claude Desktop’s third-party inference settings do not ask you to write raw headers. In that client, set Gateway auth scheme to bearer.

Replace <model-id> with an available Claude model name from the Model Catalog, and replace sk-your-token with an API token from the matching group.

bash
curl https://api.qiuqiutoken.net/v1/messages \
-H "content-type: application/json" \
-H "x-api-key: sk-your-token" \
-H "anthropic-version: 2023-06-01" \
-d '{
  "model": "<model-id>",
  "max_tokens": 1024,
  "messages": [
    { "role": "user", "content": "Hello" }
  ]
}'
  • When switching routes, replace only the Base URL. Keep the API token, model name, and token group unchanged.
  • The model name must match an available name in the Model Catalog. For model 404s, check the model name and token group first.