Claude Sonnet 5 vs Claude Sonnet 5.5: API price and setup

This page compares the exact API IDs `claude-sonnet-5` and `claude-sonnet-5-5`. Both are Claude Code models, so the client setup is shared; only the model value and token rates change. Prices come from the live catalog.

Short answer

Input and output rates match at $0.50/$2.50; Claude Sonnet 5.5 has the lower cache-read rate ($0.025 vs $0.05 per 1M tokens). For cached input, that is the only price difference shown.

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 5claude-sonnet-5Input$0.50$2.00$2.00
Cache read$0.05$0.20$0.20
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 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

OpenRouter standard endpoint (verified): anthropic/claude-sonnet-5 · anthropic · anthropic/claude-sonnet-5-20260630 ·

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

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

OpenRouter: Anthropic provider, Standard variant, 1M-token context, regular synchronous API. Verified base input, output and cache-read rates matched the catalog vendor fields and are recorded here. Fast, Batch, regional endpoints and credit fees are excluded. /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 5claude-sonnet-5$60.00$15.00
Claude Sonnet 5.5claude-sonnet-5-5$60.00$15.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
Work already configured for Claude CodeEither model; change only `model`The base URL, auth and protocol are shared.
Input-heavy requests: long prompts, large context, repeated instructionsEitherBoth list $0.50 per 1M tokens for this metric.
Output-heavy requests: long code or document generationEitherBoth list $2.50 per 1M tokens for this metric.
Cache-read-heavy requests: repeated prefixes and reused contextClaude Sonnet 5.5Cache read rate: Claude Sonnet 5 $0.05 vs Claude Sonnet 5.5 $0.025 per 1M tokens.

How the integration differs

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

Model IDsclaude-sonnet-5 / claude-sonnet-5-5
Claude Code setupANTHROPIC_BASE_URL=https://www.codebyai.net/api/agent · ANTHROPIC_AUTH_TOKEN=<key> · model: claude-sonnet-5
ProtocolClaude Code: Anthropic Messages
Key and balanceBoth use the same base URL, auth variable and prepaid balance.
What changesOnly the `model` value; the client configuration is unchanged.
BillingBoth debit the same prepaid wallet at the per-1M-token rates above. Code By AI does not charge the official list price.

FAQ

Which model is cheaper on Code By AI?
Input and output rates match at $0.50/$2.50; Claude Sonnet 5.5 has the lower cache-read rate ($0.025 vs $0.05 per 1M tokens). For cached input, that is the only price difference shown.
Are these the exact API model IDs?
Yes. Use `claude-sonnet-5` and `claude-sonnet-5-5` exactly. The page does not derive IDs by splitting the slug.
Do both models use the same key and endpoint?
Yes. Both are Claude Code models on the same endpoint; only the model value changes.
How are the OpenRouter prices obtained?
The OpenRouter cells show recorded base rates that matched the catalog vendor fields when checked. The dates are listed with the sources below the table. 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 page measure quality or speed?
No. The scenarios describe client protocols and token mix, not measured quality, speed or SLA results.

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.