Velokey
Tutorials

Claude Sonnet 5 API: Pricing, Access & Setup (2026)

Claude Sonnet 5 launched June 30, 2026. Here's the real API pricing (intro rate + the tokenizer catch), the model ID, and how to call it two ways.

Claude Sonnet 5 API: Pricing, Access & Setup (2026)

TL;DR

  • Claude Sonnet 5 (model ID claude-sonnet-5) launched June 30, 2026 — Anthropic's mid-tier agentic model, near Opus 4.8 quality at a fraction of the price, with a 1M-token context window and 128K max output
  • Introductory API pricing is $2 / $10 per 1M input/output tokens through August 31, 2026, then $3 / $15 — so the cheap rate has an expiry date
  • The catch behind the "cost-neutral" framing: Sonnet 5 ships a new tokenizer that can count up to 35% more tokens for the same text, so your effective bill can rise even though the per-token rate matches Sonnet 4.6
  • You can call it directly through Anthropic, or through Velokey's OpenAI-compatible endpoint with one key at $3 / $15 via credits

Anthropic pitched Claude Sonnet 5 as a "cost-neutral" upgrade — same per-token price as Sonnet 4.6, better model. That's true for the rate on the price sheet and misleading for the bill you actually pay, because Sonnet 5 also changed how tokens are counted. Here's what the API really costs, the model ID and specs, and the two ways to call it — including the one that skips the setup.

Claude Sonnet 5 API pricing and access guide
Claude Sonnet 5: mid-tier agentic model, intro pricing, and a tokenizer that changes the math

What is Claude Sonnet 5?

Claude Sonnet 5 is Anthropic's mid-tier model, released June 30, 2026, built for planning, tool use, and autonomous coding at a lower price than the Opus tier. It approaches Opus 4.8 quality on many agentic tasks while costing a fraction as much.

The API model ID is claude-sonnet-5. It carries a 1M-token context window (the default and the max) and up to 128K output tokens, and it supports the full modern feature set: high-resolution vision (up to 2576px), tool use, prompt caching, structured outputs with JSON schema, web search, computer use, and effort levels up to xhigh. Anthropic also reports it behaves more safely than Sonnet 4.6 in agentic contexts.

Claude Sonnet 5 at a glance:

SpecDetail
Model IDclaude-sonnet-5
ReleasedJune 30, 2026
Context window1M tokens (default & max)
Max output128K tokens
VisionHigh-res, up to 2576px
FeaturesTool use, caching, structured outputs, web search, computer use, effort (to xhigh)

*Source: Anthropic Claude Sonnet 5 announcement, 2026.*

The positioning is the point: it's the model you reach for when you want agentic and coding capability close to Opus but need to run it at volume without Opus-tier cost.

How much does the Claude Sonnet 5 API cost?

Claude Sonnet 5 has an introductory rate of $2 per 1M input tokens and $10 per 1M output through August 31, 2026, then it moves to the standard $3 / $15. Both dates matter: budget on the standard rate, not the promo.

Claude Sonnet 5 API pricing (per 1M tokens):

PeriodInputOutput
Intro (through Aug 31, 2026)$2$10
Standard (from Sep 1, 2026)$3$15

*Source: Anthropic pricing, 2026. The standard rate matches Claude Sonnet 4.6.*

Claude Sonnet 5 API pricing: intro vs standard
Claude Sonnet 5 intro pricing ($2/$10) runs through Aug 31, then $3/$15

Here's the part most pricing pages skip. Anthropic calls Sonnet 5 "cost-neutral" because the standard rate equals Sonnet 4.6. But Sonnet 5 ships a new tokenizer that can count up to 35% more tokens for the exact same input. Same rate card, more billable tokens per request — so a workload that cost you $X on Sonnet 4.6 can cost meaningfully more on Sonnet 5 even before you touch output length.

What a request costs (before the tokenizer effect):

Rate10K in + 2K out
Intro $2 / $10$0.04
Standard $3 / $15$0.06

*Add up to ~35% to the token counts on Sonnet 5's tokenizer — re-baseline your own prompts before assuming parity.*

