Documentation

Complete integration guide for Claude Code, Cursor, Windsurf, Openclaw, Hermes Agent, and custom applications.

Quick Start

1. Get your API key

Sign up with Google and copy your API key from the dashboard.

2. Configure your tool

Update your API configuration in your AI tool or application:

Base URL: https://api.crouter.dev
API Key: cr_sk_your_key_here

3. Start building

That's it! Your tool will now use Crouter for all API calls. Switch between Claude, GPT, and Gemini models anytime.

Integration Guides

Claude Code

In Claude Code settings, set the API base URL to https://api.crouter.dev and use your Crouter API key.

Cursor

Go to Settings → Models → Override OpenAI Base URL with https://api.crouter.dev and add your API key.

Windsurf

Configure the API endpoint in Windsurf settings to point to Crouter's base URL with your API key.

Openclaw

Set base URL to https://api.crouter.dev in Openclaw config. Works with all Claude models.

Hermes Agent

Configure Hermes to use Crouter's API endpoint for cost-effective AI agent operations.

Custom Apps

Use our API endpoints directly in your SaaS app. Full Anthropic & OpenAI compatibility.

Available Models

Claude Models

claude-haiku-4-5-20251001Fast & efficient
claude-sonnet-4-6-thinkingBalanced performance
claude-opus-4-6-thinkingMost capable

GPT Models

gpt-5.1
gpt-5.1-codex
gpt-5.1-codex-max
gpt-5.2
gpt-5.2-codex
gpt-5.3-codex

Gemini Models

gemini-3.1-pro
gemini-3.1-pro-high

API Reference

Base URL

https://api.crouter.dev

Authentication

Include your API key in the request headers:

x-api-key: cr_sk_your_key_here

Endpoints

POST/v1/messages

Claude-compatible endpoint for all models. Supports streaming, caching, and all Anthropic API features.

POST/v1/chat/completions

OpenAI-compatible endpoint for GPT and Gemini models.

Example Request

Here's a basic example using curl:

curl https://api.crouter.dev/v1/messages \
  -H "x-api-key: cr_sk_your_key_here" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-sonnet-4-6-thinking",
    "max_tokens": 1024,
    "messages": [
      {
        "role": "user",
        "content": "Hello, Claude!"
      }
    ]
  }'

Prompt Caching

Crouter supports Anthropic's prompt caching for Claude models. Cache frequently used context to reduce costs by up to 90%.

How it works

  • Mark content blocks with cache_control
  • Cached content is reused across requests for 5 minutes
  • Cache reads cost 80% less than regular input tokens
  • Perfect for large codebases, documentation, or system prompts

Example

{
  "model": "claude-sonnet-4-6-thinking",
  "max_tokens": 1024,
  "system": [
    {
      "type": "text",
      "text": "You are a helpful coding assistant...",
      "cache_control": { "type": "ephemeral" }
    }
  ],
  "messages": [...]
}

Pricing

Pay only for what you use. No subscriptions, no monthly fees. Balance never expires.

Claude Haiku

$0.12 / 1M

input tokens

Claude Sonnet

$0.42 / 1M

input tokens

Claude Opus

$0.84 / 1M

input tokens

See full pricing on the homepage.

Support

Need help? Have questions? We're here for you.

Contact Support