Back to blog
CompareAugust 18, 2026

CloseRouter vs OpenRouter (2026): for Claude Code and Codex

OpenRouter and CloseRouter are hosted LLM gateways: one key, provider/model slugs, OpenAI-compatible /v1. OpenRouter is broader as a catalog and more mature as an ecosystem. CloseRouter is closer if you need a ready path into Claude Code / Codex / Cursor, a RU/EN dashboard, and SBP.

This piece does not pick a market winner. It says what you get after signup and how not to break env.

Sources: OpenRouter FAQ, Claude Code cookbook, Codex cookbook, OR vs LiteLLM, CloseRouter docs and install.sh, PRODUCT.md.

Tl;dr

  • A direct provider API is enough if you have one model and one contract.
  • OpenRouter: large catalog, provider failover, 0% markup on inference, a fee when you buy credits (their FAQ: 5.5% on card, $0.80 minimum; crypto 5%).
  • CloseRouter: the same API class plus a client installer and a RU dashboard. Smaller catalog. Compare prices to official in the live catalog — there is no promised discount on every model.
  • Claude Code env is different on the two gateways. Do not paste an OpenRouter block into CloseRouter.

What OpenRouter is

A hosted layer on Cloudflare’s edge. Your app hits https://openrouter.ai/api/v1; OpenRouter routes to one of 70+ providers (their June 2026 figure). You do not run Postgres or hold upstream keys.

Their FAQ: provider list price on inference; they charge a fee on credit purchases. Prompts are not logged by default; opt-in gives 1% off. Free models: 50 req/day, 1000/day after $10 in credits. Credits can expire after a year unused (their terms).

They publish cookbooks for Claude Code, Codex CLI, Cursor, OpenClaw, Hermes, OpenCode.

What CloseRouter is

Hosted API: https://api.closerouter.dev/v1.

  • POST /v1/chat/completions
  • POST /v1/responses
  • POST /v1/messages
  • GET /v1/models
  • plus image/video endpoints when the model bills that way

Same provider/model slugs. One balance, no subscription. Top-up: card, SBP, crypto. UI in RU and EN. Request/response bodies are not stored for the product or for training (legal). Auto routing plus an optional strict provider chain.

Next to the API: a Linux/macOS/Windows installer and /docs pages per client. PRODUCT.md forbids inventing SLA, customer logos, or a guaranteed discount on everything. Price comparison is only against the current catalog.

Table

CloseRouterOpenRouter
ClassHosted LLM APIHosted LLM API
OpenAI /v1YesYes
Anthropic MessagesYes, host https://api.closerouter.devYes, host https://openrouter.ai/api
CatalogLive /v1/models (smaller)Hundreds of models, 70+ providers
FailoverAuto route + manual chainProvider failover; models array; :nitro / :floor
Claude Code envANTHROPIC_API_KEY, remove AUTH_TOKENANTHROPIC_AUTH_TOKEN, empty API_KEY
CodexBlock + env_key; model_provider by handmodel_provider = "openrouter" + auth.command
AgentsScript + /docsTheir cookbooks
DashboardRU/EN, per-key spend limitEN-first, activity, presets
BillingTokens; card, SBP, cryptoCredits; card, AliPay, USDC
FeesSee catalog vs official5.5% on credit purchase (their FAQ)
Prompt logsBodies not storedOff by default; opt-in 1%

When to use which

OpenRouter if you need the widest catalog, Auto Router, a free tier, cookbooks for ten IDEs, failover across several Anthropic providers.

CloseRouter if the team is installing Codex / Claude Code / Cursor today, wants one RU dashboard, SBP, a per-key limit, and both Anthropic host and OpenAI /v1 on one closerouter_… key.

Direct Anthropic/OpenAI if there is a single provider.

Both keys if OpenRouter’s catalog is occasional and the daily agent sits on CloseRouter. Two [model_providers.*] blocks. Not one env.

LiteLLM if the gateway must live in your network. OpenRouter themselves call that a different class (self-host vs managed). Do not treat CloseRouter as a LiteLLM replacement.

Claude Code: two different envs

OpenRouter (their cookbook)

export ANTHROPIC_BASE_URL="https://openrouter.ai/api"
export ANTHROPIC_AUTH_TOKEN="$OPENROUTER_API_KEY"
export ANTHROPIC_API_KEY=""   # must be empty

Then /logout if you used to be logged into Anthropic, and /status: the auth token should be ANTHROPIC_AUTH_TOKEN.

They warn they only guarantee first-party Anthropic; other providers can break in Claude Code.

CloseRouter

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.closerouter.dev",
    "ANTHROPIC_API_KEY": "YOUR_API_KEY"
  }
}

Delete ANTHROPIC_AUTH_TOKEN. Host without /v1. The native installer does not read a project .env — use ~/.claude/settings.json or the shell profile.

Codex

OpenRouter cookbook: model_provider = "openrouter", base_url = https://openrouter.ai/api/v1, key via auth.command (echo $OPENROUTER_API_KEY). A plain env_key does not refresh their model catalog.

CloseRouter installer writes only:

[model_providers.closerouter]
name = "CloseRouter"
base_url = "https://api.closerouter.dev/v1"
wire_api = "responses"
env_key = "CLOSEROUTER_API_KEY"

Export CLOSEROUTER_API_KEY before launching Codex. To actually use the provider, add one line: model_provider = "closerouter". If the key already exists, replace the value.

Connect CloseRouter in a minute

Key: closerouter.dev/keys.

curl https://api.closerouter.dev/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"anthropic/claude-opus-4.7","messages":[{"role":"user","content":"ok"}]}'
bash <(curl -fsSL https://closerouter.dev/install.sh)

Windows: install.ps1. Cursor: UI, not an env file. JetBrains: Settings → Tools → AI Assistant → Providers & API keys.

Guides: docs/codex, docs/claude.

FAQ

Is this an OpenRouter fork? No.

Who is cheaper? Check live prices. OR has zero inference markup and a deposit fee. CloseRouter vs official is in the catalog, not a fixed percent.

Can I use both? Yes. Different keys.

Why does Claude Code still ask for Anthropic login? CloseRouter: leftover AUTH_TOKEN or settings not applied. OpenRouter: non-empty API_KEY or you skipped /logout.

Does BASE_URL need /v1? Not for CloseRouter, and not for OR’s Claude path (/api).

Tags

openrouter alternativecloserouter vs openrouterllm gatewayclaude codecodex cli