LogoOpenClawRouter/
DashboardAccountAPI KeysBillingTransactionsAPI DocsAboutContact
API Reference

OpenClawRouter API

Route requests to the best AI models from Anthropic, OpenAI, and Google. One API key, every frontier model, 25% off official pricing.

Get API KeyQuickstart Guide
SOC2 Ready
99.9% Uptime
Global Edge
OverviewQuickstartAuthenticationProvidersModels & PricingAPI EndpointsTool IntegrationRate LimitsUsage & Billing

Overview

OpenClawRouter is an AI model routing service that provides unified access to frontier AI models from multiple providers through a single API. We negotiate enterprise-grade pricing with Anthropic, OpenAI, and Google, passing 25% savings to developers.

25%
Off official pricing
11+
Frontier models
3
Providers routed

Base URL: https://openclawrouter.dev/api/v1

Quickstart

Get started in under 2 minutes. Create an account, get your API key, and make your first request.

1. Get your API key

Sign up and navigate to Settings → API Keys to create your key. Keys are prefixed with cr_.

2. Make your first request

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

3. Or use the OpenAI-compatible endpoint

python
from openai import OpenAI

client = OpenAI(
    base_url="https://openclawrouter.dev/api/v1/codex",
    api_key="cr_YOUR_API_KEY",
)

response = client.chat.completions.create(
    model="gpt-5.1-codex",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)

Authentication

All API requests require authentication via an API key. Include your key in the request headers.

Anthropic-compatible endpoints

x-api-key: cr_YOUR_API_KEY

OpenAI-compatible endpoints

Authorization: Bearer cr_YOUR_API_KEY

Gemini-compatible endpoints

x-goog-api-key: cr_YOUR_API_KEY

Security: Never expose your API key in client-side code. Always make API calls from your backend server.

Providers

OpenClawRouter routes to these providers through our enterprise agreements:

A

Anthropic

  • Claude Opus 4.6
  • Claude Sonnet 4.5
O

OpenAI

  • GPT-5.3 Codex
  • GPT-5.2
  • GPT-5.1
  • GPT-5.1 Codex
  • GPT-5.1 Codex Max
G

Google

  • Gemini 3 Pro Preview
  • Gemini 3 Flash Preview
  • Gemini 2.5 Pro
  • Gemini 2.5 Flash

Models & Pricing

All prices are per million tokens (MTok). OpenClawRouter pricing shown alongside official pricing for comparison.

ModelProviderContextInput(official)Output(official)Tier
Claude Opus 4.6Anthropic200K$1.00$5.00$5.00$25.00Business
Claude Sonnet 4.5Anthropic200K$0.60$3.00$3.00$15.00Starter
GPT-5.3 CodexOpenAI128K$0.35$1.75$2.80$14.00Max
GPT-5.2OpenAI128K$0.35$1.75$2.80$14.00Max
GPT-5.1OpenAI128K$0.25$1.25$2.00$10.00Starter
GPT-5.1 CodexOpenAI128K$0.25$1.25$2.00$10.00Pro
Gemini 3 Pro PreviewGoogle1M$0.80$4.00$3.60$18.00Max
Gemini 3 Flash PreviewGoogle1M$0.10$0.50$0.60$3.00Starter
Gemini 2.5 ProGoogle1M$0.50$2.50$3.00$15.00Pro
Gemini 2.5 FlashGoogle1M$0.06$0.30$0.50$2.50Starter

100 credits = $1.00 USD. Credits are deducted based on actual token usage.

API Endpoints

POSTAnthropic Messages API

Compatible with Anthropic's Messages API. Use for Claude models.

http
POST https://openclawrouter.dev/api/v1/messages
Content-Type: application/json
x-api-key: cr_YOUR_API_KEY
anthropic-version: 2023-06-01

{
  "model": "claude-sonnet-4-5-20250929",
  "max_tokens": 1024,
  "messages": [
    {"role": "user", "content": "Explain quantum computing in simple terms."}
  ]
}

POSTOpenAI Chat Completions

Compatible with OpenAI's Chat Completions API. Use for GPT/Codex models.

http
POST https://openclawrouter.dev/api/v1/codex/chat/completions
Content-Type: application/json
Authorization: Bearer cr_YOUR_API_KEY

