Claude Sonnet 5.5 vs Opus 5.5: API price and which to choose

Both models use the same prepaid Code By AI key and the same Anthropic Messages protocol. On Code By AI, Sonnet 5.5 (claude-sonnet-5-5) is $0.50 input / $2.50 output per 1M tokens; Opus 5.5 (claude-opus-5-5) is $1.00 / $5.00. The table also shows official list prices and verified OpenRouter Anthropic Standard rates.

Short answer

For 1M input plus 1M output tokens, Sonnet 5.5 costs $0.50 + $2.50 on Code By AI, while Opus 5.5 costs $1.00 + $5.00; both follow the published fraction of Anthropic’s list price in the catalog.

Token and monthly figures are arithmetic from the current catalog, not a forecast or a measured benchmark. The monthly example excludes cache writes, tools and actual usage differences.

Token prices on the same basis

All values are USD per 1M tokens. Code By AI prices already include the published multiplier. Vendor list prices are shown only when verified. The 5-minute and 1-hour cache writes apply only to Claude and use each platform’s own input rate.

ModelMetricCode By AIOfficial listOpenRouter
Claude Sonnet 5.5claude-sonnet-5-5Input$0.50$2.00$2.00
Cache read$0.025$0.10$0.10
Cache write (5 min)$0.625$2.50$2.50
Cache write (1 hour)$1.00$4.00$4.00
Output$2.50$10.00$10.00
Claude Opus 5.5claude-opus-5-5Input$1.00$4.00$4.00
Cache read$0.05$0.20$0.20
Cache write (5 min)$1.25$5.00$5.00
Cache write (1 hour)$2.00$8.00$8.00
Output$5.00$20.00$20.00

OpenRouter standard endpoint (verified): anthropic/claude-sonnet-5.5 · anthropic · anthropic/claude-sonnet-5.5-20260928 ·

OpenRouter standard endpoint (verified): anthropic/claude-opus-5.5 · anthropic · anthropic/claude-opus-5.5-20260921 ·

OpenRouter cells show a number only when the exact provider model ID and rate basis were checked against this catalog row. Cells marked Not verified have no such evidence. Credit-purchase fees and other OpenRouter plans are separate and are never added to the per-token prices here. OpenRouter pricing and FAQ · FAQ

Unverified rates are not inferred from catalog values. /pricing

Monthly arithmetic example

At 20M input and 2M output tokens per month, priced at catalog rates:

ModelOfficial list / monthCode By AI / month
Claude Sonnet 5.5claude-sonnet-5-5$60.00$15.00
Claude Opus 5.5claude-opus-5-5$120.00$30.00

Which choice fits which work?

Rows restate catalog arithmetic and official guidance. They are not Code By AI benchmarks or measured speed and quality results.

Kind of workStarting pointBasis
Long-running agentic coding, large refactors and complex systems workClaude Opus 5.5Anthropic’s Opus 5.5 overview lists these typical uses.
A fixed token volume where input and output price dominate the decisionCompose from the tableSame-workload example; not a measured benchmark.

How the integration differs

These are wire-level settings readers must configure, not capability claims.

Model IDsclaude-sonnet-5-5 and claude-opus-5-5
ProtocolAnthropic Messages and Claude Code (Anthropic-compatible wire format)
Shared setupANTHROPIC_BASE_URL=https://www.codebyai.net/api/agent and ANTHROPIC_AUTH_TOKEN=<your key>
What changesOnly the `model` value; the key, base URL and protocol stay the same.
Default modelThe catalog default Claude Code model is `claude-sonnet-5`, not these two; pass the model ID explicitly.

FAQ

How do the input and output rates compare on Code By AI?
Per 1M tokens, Sonnet 5.5 and Opus 5.5 cost $0.50 and $1.00 for input, and $2.50 and $5.00 for output, respectively.
Do both models use the same key and endpoint?
Yes. Both use the same prepaid key, the same base URL and the Anthropic Messages protocol. Change only the model ID.
Are these the exact API model IDs?
Yes. Use claude-sonnet-5-5 and claude-opus-5-5. The URLs and IDs are not derived by splitting the slug.
How are OpenRouter credit-purchase fees applied?
OpenRouter cells show a number only when the exact provider model ID and rate basis were checked against this catalog row. Cells marked Not verified have no such evidence. Credit-purchase fees and other OpenRouter plans are separate and are never added to the per-token prices here.
Does this comparison measure quality or speed?
No. Prices and monthly examples are arithmetic from the catalog. The only capability guidance quoted is Anthropic’s official description of Opus 5.5 typical uses.

Next step

Create a Code By AI account, top up the prepaid wallet and create an API key. Then call the model with the ID and endpoint above.

Code By AI is a third-party prepaid API gateway. It is not an official vendor product.