Skip to main content
Anthropic

Claude Sonnet 5

Anthropic

Anthropic Sonnet model for agentic coding, tool use, and long-context document work.

anthropic/claude-sonnet-5

Documentation

Conversation

Anthropic

Start a conversation

Anthropic Sonnet model for agentic coding, tool use, and long-context document work.

Enter to send · Shift+Enter for a new line

Uses POST /v1/chat/completions with your Unifically API key. Supports system and user prompts, tools, streaming, and thinking when available.

What is Claude Sonnet 5?

Claude Sonnet 5 is Anthropic's June 2026 Sonnet update, built for agentic coding, tool use, long-context work, and professional text tasks. It sits above Claude Sonnet 4.6 in the Sonnet family and below the larger Opus and Fable class models on the hardest reasoning work. It accepts text and image input, outputs text, and runs on Unifically as anthropic/claude-sonnet-5. The headline spec is the 1M token context window with 128k max output, plus adaptive thinking as the default reasoning mode.

What's new in Claude Sonnet 5

A real jump in agentic coding

Anthropic reports 85.2% on SWE-bench Verified, 63.2% on SWE-bench Pro, and 80.4% on Terminal-Bench 2.1. Against Claude Sonnet 4.6, SWE-bench Pro rises from 58.1, Terminal-Bench from 67.0, and FrontierCode v1 from 15.1 to 38.8.

1M token context by default

Long-context work is standard: a large repo, an issue thread, and test logs fit in one session, with up to 128k output tokens per response.

Strong document handling

It ranks #11 on Arena's Document board with a 1476±17 score, close to Claude Opus 4.8 Thinking. Contracts, research packs, and policy corpora are a good fit.

Prompt-injection resistance

In a live bug bounty across tool use, coding, and computer use, it tied Claude Opus 4.8 at a 0.19% attack success rate. That matters for agents that act on untrusted web content.

Vision input for text output

It reads screenshots, charts, PDFs rendered as images, and technical diagrams, ranking #21 on Arena's Vision board. Use it when images are inputs and the deliverable is text.

Best for

Multi-step coding agents

Inspect, edit, test, and revise across a large repo without losing the thread.

Long document review

Contracts, research packs, finance files, or policy corpora compared in one window.

Visual reasoning

Charts, PDFs, screenshots, and technical diagrams read as input for text answers.

Browser and computer-use agents

Stronger resistance to injected instructions than earlier Sonnet models.

Professional writing and analysis

Work that must follow a plan for many turns without drifting.

RAG over big corpora

The 1M token window cuts how aggressively you have to chunk and re-rank.

Use cases

Use Claude Sonnet 5 for coding assistants that carry a large repo, its issue thread, and test logs in one session. It fits document agents that compare long PDFs, extract claims, and write grounded summaries. Operations teams can put it behind multi-step workflows that search, read, decide, and write back structured results. It is also a good fit for visual QA over business charts, dashboards, and screenshots when the final output is text.

Limitations

Claude Sonnet 5 outputs text only. It does not generate images, audio, or video.

The tokenizer changed from Claude Sonnet 4.6: the same input can map to roughly 1.0-1.35x as many tokens depending on content. Retest token budgets when moving long prompts over.

It is also not Anthropic's top model for the hardest reasoning tasks. The system card places it behind Opus and Mythos class models on most frontier reasoning and advanced scientific evaluations.

Claude Sonnet 5 vs Claude Sonnet 4.6

Sonnet 5 is a clear upgrade for agentic coding, long professional work, and prompt-injection resistance. The gap shows in the system card numbers: SWE-bench Pro rises from 58.1 to 63.2, Terminal-Bench 2.1 from 67.0 to 80.4, and FrontierCode v1 from 15.1 to 38.8. The tradeoff is that it can spend more tokens on hard work. Treat it as a more deliberate Sonnet, not a drop-in speed model for tiny prompts.

When to use Claude Sonnet 5

Use Claude Sonnet 5 when the task is too long or too agentic for a fast small model, but you do not need the largest Claude model. It is best when follow-through matters: coding changes, document synthesis, visual analysis, and multi-step workflows that punish shallow answers.

API examples

Call Claude Sonnet 5 from any language by POSTing to /v1/chat/completions, the OpenAI-compatible endpoint shared by every language model on the platform. Full parameter docs live at docs.unifically.com/models/llm/anthropic/claude-sonnet-5.

curl -X POST https://api.unifically.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "anthropic/claude-sonnet-5",
    "messages": [
      { "role": "user", "content": "Refactor this function to remove the shared mutable state and explain the change." }
    ]
  }'

The response comes back synchronously with the completion. Set "stream": true to receive tokens as they generate.

FAQs

People also ask

anthropic/claude-sonnet-5, called through the OpenAI-compatible POST /v1/chat/completions endpoint with your Unifically API key.

Text and image input, text output. It reads screenshots, charts, PDFs rendered as images, and diagrams, then answers in text. It does not generate images, audio, or video.

1M tokens, with a standard max output of 128k tokens. That fits a large repo plus its issue thread and test logs in one session.

Yes, for coding, agentic tasks, and document work. SWE-bench Pro rises from 58.1 to 63.2, Terminal-Bench 2.1 from 67.0 to 80.4, and FrontierCode v1 from 15.1 to 38.8.

In Anthropic's live bug bounty across tool use, coding, and computer use, Claude Sonnet 5 tied Claude Opus 4.8 at a 0.19% attack success rate. That makes it a good base for browser and computer-use agents.

Yes. The same input can map to roughly 1.0-1.35x as many tokens depending on content, so retest your token budgets when moving long prompts over from Claude Sonnet 4.6.

No. Opus and Mythos class models rank ahead on the hardest reasoning and specialized evaluations. Sonnet 5 is the balanced option for coding, documents, and multi-step work at a lower cost.