Documentation
One-block setup for Claude Code, OpenClaw, Hermes Agent, and Cursor.
Available Models
| Model ID | Description |
|---|---|
| claude-opus-4-8 | Most capable |
| claude-opus-4-7 | Opus 4.7 |
| claude-opus-4-6 | Opus 4.6 |
| claude-sonnet-4-6 | Balanced (recommended) |
| gpt-5.5 | OpenAI |
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:
claudeSelect "Trust This Folder" when prompted. You're done - Claude Code is now using Crouter.
2. OpenClaw
Option A - Interactive setup
openclaw onboard- Select "Custom Provider (Any OpenAI or Anthropic compatible endpoint)"
- Base URL:
https://api.crouter.dev/v1 - API Key:
cr_sk_your_key_here - Compatibility mode:
openai - 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- Select "Custom endpoint (self-hosted / VLLM / etc.)"
- Enter URL:
https://api.crouter.dev/v1 - 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"
hermes4. Cursor IDE
- Open Settings (
Cmd+,on Mac,Ctrl+,on Windows). - Click "Models" in the left sidebar.
- Expand the "API Keys" section.
- Enable "Override OpenAI Base URL".
- Enter the base URL:
https://api.crouter.dev/v1 - Paste your Crouter API key (
cr_sk_...) into the "OpenAI API Key" field. - Click the verify button next to the API Key field.
- Under Models, click "View All Models" → "Add Custom Model".
- Enter
claude-sonnet-4-6and click "Add". - 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"}]
}'