{
  "model": "gpt-5.1-codex",
  "messages": [
    {"role": "user", "content": "Write a Python fibonacci function."}
  ],
  "stream": true
}

POSTGemini API

Compatible with Google's Gemini API. Use for Gemini models.

http
POST https://openclawrouter.dev/api/v1/gemini/chat/completions
Content-Type: application/json
Authorization: Bearer cr_YOUR_API_KEY

{
  "model": "gemini-2.5-flash",
  "messages": [
    {"role": "user", "content": "Summarize this codebase."}
  ]
}

POSTUnified Chat (Streaming)

Our unified endpoint that works with any model across all providers.

http
POST https://openclawrouter.dev/api/v1/chat
Content-Type: application/json
Authorization: Bearer cr_YOUR_API_KEY

{
  "model": "claude-opus-4-6",
  "messages": [
    {"role": "user", "content": "Review this pull request."}
  ],
  "stream": true
}

Tool Integration

Drop OpenClawRouter into your existing AI coding tools. Just change the base URL.

Claude Code

Set the environment variable before running Claude Code:

bash
export ANTHROPIC_BASE_URL=https://openclawrouter.dev/api/v1
export ANTHROPIC_API_KEY=cr_YOUR_API_KEY
claude

Codex CLI

Route Codex CLI through OpenClawRouter:

bash
export OPENAI_BASE_URL=https://openclawrouter.dev/api/v1/codex
export OPENAI_API_KEY=cr_YOUR_API_KEY
codex

Gemini CLI

Route Gemini CLI through OpenClawRouter:

bash
export GEMINI_API_BASE_URL=https://openclawrouter.dev/api/v1/gemini
export GEMINI_API_KEY=cr_YOUR_API_KEY
gemini

OpenClaw

Configure OpenClaw to use OpenClawRouter as the provider:

json
{
  "models": {
    "providers": {
      "ocr-claude": {
        "baseUrl": "https://openclawrouter.dev/api/v1",
        "apiKey": "cr_YOUR_KEY",
        "api": "anthropic-messages",
        "models": [
          { "id": "claude-opus-4-6" },
          { "id": "claude-sonnet-4-5-20250929" }
        ]
      },
      "ocr-codex": {
        "baseUrl": "https://openclawrouter.dev/api/v1/codex",
        "apiKey": "cr_YOUR_KEY",
        "api": "openai-responses"
      },
      "ocr-gemini": {
        "baseUrl": "https://openclawrouter.dev/api/v1/gemini",
        "apiKey": "cr_YOUR_KEY",
        "api": "openai-completions"
      }
    }
  }
}

OpenCode

Configure OpenCode (~/.config/opencode/opencode.json):

json
{
  "provider": "anthropic",
  "baseUrl": "https://openclawrouter.dev/api/v1",
  "apiKey": "cr_YOUR_KEY",
  "model": "claude-sonnet-4-5-20250929"
}

Rate Limits

Rate limits are applied per API key to ensure fair usage across all users.

TierRequests / minRequests / hourTokens / min
Starter1060100K
Pro30300500K
Max606001M
Business120UnlimitedUnlimited

Rate limit headers are included in every response:

http
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 59
X-RateLimit-Reset: 1706745600
Retry-After: 60

Usage & Billing

OpenClawRouter uses a simple credit-based billing system. Buy credits, use them on any model.

How credits work

  • 100 credits = $1.00 USD
  • Credits are deducted based on actual token usage
  • No subscription required — buy credits anytime
  • Higher top-ups unlock more models and bonus credits
  • View real-time usage on your dashboard

Tier unlocks

Your tier is determined by cumulative top-up amount. Higher tiers unlock more models:

$4.99+
Starter
$49.99+
Pro
$99.99+
Max + API
$299.99+
Business

Ready to get started?

Create your account, top up credits, and start routing AI models in under 2 minutes.

Get API KeyView Pricing
Logo
OpenClawRouterFrontier Models, Routed Smarter
GitHubLinkedInYouTubeEmail
Product
  • Chat
  • API
  • Pricing
  • API Docs
Company
  • About
  • Contact
  • Cookie Policy
  • Privacy Policy
  • Terms of Service
  • Refund Policy
All systems normal
•Built from California with Love ❤️
© Copyright 2026. All Rights Reserved.