[KongchangAI]
· 3 min read· 1,586 words

AtmoRouter: A Cheaper OpenRouter Alternative with Pay-Per-Token Billing

AtmoRouter: A Cheaper OpenRouter Alternative with Pay-Per-Token Billing

AtmoRouter takes on OpenRouter and Command Code with pay-per-token billing below official prices.

The article compares three LLM API middleware models: OpenRouter passes through provider prices plus a 5.5% top-up fee, Command Code uses monthly plans with credit caps, and newcomer AtmoRouter offers no subscription, pay-per-token billing, with frontier models priced well below OpenRouter—GPT-6 Astra input at just 1%. It supports OpenAI/Anthropic compatibility, two-line migration, precise metering, cached-input discounts, SSE streaming, key-level controls, and no billing on failures.

The LLM API middleware space is splitting into three distinct business models: markup-based pure aggregation like OpenRouter, subscription-based bundled packages like Command Code, and a more aggressive new approach—pay-per-token, no monthly fee, with prices pushed directly below official rates. Newcomer AtmoRouter has chosen the third path.

AtmoRouter: A Cheaper OpenRouter Alternative

Three-Way Battle Among API Gateways: Aggregation, Subscription, and Pay-As-You-Go

OpenRouter's pricing logic is transparent. According to its FAQ, it passes through provider prices at cost without taking a margin, instead charging a 5.5% fee on top-ups (minimum $0.80), or 5% for crypto payments. This model means virtually every model you call is priced at official rates.

Command Code takes the subscription route. The Go plan is $1/month, GOAT $10/month, Pro $20/month, and Max 10× $100/month, each bundled with a certain credit pool—but credits are subject to 5-hour and weekly usage caps, and lower-tier plans have per-model quota limits. The pure-API Provider plan costs $15/month.

AtmoRouter proposes a third option: no subscription, no seat limits, no minimum spend, with per-token rates for many models set directly below official prices.

What Is an API Middleware Layer (LLM Router)

An API middleware layer is a proxy service sitting between developers and model providers. It exposes a unified interface externally (usually OpenAI-compatible) while internally routing requests to different model providers. Its reason for existing stems from three practical problems: first, there are many model providers, each with different API formats, authentication methods, and billing metrics, making one-by-one integration costly; second, a single provider may rate-limit, go down, or raise prices, requiring automatic failover; third, developers want unified cost and usage metering by model, by key, and by project. The middleware itself doesn't train models; its commercial value depends on two things: whether it can secure upstream capacity at lower prices (e.g., bulk purchasing, regional price differences, or special-rate resources), and whether it can provide engineering capabilities in routing, metering, and availability that upstream providers lack.

Price Comparison: AtmoRouter vs OpenRouter

Measured in USD per million tokens, the table below draws on the public /models APIs of both services:

ModelOpenRouter (input/output)AtmoRouter model IDAtmoRouter (input/output)
Claude Sonnet 5.5$2.00 / $10.00cc/claude-sonnet-5-5$0.50 / $2.50
Claude Sonnet 4.6$3.00 / $15.00cc/claude-sonnet-4-6$0.75 / $3.75
Claude Opus 4.6$5.00 / $25.00cc/claude-opus-4-6$1.25 / $6.25
GPT-6 Astra$10.00 / $50.00cx/gpt-6-astra$0.10 / $0.50
GPT-6 Sol$2.00 / $10.00cx/gpt-6-sol$0.045 / $0.225

A few things to note: the numbers listed by OpenRouter are pass-through list prices, and the 5.5% top-up fee is charged separately. AtmoRouter often lists the same model under multiple upstream families (e.g., the ag/, cc/, cx/ prefixes), each variant having its own price, context window, and capacity pool—the table above lists only one option per model. To see all variants, call the /v1/models endpoint.

Take GPT-6 Astra: AtmoRouter's input price is just 1% of OpenRouter's. If this price gap holds long-term, the difference is considerable for developers making high-volume calls to frontier models.

Cached Input (Prompt Caching) and Billing Metrics

"Cached input is billed at 10% of the input price" refers to the Prompt Caching mechanism offered by LLM providers: when the prefix portion of a request (typically system prompts, long documents, or tool definitions) repeats a recent request, upstream can reuse that KV Cache to avoid redundant computation, greatly reducing cost. Common implementations include Anthropic's Prompt Caching (explicitly marked with cache_control) and OpenAI's automatic prefix caching. Different providers offer different discounts on cached tokens, typically 10% to 25% of the normal input price. Note that cache hits depend on an identical prefix and being within the upstream's cache validity window; caching often can't be shared across providers when routing, so whether the middleware passes through the provider's usage field (including cache read/write token counts) directly determines billing accuracy. The publicly disclosed billing formula isolates cached and applies a 0.10 coefficient precisely so users can verify every charge.

Core Features: Compatibility and Engineering Details

AtmoRouter positions itself as a drop-in replacement for the OpenAI API. You only need to change the base URL and API key; existing SDK code requires no changes. Anthropic-compatible clients can connect as well.

A few engineering details worth noting:

