Documentation

One-block setup for Claude Code, OpenClaw, Hermes Agent, and Cursor.

Available Models

Model IDDescription
claude-opus-4-8Most capable
claude-opus-4-7Opus 4.7
claude-opus-4-6Opus 4.6
claude-sonnet-4-6Balanced (recommended)
gpt-5.5OpenAI

1. Claude Code

Edit or create ~/.claude/settings.json. Add the "env" block below. If you already have a settings.json, just merge the "env" key into your existing file.

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.crouter.dev",
    "ANTHROPIC_AUTH_TOKEN": "cr_sk_your_key_here",
    "ANTHROPIC_MODEL": "claude-sonnet-4-6",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-8"
  }
}

After saving, open a terminal, navigate to your project folder, and run:

claude

Select "Trust This Folder" when prompted. You're done - Claude Code is now using Crouter.

2. OpenClaw

Option A - Interactive setup

openclaw onboard
  1. Select "Custom Provider (Any OpenAI or Anthropic compatible endpoint)"
  2. Base URL: https://api.crouter.dev/v1
  3. API Key: cr_sk_your_key_here
  4. Compatibility mode: openai
  5. Model ID: claude-sonnet-4-6-thinking

Option B - Manual config

Edit ~/.openclaw/openclaw.json and add a "crouter" provider inside "models.providers":

{
  "models": {
    "providers": {
      "crouter": {
        "baseUrl": "https://api.crouter.dev/v1",
        "apiKey": "cr_sk_your_key_here",
        "api": "openai-completions",
        "models": [
          { "id": "claude-sonnet-4-6", "name": "Sonnet 4.6", "contextWindow": 1000000 },
          { "id": "claude-opus-4-8", "name": "Opus 4.8", "contextWindow": 1000000 },
          { "id": "claude-opus-4-7", "name": "Opus 4.7", "contextWindow": 1000000 },
          { "id": "claude-opus-4-6", "name": "Opus 4.6", "contextWindow": 1000000 },
          { "id": "gpt-5.5", "name": "GPT-5.5", "contextWindow": 1000000 }
        ]
      }
    }
  }
}

Then restart: openclaw gateway start

3. Hermes Agent

Option A - Interactive setup (recommended)

hermes model
  1. Select "Custom endpoint (self-hosted / VLLM / etc.)"
  2. Enter URL: https://api.crouter.dev/v1
  3. Enter API key: cr_sk_your_key_here

Verify: hermes doctor

Option B - Manual config

Edit ~/.hermes/config.yaml:

model:
  default: "claude-sonnet-4-6"
  provider: "custom"
  base_url: "https://api.crouter.dev/v1"

Option C - Environment variables

export OPENAI_BASE_URL="https://api.crouter.dev/v1"
export OPENAI_API_KEY="cr_sk_your_key_here"

hermes

4. Cursor IDE

  1. Open Settings (Cmd+, on Mac, Ctrl+, on Windows).
  2. Click "Models" in the left sidebar.
  3. Expand the "API Keys" section.
  4. Enable "Override OpenAI Base URL".
  5. Enter the base URL: https://api.crouter.dev/v1
  6. Paste your Crouter API key (cr_sk_...) into the "OpenAI API Key" field.
  7. Click the verify button next to the API Key field.
  8. Under Models, click "View All Models""Add Custom Model".
  9. Enter claude-sonnet-4-6 and click "Add".
  10. Enable the model and select it in the chat panel.

Basic API (Use Anywhere)

Anthropic format - POST /v1/messages

curl https://api.crouter.dev/v1/messages \
  -H "Authorization: Bearer cr_sk_your_key_here" \
  -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"}]
  }'

OpenAI format - POST /v1/chat/completions

curl https://api.crouter.dev/v1/chat/completions \
  -H "Authorization: Bearer cr_sk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.5",
    "messages": [{"role": "user", "content": "Hello"}]
  }'