API Protocols

Anthropic Compatible

Claude Code and any Anthropic Messages API client use this protocol. Base URL is the root domain — no `/v1`.

Last updated: 2026-08-03

1

Base URL

Use the root domain without /v1.

Base URL
https://www.apihub.ink
2

Authentication

Claude Code uses ANTHROPIC_AUTH_TOKEN. Direct Messages API requests can use x-api-key and anthropic-version headers.

Environment variables
export ANTHROPIC_BASE_URL="https://www.apihub.ink"
export ANTHROPIC_AUTH_TOKEN="your-apihub-key"
3

Messages API example

The direct request path is /v1/messages; the configured Base URL remains the root domain.

curl
curl https://www.apihub.ink/v1/messages \
  -H "x-api-key: your-apihub-key" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{"model":"deepseek-v4-flash","max_tokens":256,"messages":[{"role":"user","content":"hello"}]}'

Common Errors

  • Adding /v1 to the Anthropic base URL breaks the protocol path.