Anthropic
Claude 4.5 Sonnet
Released 
September 2025

Anthropic
Claude 4.5 Sonnet

Anthropic's coding- and agent-optimized Sonnet model built to run autonomous, tool-using workflows for hours at a time.

Modality:
Text
Image
Video
PDF
model ID
anthropic/claude-sonnet-4.5

Output Speed *

N/A
tok/s

Intelligence Index *

29.9
/ 100

Context Window *

1000000
tokens

Input price

18
Anytoken

Output price

90
Anytoken
Claude Sonnet 4.5: A Coding and Agentic Model Built for Long-Horizon Tool Use Claude Sonnet 4.5 is Anthropic's Sonnet-tier model released in September 2025, positioned as its strongest model at launch for coding, agents, and computer use. It sits between the lightweight Haiku tier and the premium Opus tier, offering frontier-class coding accuracy at Sonnet economics. It accepts text, images and PDFs, returns text, and supports an extended-thinking reasoning mode plus tool calling. The model is engineered for sustained autonomous operation, maintaining coherence across multi-step, tool-driven tasks—making it a strong default for software-engineering agents and computer-use automation rather than lightweight chat. Start building with the Claude Sonnet 4.5 API on AnyAPI.ai

Performance

Where Claude Sonnet 4.5 Earns Its Place: Coding and Autonomous Agents

Claude Sonnet 4.5 is strongest on real-world software engineering and long-running agentic work. Anthropic reports 77.2% on SWE-bench Verified—resolving real GitHub issues by proposing patches that pass repository tests—and 61.4% on OSWorld computer-use tasks, up sharply from Sonnet 4's 42.2% months earlier. This matters because both benchmarks measure end-to-end task completion, not isolated knowledge, which correlates with reliability inside coding agents and browser automation. In production, that translates to fewer failed agent loops on multi-step tasks. Anthropic also reports sustained focus across 30+ hour autonomous sessions, relevant for agents that plan and execute over extended horizons.

Benchmarks

Claude Sonnet 4.5 Benchmarks: Coding Leadership, Mid-Tier Speed

On coding, independent and vendor sources place Sonnet 4.5 at 77.2% on SWE-bench Verified (82.0% with parallel test-time compute), ahead of its predecessor Sonnet 4 and Opus 4.1 at launch. Artificial Analysis positioned Sonnet 4.5 (Thinking) at 61 on its composite Intelligence Index, above earlier Claude models but behind the top frontier reasoning models at the time. Speed is a trade-off: Artificial Analysis measured roughly 47 tokens/second in reasoning mode and 42 in non-reasoning mode—at the lower end of its price tier—with time to first token under two seconds.

Output Speed

*
N/A
tok/s

Intelligence Index

*
29.9
/ 100

MMLU *

Broad world knowledge and problem-solving
86
%

GPQA *

PhD-level scientific reasoning across physics, biology, chemistry.
73
%

HLE *

Adherence to multi-step structured instructions.
7
%

LiveCodeBench *

Tool-calling reliability in long agentic loops.
59
%

Technical Specifications

What the model supports

Claude Sonnet 4.5 provides a 200,000-token context window and up to 64,000 output tokens per response on the synchronous Messages API. It accepts text, images and PDF documents as input and returns text only—there is no image, audio, or video output. Two limits shape production design: the 200K window is smaller than the 1M window on newer Sonnet releases, and native structured-output enforcement (a JSON schema in response_format) is not supported, so JSON reliability depends on prompting and validation. Extended-thinking reasoning and tool calling are supported.
Verified Specifications — 
Claude 4.5 Sonnet
*
Input modalities
Text
Image
Video
PDF
output modalities
Text
Context window
1000000
 tokens
Maximum output tokens
64000
Reasoning
Yes
Knowledge cutoff
September 2025
Pricing (standard)
18
 AnyTokens in
 / 
90
 AnyTokens out

Quickstart

Sample code for Claude 4.5 Sonnet

import requests

url = "https://api.anyapi.ai/v1/chat/completions"