Two practical moves: measure real token counts on claude-sonnet-5 (don't reuse your Sonnet 4.6 estimates), and lean on prompt caching, where cached reads bill at roughly a tenth of the input rate. For a fuller cost breakdown across the Claude line, see our Claude API pricing guide.

How do you call the Claude Sonnet 5 API?

There are two routes. Call Anthropic directly with the anthropic SDK, or call claude-sonnet-5 through Velokey's OpenAI-compatible endpoint with a key you already have. The second is the faster path to a working request.

Through Velokey (OpenAI-compatible, one key):

from openai import OpenAI

client = OpenAI(
    base_url="https://api.velokey.ai/v1",
    api_key="sk-velokey-...",   # your Velokey key
)

response = client.chat.completions.create(
    model="claude-sonnet-5",
    messages=[{"role": "user", "content": "Draft a migration plan for moving a monolith to services."}],
)
print(response.choices[0].message.content)

Point any OpenAI-compatible client at the Velokey base URL, swap the key, and set the model — no Anthropic account, tier, or data-retention setup, at $3 / $15 billed from Velokey credits. Velokey reaches Sonnet 5 alongside every other model on the same key.

Direct through Anthropic (Messages API):

import anthropic

client = anthropic.Anthropic()  # reads ANTHROPIC_API_KEY

response = client.messages.create(
    model="claude-sonnet-5",
    max_tokens=16000,
    output_config={"effort": "high"},   # low | medium | high | xhigh
    messages=[{"role": "user", "content": "..."}],
)
for block in response.content:
    if block.type == "text":
        print(block.text)

The direct route gives you the native Messages API surface (effort, thinking, server-side tools). Note that Sonnet 5 sits in the newer Claude family, so the same request rules apply as its siblings — don't pass temperature/top_p or a fixed thinking budget. If that's more setup than you want, the OpenAI-compatible path above skips it.

When should you use Claude Sonnet 5 instead of Opus 4.8?

Use Sonnet 5 for the bulk of agentic and coding work — planning, tool use, autonomous coding — where you want near-Opus quality at roughly half to a third of the cost. Reserve Opus 4.8 (or Fable 5) for the hardest reasoning and longest-horizon tasks that genuinely need the top tier.

  • Sonnet 5 — production agents, coding assistants, high-volume tool-calling, anything cost-sensitive that still needs strong reasoning. $3 / $15 standard.
  • Opus 4.8 — the difficult minority of tasks where the quality gap pays for the price gap ($5 / $25).
  • Fable 5 — the frontier ceiling for the most demanding work ($10 / $50). See our Claude Fable 5 API guide.

Most teams run Sonnet 5 as the default and escalate selectively — the same pattern you'd weigh in a GPT-5.6 tier decision.

Frequently Asked Questions

How much does the Claude Sonnet 5 API cost?

Introductory pricing is $2 per 1M input tokens and $10 per 1M output through August 31, 2026, then the standard $3 / $15. The standard rate matches Sonnet 4.6, but Sonnet 5's new tokenizer can count up to 35% more tokens for the same input — so measure real usage rather than assuming your Sonnet 4.6 costs carry over.

What is the Claude Sonnet 5 model ID?

The API model ID is claude-sonnet-5 — the exact string, no date suffix. It has a 1M-token context window and up to 128K output tokens, and supports tool use, vision, prompt caching, structured outputs, web search, and effort levels up to xhigh.

Is Claude Sonnet 5 as good as Opus 4.8?

It approaches Opus 4.8 quality on many agentic and coding tasks at a fraction of the price. For the bulk of production work Sonnet 5 is the sensible default; reserve Opus 4.8 or Fable 5 for the hardest reasoning and longest-horizon tasks where the top tier earns its cost premium.

Why is Claude Sonnet 5 called "cost-neutral" if my bill went up?

Because the per-token rate equals Sonnet 4.6. The bill can still rise because Sonnet 5 uses a new tokenizer that counts up to 35% more tokens for the same text — same rate, more billable tokens. Re-baseline token counts on claude-sonnet-5 before assuming your costs are unchanged.

How do I use Claude Sonnet 5 without an Anthropic account?

Call it through a unified API gateway. Point an OpenAI-compatible client at Velokey's endpoint (https://api.velokey.ai/v1), use your Velokey key, and set the model to claude-sonnet-5 — no Anthropic account, tier, or data-retention setup, billed at $3 / $15 from credits.


Want Claude Sonnet 5 without the Anthropic setup? [Get your Velokey API key](/model/claude-sonnet-5) and call claude-sonnet-5 through one OpenAI-compatible endpoint — same key, alongside every other model you use.


*Last updated: July 13, 2026. Pricing and specs are from Anthropic's Claude Sonnet 5 launch. The introductory rate and tokenizer behavior are set by Anthropic and may change — verify current numbers before committing to production budgets.*