Skip to navigation

Claude Sonnet 5

Claude Sonnet 5 is a balanced model by Anthropic, available through the OpenAI- and Anthropic-compatible API under the model id claude-sonnet-5. Input costs $2 and output $10 per 1M tokens. It has a 1M-token context window and up to 128k output tokens per response.

Anthropic · Claude · Balanced

Unavailable

The everyday workhorse: strong coding quality at a fraction of flagship cost.

Requests to this model fail right now: it has no working upstream. The rates below are what it will cost when it returns.

Claude Sonnet 5 key facts
VendorAnthropic
Model IDclaude-sonnet-5
Input price per 1M tokens$2.00
Output price per 1M tokens$10.00
Context window1M tokens
Max output128k tokens
API formatsAnthropic, OpenAI
Prices checked

Model id

claude-sonnet-5

Price per 1M tokens

Input
$2.00
Output
$10.00
Cached input
$0.2090% below input

Output is 5× the input rate. $1 covers about 142 prompts of 1,000 input + 500 output tokens. 1 credit = $1 of usage. All rates

Start using Claude Sonnet 5

Set ONEAIAPIKEY_API_KEY to a key from your console, then run any example. Streaming is on so long answers are not cut off by idle-connection timeouts.

curl https://api.oneaiapikey.com/v1/chat/completions \
  -H "Authorization: Bearer $ONEAIAPIKEY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-5",
    "stream": true,
    "messages": [{"role": "user", "content": "Turn these release notes into a 300-word changelog post for developers."}]
  }'
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.oneaiapikey.com/v1",
    api_key=os.environ["ONEAIAPIKEY_API_KEY"],
)

stream = client.chat.completions.create(
    model="claude-sonnet-5",
    messages=[{"role": "user", "content": "Turn these release notes into a 300-word changelog post for developers."}],
    stream=True,  # recommended for long outputs
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.oneaiapikey.com/v1",
  apiKey: process.env.ONEAIAPIKEY_API_KEY,
});

const stream = await client.chat.completions.create({
  model: "claude-sonnet-5",
  messages: [{ role: "user", content: "Turn these release notes into a 300-word changelog post for developers." }],
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}
import os
from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.oneaiapikey.com",
    api_key=os.environ["ONEAIAPIKEY_API_KEY"],
)

with client.messages.stream(
    model="claude-sonnet-5",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Turn these release notes into a 300-word changelog post for developers."}],
) as stream:
    for text in stream.text_stream:
        print(text, end="", flush=True)
# macOS / Linux
export ANTHROPIC_BASE_URL="https://api.oneaiapikey.com"
export ANTHROPIC_AUTH_TOKEN="$ONEAIAPIKEY_API_KEY"
export ANTHROPIC_MODEL="claude-sonnet-5"
claude

# Windows PowerShell
$env:ANTHROPIC_BASE_URL = "https://api.oneaiapikey.com"
$env:ANTHROPIC_AUTH_TOKEN = $env:ONEAIAPIKEY_API_KEY
$env:ANTHROPIC_MODEL = "claude-sonnet-5"
claude

More: quickstart · API reference · try it in Chat first

Benchmarks reported by the vendor

Scores for Claude Sonnet 5 as its maker published them, with the setting they state. We have not re-run them. Versions and settings differ between vendors, so compare only identical benchmark names; compare models side by side.

Tokens per day, by model

Last 7 days, UTC days

Hover, tap or drag across any day, or focus the chart and use the arrow keys, to see how every model did that day.

Real tokens served through this gateway, updated every 30 minutes. Ranked by usage, not quality.

Full ranking insights

Claude line-up

Claude Sonnet 5 or Claude Opus 5.5 or Claude Sonnet 5.5?

Of the 6 Claude models on this site, Claude Opus 5.5 is the step up from Claude Sonnet 5 and Claude Sonnet 5.5 the step down. Each comparison lists the published rates and limits, then what favours each side.

Claude Sonnet 5vsClaude Opus 5.5

Per 1M tokensClaude Sonnet 5Claude Opus 5.5
Input$229% less$2.80
Output$1029% less$14
Cached input$0.20the same$0.20
Context1Mthe same1M
Max output128kthe same128k

Pick Claude Sonnet 5 when

  • cost per request decides it: Claude Sonnet 5 charges input 29% less and output 29% less than Claude Opus 5.5.
  • the work is daily coding, code review and writing, which this catalogue lists for Claude Sonnet 5 and not for Claude Opus 5.5.