Routing to healthy capacity. Exhausted or degraded upstreams are automatically skipped, so requests don't fail because a provider is temporarily unavailable.

Token-precise metering. Input and output are priced separately, calculated based on the usage report returned by upstream. Cached input is billed at 10% of the input price.

True streaming. Full SSE pass-through using the OpenAI format, with the final frame carrying usage information. Stopping the stream stops billing.

Key-level controls. You can create unlimited keys, each with independent rate limits and model allowlists.

Auditable usage. Every request logs token counts, latency, and cost, with export support.

Failed requests aren't billed. If an upstream request fails, no charge is incurred. Each response also includes an X-Atmorouter-Cost header showing the exact amount deducted for that call.

The billing formula is also public:

cost = ((in − cached) × input_price + cached × input_price × 0.10 + out × output_price) / 1M

Top-ups are made via USDC on Solana or QRIS payment, with no bank card required and no recurring charges. When the balance is insufficient, new requests are blocked—no overdraft.

SSE Streaming and Usage in the Final Frame

SSE (Server-Sent Events) is a text-stream protocol based on HTTP long connections, and it's the standard way OpenAI, Anthropic, and other APIs return streaming output. Under streaming, the model pushes incremental content token by token, letting clients render as they receive, with first-byte latency significantly lower than waiting for a complete response. The problem is billing: if a response is interrupted midway, how many tokens did the server actually process? OpenAI supports stream_options: {"include_usage": true} in streaming responses, which carries the full prompt_tokens, completion_tokens, and cache details in the last data frame (usually with empty content and finish_reason already set). If the middleware fully passes through this frame, users get a bill consistent with actual request consumption; conversely, if the middleware truncates or rewrites the last frame, billing becomes inaccurate. The statement "stopping the stream stops billing" depends precisely on upstream billing by actual generated tokens.

Two Lines of Code to Migrate

If you're already using the OpenAI SDK to call OpenRouter, migrating requires changing just two things:

from openai import OpenAI

client = OpenAI(
    # base_url="https://openrouter.ai/api/v1",   # before
    base_url="https://atmorouter.dev/v1",          # after
    api_key="ar-xxxxxxxxxxxx",                     # your AtmoRouter key
)

The Node.js version works the same way. For CLI tools and coding agents, just set environment variables:

export OPENAI_BASE_URL="https://atmorouter.dev/v1"
export OPENAI_API_KEY="ar-xxxxxxxxxxxx"

Be aware of model ID differences. OpenRouter uses formats like anthropic/claude-sonnet-5.5, while AtmoRouter uses cc/claude-sonnet-5-5; the model string needs updating in sync when switching.

Side-by-Side Comparison of the Three Platforms

OpenRouterCommand CodeAtmoRouter
Pricing modelPass-through provider prices + 5.5% top-up feeMonthly plans with credits; $15/month Provider APIPay-per-token, no subscription
Usage limitsProvider rate limitsPlan credits have 5-hour and weekly capsSelf-configured key-level rate limits
OpenAI-compatibleYesYes (Provider plan)Yes
Payment methodsCredit card, Alipay, USDCSubscription + top-upSolana USDC, QRIS

Each of the three positions suits different scenarios. OpenRouter has the most complete model catalog and the richest provider-level routing controls; Command Code is better suited to users who want an out-of-the-box coding agent; AtmoRouter targets developers who are sensitive to per-token costs, don't want subscription lock-in, and want to migrate with minimal code changes.

Who It's For

When choosing an API middleware layer, the most essential judgment criteria are: how large your call volume is, how price-sensitive you are, and whether you're willing to accept subscription-based usage caps.

If your monthly call volume is large and you mainly use frontier models, AtmoRouter's per-token pricing below official rates may be significantly cheaper than the pass-through model. If your call volume is small and you prefer a predictable fixed monthly fee, Command Code's subscription plans are a better fit. If you need the most comprehensive model marketplace and flexible routing strategies, OpenRouter remains a safe choice.

The signup process is simple: register with email, top up with USDC or QRIS, generate an ar- prefixed key, and point your client at https://atmorouter.dev/v1. The entire migration is measured in lines of code, not days.

One-line Summary

AtmoRouter enters the API middleware competition between OpenRouter and Command Code with pay-per-token billing below official rates.

Paragraph Summary

The article compares three business models in the LLM API middleware space: OpenRouter passes through provider list prices and charges a 5.5% top-up fee, Command Code uses monthly plans with credit pools and usage caps, and newcomer AtmoRouter emphasizes no subscription, no minimum spend, pay-per-token billing, with several frontier models priced notably below OpenRouter. Price comparisons show its GPT-6 Astra input price is just 1% of OpenRouter's. On features, AtmoRouter is compatible with OpenAI and Anthropic interfaces, supports two-line-code migration, and offers healthy routing, precise token metering, cached-input discounts, SSE streaming pass-through, key-level rate limiting and allowlists, no billing on failures, and auditable usage. The article argues each model suits different scenarios, with the choice depending on call volume scale and cost sensitivity.

#AtmoRouter#OpenRouter alternative#LLM API gateway#pay-per-token billing#OpenAI-compatible API#API middleware pricing
Share:

Related articles