Skip to main content
Last updated: 2026-06-16

Bearer Token Authentication

All API requests require an API Key in the header:
Authorization: Bearer YOUR_API_KEY

Getting an API Key

  1. Log in to Crazyrouter
  2. After signing in, go to the Token Management page
  3. Click “Create Token”
  4. Set the token name, quota limit, available models, etc.
  5. Copy the generated key starting with sk-
The API Key is only displayed once at creation time. Please save it securely. If lost, you will need to create a new one.

Usage Examples

For OpenAI-compatible access, use https://api.crazyrouter.com/v1 as the default international address. For East Asia, prefer https://cn.crazyrouter.com/v1. If you are configuring Claude Code, Hermes, OpenClaw, or another client, check API Endpoints first.
curl https://api.crazyrouter.com/v1/chat/completions \
  -H "Authorization: Bearer sk-xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"model": "gpt-5.5", "messages": [{"role": "user", "content": "Hi"}]}'
from openai import OpenAI

client = OpenAI(
    api_key="sk-xxxxxxxx",
    base_url="https://api.crazyrouter.com/v1"
)
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: 'sk-xxxxxxxx',
  baseURL: 'https://api.crazyrouter.com/v1'
});

Token Permission Controls

When creating a token, you can configure:
  • Name: For easy identification of its purpose
  • Quota Limit: Set the maximum available quota
  • Expiration Time: Set a validity period
  • Available Models: Restrict which models can be called
  • IP Whitelist: Restrict the source IPs allowed to make calls