Pick Claude Opus 5.5 instead when

  • Claude Sonnet 5 falls short and you want the flagship model of the pair.
  • newer matters to you: Claude Opus 5.5 was released 22 Sept 2026, Claude Sonnet 5 released 30 Jun 2026.
  • your workload looks like agentic coding, large refactors and complex reasoning, labels the catalogue gives Claude Opus 5.5 only.

Claude Sonnet 5vsClaude Sonnet 5.5

Per 1M tokensClaude Sonnet 5Claude Sonnet 5.5
Input$243% more$1.40
Output$1043% more$7
Cached input$0.202× as much$0.10
Context1Mthe same1M
Max output128kthe same128k

Pick Claude Sonnet 5 when

  • the work is writing, which this catalogue lists for Claude Sonnet 5 and not for Claude Sonnet 5.5.

Pick Claude Sonnet 5.5 instead when

  • the job runs well enough on the lower rates: input at 30% less and output at 30% less.
  • your workload looks like coding agents, a label the catalogue gives Claude Sonnet 5.5 only.

Use cases

What Claude Sonnet 5 is listed for, and what it costs

The catalogue lists Claude Sonnet 5 for daily coding, code review and writing. Each row prices one typical request at the published rates, with the arithmetic shown. Token counts are examples; your prompts will differ.

Model your own traffic

  1. Daily coding

    A bug fix or small feature: 12,000 tokens of the relevant files in, a patch of about 1,500 tokens out.

    A good default for feature work, bug fixes and explaining unfamiliar code.

    “Fix the off-by-one error in paginate() and add a test for the last page.”

    Same request on Claude Opus 5.5 $0.0546 and Claude Sonnet 5.5 $0.0273. No other balanced-tier Claude model on this site does this job for less.

    $0.039

    per change, about 256 per $10

    0.012 × $2 + 0.0015 × $10

  2. Code review

    A pull request diff with the code around it: 20,000 tokens in, 1,200 tokens of review comments out.

    Paste a diff and ask for risks, missing tests and edge cases.

    “Review this diff for bugs, missing tests and unclear names. List each issue with its line.”

    Same request on Claude Opus 5.5 $0.0728 and Claude Sonnet 5.5 $0.0364. No other balanced-tier Claude model on this site does this job for less.

    $0.052

    per review, about 192 per $10

    0.02 × $2 + 0.0012 × $10

  3. Writing

    A brief plus source notes: 3,000 tokens in, a draft of roughly 1,200 words (1,600 tokens) out.

    Provide tone, audience and length; it follows style instructions closely.

    “Turn these release notes into a 300-word changelog post for developers.”

    Same request on Claude Opus 5.5 $0.0308 and Claude Sonnet 5.5 $0.0154. No other balanced-tier Claude model on this site does this job for less.

    $0.022

    per draft, about 454 per $10

    0.003 × $2 + 0.0016 × $10

Overview

When Claude Sonnet 5 fits

Claude Sonnet 5 is a balanced model from Anthropic, available here under the exact model id “claude-sonnet-5”. In the Claude line-up here it sits between Claude Opus 5.5 and Claude Sonnet 5.5. Anthropic released it on 30 Jun 2026.

Anthropic documents tools, vision, reasoning, structured output and prompt caching for it, and it reads images as well as text.

It costs $2 per million input tokens and $10 per million output tokens, so output is 5× the input rate. On the use cases below, output makes up 38% of the bill for daily coding, 23% for code review and 73% for writing, so trimming the context you send saves more than capping the answer.

Cached input bills at $0.20 per million tokens, 90% below the standard input rate, which pays off when the same system prompt or documents go out on every request.

You can call it through the OpenAI format at https://api.oneaiapikey.com/v1 or the native Anthropic Messages format at https://api.oneaiapikey.com/v1/messages. That makes it usable in Claude Code as well as OpenAI-compatible tools such as Codex CLI, Cursor and Cline.

Use Claude Sonnet 5 with any balance.

Claude Sonnet 5 is a paid model: any balance above $0 pays for it, the $10.00 sign-up credit included. When it runs out, add credit to your wallet. Every request is billed at the rates above, with a receipt in your usage log.

Claude Sonnet 5 is developed by Anthropic. Model names and trademarks belong to their owners. One AI API Key is an independent API gateway and is not affiliated with, endorsed by or sponsored by Anthropic.

New accounts$10 credit on sign-up
Claim $10 credit →