Authentication

All requests require an Claudexia API key.

API key format

sk-aw-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Supported auth headers

Anthropic-style requests

Use x-api-key:

bash
curl https://api.claudexia.tech/v1/messages \
  -H "x-api-key: sk-aw-YOUR_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4.5",
    "max_tokens": 256,
    "messages": [{"role": "user", "content": "Hi"}]
  }'

OpenAI-style requests

Use Authorization: Bearer:

bash
curl https://api.claudexia.tech/v1/chat/completions \
  -H "Authorization: Bearer sk-aw-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4.5",
    "messages": [{"role": "user", "content": "Hi"}]
  }'

Both methods work on the main API. The gateway checks x-api-key first and then falls back to Authorization: Bearer.

Per-key controls

Each key can be managed from Dashboard > API Keys:

SettingWhat it does
Rate limitCaps requests per minute for that key
Allowed modelsRestricts which model IDs the key may call
Allowed IDEsRestricts by client / user-agent
IP whitelistRestricts requests to selected IPs
Allowed originsRestricts browser-origin usage
Usage limitCaps total spend for that key
StreamingRequests stream when the client sends "stream": true; send "stream": false for non-streaming

Security tips

  • Keep separate keys for personal use, apps, and automation
  • Freeze or delete unused keys
  • Use model restrictions on budget-sensitive projects
  • Use IP whitelist or origin restrictions when needed
  • Monitor per-key usage from the dashboard