payload = {
    "model": "claude-sonnet-4.5",
    "messages": [
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "What is in this image?"
                },
                {
                    "type": "image_url",
                    "image_url": { "url": "https://your-image.jpg" }
                }
            ]
        }
    ],
    "max_tokens": 300,
    "stream": False,
    "tool_choice": "auto",
    "logprobs": False
}
headers = {
    "Authorization": "Bearer your_api_key",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
import requests url = "https://api.anyapi.ai/v1/chat/completions" payload = { "model": "claude-sonnet-4.5", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "What is in this image?" }, { "type": "image_url", "image_url": { "url": "https://your-image.jpg" } } ] } ], "max_tokens": 300, "stream": False, "tool_choice": "auto", "logprobs": False } headers = { "Authorization": "Bearer your_api_key", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json())
View docs
Copy
Code is copied
const url = 'https://api.anyapi.ai/v1/chat/completions';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer your_api_key', 'Content-Type': 'application/json'},
  body: '{"model":"claude-sonnet-4.5","messages":[{"role":"user","content":[{"type":"text","text":"What is in this image?"},{"type":"image_url","image_url":{"url":"https://your-image.jpg"}}]}],"max_tokens":300,"stream":false,"tool_choice":"auto","logprobs":false}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = 'https://api.anyapi.ai/v1/chat/completions'; const options = { method: 'POST', headers: {Authorization: 'Bearer your_api_key', 'Content-Type': 'application/json'}, body: '{"model":"claude-sonnet-4.5","messages":[{"role":"user","content":[{"type":"text","text":"What is in this image?"},{"type":"image_url","image_url":{"url":"https://your-image.jpg"}}]}],"max_tokens":300,"stream":false,"tool_choice":"auto","logprobs":false}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); }
View docs
Copy
Code is copied
curl --request POST \
  --url https://api.anyapi.ai/v1/chat/completions \
  --header 'Authorization: Bearer your_api_key' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "claude-sonnet-4.5",
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "What is in this image?"
        },
        {
          "type": "image_url",
          "image_url": {
            "url": "https://your-image.jpg"
          }
        }
      ]
    }
  ],
  "max_tokens": 300,
  "stream": false,
  "tool_choice": "auto",
  "logprobs": false
}'
curl --request POST \ --url https://api.anyapi.ai/v1/chat/completions \ --header 'Authorization: Bearer your_api_key' \ --header 'Content-Type: application/json' \ --data '{ "model": "claude-sonnet-4.5", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "What is in this image?" }, { "type": "image_url", "image_url": { "url": "https://your-image.jpg" } } ] } ], "max_tokens": 300, "stream": false, "tool_choice": "auto", "logprobs": false }'
View docs
Copy
Code is copied
View docs
Code examples coming soon...

Comparison

Claude Sonnet 4.5 vs Claude Opus 4.1: Coding Value or Maximum Capability?

At launch, the realistic decision for teams inside the Claude ecosystem was Sonnet 4.5 versus Opus 4.1, then Anthropic's most capable model. Both handle coding, reasoning, and agentic tool use with the same text/image/PDF input and text output, and both target complex, multi-step work. The practical question is value: Sonnet 4.5 actually surpassed Opus 4.1 on SWE-bench Verified (77.2% vs 74.5%) while sitting in a substantially lower cost tier, whereas Opus retained an edge on the broadest, hardest reasoning tasks.

Dimension
Claude 4.5 Sonnet
Claude 4.1 Opus (Non-reasoning)
Context window *
1000000
tokens
200000
tokens
Output speed *
N/A
tok/s
N/A
tok/s
Intelligence Index *
29.9
28.8
Input pricing
18
AnyToken
90
AnyToken
Output pricing
90
AnyToken
450
AnyToken
Knowledge cutoff *
September 2025
August 2025

Choose Claude Sonnet 4.5 when coding accuracy, agentic tool use, and cost efficiency drive the decision—it matches or beats Opus 4.1 on software-engineering benchmarks at a much lower price, making it the better default for high-volume coding agents and computer-use workflows. Choose Opus 4.1 when you need the maximum general reasoning ceiling on the most demanding analytical or open-ended problems and are willing to pay a premium tier for it. For most production coding pipelines, Sonnet 4.5 is the more economical choice.

Limitations & Trade-offs

Where Claude 4.5 Sonnet falls short

1
Smaller context than newer siblings. Claude Sonnet 4.5 is capped at a 200,000-token context window on the standard API, and Anthropic retired the 1M-token beta for this model. That is roughly 150,000 words—ample for most single documents and codebases, but limiting for very large multi-repository or whole-corpus prompts. If your agent must hold an entire large codebase or a year of logs in-context, a 1M-window Claude model (such as later Sonnet releases) or aggressive context compaction is preferable.
2
No native structured-output enforcement. Sonnet 4.5 supports function/tool calling but does not enforce a JSON schema via response_format. Applications that require guaranteed schema-valid JSON must rely on tool calling, careful prompting, and downstream validation and retries. For strict, high-volume structured extraction where malformed output is costly, this adds engineering overhead compared with models that enforce schemas natively.
3
Mid-tier generation speed. Independent measurements from Artificial Analysis put output around 47 tokens/second in reasoning mode and ~42 in non-reasoning mode—at the lower end of its price tier. Extended thinking further increases latency and token consumption. For latency-critical, user-facing chat or high-throughput streaming, a faster model such as Haiku-tier Claude or another low-latency model is a better fit; Sonnet 4.5 favors task quality over speed.
4
Text-only output and premium output pricing. The model returns text only—no image, audio, or video generation—so multimodal-output use cases need a different model. It also sits in a higher output-cost tier than lightweight models, and because agentic and extended-thinking runs generate many tokens, long autonomous sessions can accumulate meaningful cost. Budget accordingly for high-volume, long-running agent workloads.

