Skip to main content
Native Anthropic Messages API. Body is forwarded verbatim to Anthropic for Claude models, or translated to OpenAI Chat Completions shape for everything else.

Endpoint

POST https://api.qlaud.ai/v1/messages

Auth

x-api-key: qlk_live_...
anthropic-version: 2023-06-01

Request body

Standard Anthropic Messages shape. See Anthropic’s docs for the full schema. Notable extras:
  • cache_control: ephemeral markers are forwarded to Anthropic upstream verbatim. ~75% input-cost reduction on cached blocks.
  • model accepts any qlaud catalog slug (see /models for the full list).

Example

curl https://api.qlaud.ai/v1/messages \
  -H "x-api-key: $QLAUD_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-sonnet-4-6",
    "max_tokens": 1024,
    "messages": [{"role":"user","content":"hello"}]
  }'

Response

Standard Anthropic Messages response. usage field powers our metering.

Errors

StatusMeaning
401Bad / revoked qlk key
402Wallet exhausted OR per-key cap exceeded
404Unknown model slug
429Upstream rate-limited
5xxUpstream returned 5xx — retry with backoff