CoderPlan vs Apertis vs Weave Router vs Otari: API Gateways for Claude Code Compared (2026)

Four ways to put an API gateway in front of Claude Code, Codex CLI, and other coding agents: CoderPlan, Apertis, Weave Router, and Otari compared on pricing, models, self-hosting, and setup, checked against official docs in October 2026.

• Dosa AI Tools • 9 min read claude-code api-gateway llm-router coderplan
In this article · 11 sections

Sooner or later, every heavy Claude Code user asks the same question: can I point this at something other than my Anthropic login? Maybe you want pay-as-you-go billing instead of a subscription window, one key that works across Claude Code, Codex CLI, and Cursor, a router that sends easy turns to cheaper models, or a company gateway that keeps provider keys off developer laptops. All of these are “API gateways,” but they solve very different problems.

This guide compares four that people search for most on this site: CoderPlan, Apertis, Weave Router, and Otari. I read each product’s official site, docs, pricing page, and GitHub repository on October 24, 2026, and every claim links to the page it came from.

How a Gateway Plugs Into Claude Code

Claude Code’s own LLM gateway docs explain the mechanics. You set ANTHROPIC_BASE_URL to the gateway and give Claude Code a gateway credential through ANTHROPIC_AUTH_TOKEN (a bearer token), ANTHROPIC_API_KEY (an x-api-key header), or an apiKeyHelper, as described in the connection guide. Three details from those docs matter before you pick anything:

  1. A gateway credential replaces your subscription. While it is active, requests do not use your claude.ai login, and your subscription’s usage limits do not apply. You pay whatever the gateway charges instead.
  2. Setting only the base URL is not enough. Without a gateway credential, requests still go through the gateway, but your saved claude.ai login stays the active credential, so its limits and billing still apply.
  3. Anthropic does not support non-Claude models through a gateway. The docs state that Anthropic “doesn’t support routing Claude Code to non-Claude models through any gateway,” and that it does not endorse, maintain, or audit third-party gateway products. Some tools below do route other models into Claude Code. That can work, but you are on your own when a feature breaks.

The Short Answer

  • Pick CoderPlan if you are an individual developer, especially in China, who wants pay-as-you-go credit that never expires and a one-line base URL for Claude Code, Codex CLI, Gemini CLI, and Cursor.
  • Pick Apertis if you want a hosted gateway with fixed monthly quotas, 350+ models, virtual keys, budgets, and a trust center you can show your security team.
  • Pick Weave Router if your goal is a lower bill: it scores each request and sends it to the cheapest model likely to succeed, and it is Apache-2.0 if you want to self-host.
  • Pick Otari if your company wants to run its own gateway, keep provider keys server-side, and enforce budgets per user, built by Mozilla.ai and Apache-2.0 licensed.

At a Glance

CategoryCoderPlanApertisWeave RouterOtari
MakerCoderPlanSTIMA AI LLCWeaveMozilla.ai
What it isHosted pay-as-you-go API access and billing layerHosted model gateway with routing, budgets, and failoverCost-aware model router for coding agentsSelf-hosted LLM gateway
Open sourceNoNoYes, Apache-2.0Yes, Apache-2.0
Self-hostNo, hosted onlyNo, hosted (Team Gateway pilots on request)Yes (--local), or managedYes (Docker), plus optional hosted control plane
API formatsAnthropic-style and OpenAI-compatible (/v1)OpenAI-compatible plus Anthropic MessagesAnthropic, OpenAI, and Gemini-compatibleOpenAI and Anthropic-compatible
ModelsClaude, GPT, Gemini, Grok, MiniMax, and more350+ models from 30+ providersA pool including Claude, GPT, DeepSeek, GLM, and Gemini40+ providers through any-llm
PricingPay-as-you-go credit, never expiresLite $12, Pro $25, Plus $60, Max $200 per month, or pay-as-you-go5% of routed spend, Code Max $10/month, Code Boost $100/monthFree to self-host; you pay providers
Best forIndividuals who want metered billingTeams that want a hosted, governed gatewayCutting cost per taskCompanies that want to own the gateway

CoderPlan: Metered Billing for Individual Developers

CoderPlan’s llms.txt describes it as a third-party API access and billing layer for AI coding tools, aimed mainly at developers in China. It is just as clear about what it is not: not a browser or system proxy, not a shared account pool, and not a promise of fixed monthly subscription access. You buy credit, it never expires, and every call shows tokens, cache savings, and cost.

Setup for Claude Code is two variables, per the Claude Code setup doc: ANTHROPIC_BASE_URL=https://api.coderplan.ai (without /v1) and ANTHROPIC_AUTH_TOKEN set to your CoderPlan sk- key. There are matching guides for Codex CLI, Gemini CLI, Cursor, Cline, Continue, Aider, OpenClaw, and Hermes Agent.

Pricing deserves a careful read. The machine-readable price list quotes a base price per million tokens and then a multiplier per usage group. On the day I checked, Claude models used through the claudecode group carried a 1.5x multiplier, while GPT models in the codex group carried 0.35x. Some newer models are billed by a usage-dependent expression rather than a flat rate. Run your real workload for a day and compare the bill with your current plan before you move a team over.

Apertis: A Hosted Gateway With Quotas and Governance

Apertis positions itself as model supply and delivery infrastructure for AI agents. The core features are virtual keys, budgets, model policy, routing health, and failover, behind an OpenAI-compatible API with an Anthropic Messages endpoint as well. Its catalog lists 350+ models from 30+ providers, including OpenAI, Anthropic, Google, DeepSeek, and China-region providers.