Best-Fit Workloads

Where this model earns its place

01

Autonomous coding agents


Sonnet 4.5's 77.2% SWE-bench Verified score and reported 30+ hour sustained focus make it well-suited to agents that plan, edit, test, and iterate on real codebases. It works effectively with a simple scaffold of bash and file-editing tools. Production uses include automated issue resolution, refactoring assistants, and CI-integrated fix generation. Plan around the 200K window for very large repositories.

02

Computer-use and browser automation


With 61.4% on OSWorld—a large jump over prior models—Sonnet 4.5 is a strong choice for agents that operate a browser or desktop: clicking buttons, filling forms, navigating apps, and recovering from errors. This suits workflow-automation products that drive real UIs. Note computer use carries prompt-injection risk, so sandboxing and guardrails are essential in production.

03

Long-running tool-orchestration agents


The model is designed to coordinate tools and sub-tasks over extended horizons while tracking token usage across calls, backed by context-editing and memory tooling on the Claude API. This fits research agents, financial-analysis pipelines, and cybersecurity workflows that run many steps. The main constraint is the 200K context ceiling, which requires deliberate context management on the longest runs.

04

Document and PDF analysis


Because Sonnet 4.5 accepts PDF pages and images directly and returns structured text, it fits contract review, report extraction, and technical-document Q&A within the 200K window (up to 100 images/PDF pages per request for 200K-window models). For strict schema-valid extraction, pair it with tool calling and downstream validation, since native JSON-schema enforcement is unavailable.

Pricing in anytokens via AnyAPI
Input
18
Output
90
Cache write
Cache read

Integration

Access Claude 4.5 Sonnet via AnyAPI.ai

Access Claude 4.5 Sonnet through AnyAPI.ai using a unified API built for multi-model AI applications. Integrate Claude 4.5 Sonnet without maintaining a separate provider-specific connection, and keep the flexibility to test, switch, or combine models as your application requirements evolve.

01

One API integration

Access Claude 4.5 Sonnet and other AI models through the same API workflow instead of maintaining separate integrations for every provider.

02

Easy model switching

Test Claude 4.5 Sonnet against alternative models or switch models as your performance, capability, or cost requirements change without rebuilding your application around another provider API.

03

Flexible for production

Use Claude 4.5 Sonnet from experimentation through production while keeping your AI stack flexible as workloads, traffic, and model requirements evolve.

04

Multi-model applications

Use Claude 4.5 Sonnet for the workloads where it performs best and combine it with other models for tasks that require different capabilities, performance, or efficiency.

Frequently Asked Questions

Answers to common questions about integrating and using this AI model via AnyAPI.ai

Claude Sonnet 4.5 is optimized for coding, agentic tool use, and computer use. Anthropic reports 77.2% on SWE-bench Verified and 61.4% on OSWorld, and highlights sustained autonomous operation across long, multi-step tasks. It is a strong default for software-engineering agents and browser/desktop automation rather than latency-critical chat.

Claude Sonnet 4.5 has a 200,000-token context window on the standard Messages API and can generate up to 64,000 output tokens per response. Anthropic offered a 1M-token beta earlier but retired it for this specific model; the 1M window is available on newer Sonnet and Opus releases instead.

Yes. Claude Sonnet 4.5 supports an extended-thinking reasoning mode with a configurable thinking budget, and it supports function/tool calling via tools and tool_choice. It does not enforce a JSON schema through response_format, so guaranteed structured output requires tool calling plus prompting and validation.

Claude Sonnet 4.5 accepts text, images, and PDF documents as input, and returns text only. It does not generate images, audio, or video. For 200K-window models, a single request can include up to 100 images or PDF pages, which suits document-analysis and vision-assisted coding tasks.

Choose Sonnet 4.5 for coding and agentic workloads—it surpassed Opus 4.1 on SWE-bench Verified (77.2% vs 74.5%) at a much lower cost tier. Choose Opus 4.1 when you need the maximum general-reasoning ceiling on the hardest analytical problems and can accept premium pricing and lower throughput.

* Benchmark data source: Artificial Analysis artificialanalysis.ai