The homepage facts list subscription tiers of Lite at $12, Pro at $25, Plus at $60, and Max at $200 per month, each with a defined quota, plus pay-as-you-go top-ups. On the subscribe page, quarterly billing lowers the monthly rate, for example Lite at $11 per month for 600 quotas and Max at $180 per month for 3,000 quotas. Apertis says Claude Code, OpenCode, Cursor, Cline, Kilo Code, and Hermes Agent can connect when the installed version supports a custom OpenAI-compatible or Anthropic endpoint.

What sets it apart from CoderPlan is the governance layer: a Trust Center with security controls and subprocessors, and a request form for a DPA or HIPAA BAA. If a procurement team will ask questions, Apertis has more answers ready.

Weave Router: Route Each Turn to the Cheapest Model That Works

Weave Router is a different idea. Instead of one endpoint for one model, it scores every agent request and sends it to the cheapest model in its pool that is likely to succeed, escalating to a frontier model when a task looks hard. It is cache-aware, so it avoids switching models mid-session in a way that throws away an expensive prompt cache. It can also use the flat-rate subscriptions you already pay for first, which Weave describes as “Claude inside Codex. GPT inside Claude Code.” Remember the Anthropic note above: non-Claude models inside Claude Code are not supported by Anthropic.

Setup is one command. The GitHub README shows npx @weave-os/router with flags such as --claude, --codex, and --opencode, --scope project to commit per-repo settings, and --local to point at a self-hosted router on localhost:8080. The code is Apache-2.0 and had about 5.6K stars on October 24, 2026.

The managed service charges 5% of routed spend. Code Max is $10 per month and routes across open-source models only, Code Boost is $100 per month and adds OpenAI and Anthropic models, and Enterprise runs on-prem at custom pricing. Weave publishes a benchmark where the router scores 62.1% on Terminal-Bench 4.0 at about half the cost of a single frontier model. That is a vendor benchmark, so treat it as a starting point and measure your own tasks.

Otari: Run Your Own Gateway

Otari is Mozilla.ai’s open-source gateway, Apache-2.0 licensed and built on its any-llm library. It sits between your applications and model providers. It authenticates requests, resolves provider credentials, checks budgets before dispatch, and records usage afterwards. You get one OpenAI- and Anthropic-compatible endpoint for 40+ providers, and the provider keys never leave the gateway.

You run it yourself with Docker and your own database, and the gateway docs cover configuration. Otari issues revocable virtual keys scoped by user, workspace, and model, which maps neatly onto Anthropic’s recommended rollout: one provider credential on the gateway, one gateway credential per developer, distributed through managed settings. The trade-off is the one Anthropic’s docs warn about: the gateway becomes infrastructure you operate, and it must keep up with new Claude Code features as they ship.

Pricing, Side by Side

PlanCoderPlanApertisWeave RouterOtari
FreeSignup trial credit may be offeredNo-cost model routes listed in the catalogSelf-host free (Apache-2.0)Self-host free (Apache-2.0)
Pay as you goBase price per 1M tokens x group multiplierCredit top-ups, no minimum spend5% of routed spendProvider prices only
SubscriptionsNoneLite $12, Pro $25, Plus $60, Max $200 per month (lower billed quarterly)Code Max $10, Code Boost $100 per monthNone
EnterpriseNot listedTeam Gateway pilots, DPA and HIPAA BAA on requestOn-prem, customHybrid mode with the hosted otari.ai control plane

To compare any of these against a straight Claude or ChatGPT subscription, plug your usage into the AI Cost Calculator.

Which One Should You Pick?

  1. You are one developer and hate subscription windows: CoderPlan, as long as the group multipliers work out for the models you use.
  2. You manage a team and need budgets, keys, and a security story without running servers: Apertis.
  3. Your bill is the problem: Weave Router. Start with the self-hosted version and measure task success before you trust the savings.
  4. Your company wants full control and no third party in the request path: Otari.
  5. You only use Claude models and want Anthropic support: use a gateway as a pass-through to Claude only, or stay on your subscription. Routing other models into Claude Code is unsupported.

Switching gateways is easy because they all speak the same API formats. Switching agents is harder, so keep your project instructions portable with the Rules Converter.

FAQ

Can I use my Claude Pro or Max subscription through a gateway? Not as a credential. Claude Code’s docs say that while a gateway credential is active, requests do not carry your claude.ai login and the subscription limits do not apply. You are billed by the gateway instead.

Is it safe to send my code through a third-party gateway? Every prompt and file the agent reads passes through it. Read the provider’s privacy policy and data retention terms first. Self-hosting Otari or Weave Router keeps the request path inside your own infrastructure.

Does Anthropic support these gateways? Anthropic says any gateway that exposes a supported API format works, but it does not endorse, maintain, or audit third-party gateway products, and it does not support non-Claude models in Claude Code.

Which gateways also work with Codex CLI? CoderPlan has a Codex CLI guide, Weave Router has a --codex setup flag, and Apertis and Otari both expose OpenAI-compatible endpoints.

What should I read next? If you are still choosing the agent itself, read OpenCode vs Claude Code vs Codex CLI. For more options, see CoderPlan alternatives and Claude Code alternatives.

Sources

All facts were checked on October 24, 2026. Prices and model lists change often, so confirm on the official pages before you buy:

Share

Discuss with AI

© 2026 dosa.dev