Roboflow
Anthropic

Anthropic: Claude Sonnet 5

Claude Sonnet 5 Overview

Claude Sonnet 5 is a mid-tier large language model from Anthropic, released on June 30, 2026, as the latest model in the Sonnet series and a direct successor to Claude Sonnet 4.6. It is a hybrid reasoning model designed primarily for agentic workflows, software coding, and professional tasks. The model features a 1 million token context window, a 128k maximum output token limit, and runs adaptive thinking by default, giving API users fine-grained control over reasoning effort across five levels (low, medium, high, max, and extra-high). It uses an updated tokenizer shared with Opus 4.7 and later models, which produces approximately 30% more tokens for equivalent text compared to earlier Claude models. On benchmarks, Sonnet 5 scores 63.2% on agentic coding and 81.2% on OSWorld, narrowing the gap with Opus 4.8 while remaining at Sonnet-tier pricing.

The model supports text and image input with text output, and accepts tools including browsers and terminals for autonomous multi-step task execution. Anthropic's safety evaluations report that Sonnet 5 shows a lower rate of undesirable behaviors than Sonnet 4.6 and is generally safer in agentic contexts, with improved resistance to prompt injection and reduced sycophancy. Cybersecurity safeguards equivalent to those on Opus 4.7 and 4.8 are active, though Anthropic notes the model was not deliberately trained on cybersecurity tasks. The model is proprietary and API-only, with no open weights.

Claude Sonnet 5 Interactive Demo

Claude Sonnet 5 Details & Performance

Details

Resources

Vision Tasks

CaptioningChart Question AnsweringClassificationDocument Question AnsweringImage TaggingMulti-Label ClassificationOCRObject DetectionVision LanguageVisual Question Answering

Features

Foundation VisionLLMs with Vision CapabilitiesMultimodal Vision

Usage

Past 30 Days

Performance

Avg. Latency

Arena Rankings

Claude Sonnet 5 Vision Evals

Vision Evals is Roboflow's ground-truth benchmark: every model runs the same real-world samples across six vision tasks, and answers are scored against ground truth.

Evals updated August 14, 2026Pricing updated August 19, 2026

Overall score#21 of 30
66.4%
Avg cost / sample#16 of 30
$0.0064
Avg speed / sample#4 of 30
4.84s
Avg tokens / sample
2.1K

Strengths and weaknesses

Claude Sonnet 5 averages 66.4% across the six Vision Evals tasks, ranking #21 of 30 models overall.

Its weakest relative showing is Object Detection, ranking #25 of 30 at 36.1%.

At $0.0064 per sample it is the 16th cheapest of the 30 benchmarked models, and its average inference time of 4.8s per sample makes it the 4th fastest.

Performance profile

Field medianClaude Sonnet 5

Field medians: Object Detection 55.2%, Counting 64.2%, Identification 84.4%, OCR 90.0%, Data Extraction 86.6%, Reasoning 58.0%.

Results by task

TaskScoreField (0 to 100)RankCost / sampleSpeed
Object Detection
36.1%
#25 of 30$0.0117.19s
Counting
56.8%
#18 of 30$0.00302.99s
Identification
81.3%
#17 of 30$0.00272.33s
OCR
91.7%
#12 of 30$0.00787.23s
Data Extraction
89.7%
#8 of 30$0.00302.81s
Reasoning (low)
43.0%
#21 of 30$0.00323.09s
Reasoning (high)
43.0%
#29 of 30$0.00434.12s
  • Thinking longer changes nothing: the same reasoning score at high effort for 1.4x the cost and 1.3x the latency.

Price vs. performance

Score vs. cost

Overall benchmark score against estimated cost per sample. Upper-left is the sweet spot: high quality at low cost.

30 models on the current benchmark · scores and efficiency pooled across all six tasks at low effort · Claude Sonnet 5 highlighted

Claude Sonnet 5 scores from a single evaluation run · Methodology

View all Vision Evals →

Claude Sonnet 5 Pricing

Claude Sonnet 5 costs $2.00 per 1M input tokens and $10.00 per 1M output tokens.

Input$2.00 / 1M tokens
Output$10.00 / 1M tokens
Cached input$0.200 / 1M tokens

Pricing updated Aug 19, 2026

Alternatives to Claude Sonnet 5

Other models worth comparing for similar use cases.

Google
Gemini 3.7 Flash
Gemini 3.7 Flash is a proprietary multimodal model from Google, positioned in the Flash branch of the Gemini 3 series that trades some of the capacity of the larger Pro models for lower latency and lower cost per token. It accepts interleaved text and image input alongside other modalities handled by the Gemini family and returns text, and it continues the series pattern of exposing a configurable thinking budget so that reasoning effort can be scaled up for harder problems or reduced for high throughput extraction, routing and classification work. The model is announced roughly three weeks after Gemini 3.6 Flash, part of an unusually fast iteration cadence within the Flash line.Google reports gains concentrated in agentic coding and front end generation, citing a WebDev Arena Elo of 1588 for this release compared with 1538 for the preceding Flash model, and describes it as producing more functional layouts and more feature complete applications in fewer prompts. Weights are not published and the architecture, parameter count and training corpus are undisclosed, consistent with prior Gemini releases. Visual capability follows the Flash lineage, covering image and document understanding, chart and diagram interpretation, text recognition in images, and general visual question answering.
OpenAI
GPT-5.6 Terra
GPT-5.6 Terra is the mid-tier reasoning model in OpenAI's GPT-5.6 family, which also includes the flagship Sol and the lightweight Luna. Introduced in a limited preview on June 26, 2026, and made broadly available on July 9, 2026, Terra accepts text and image input and produces text output, supporting vision, function calling, tool use, and agentic workflows. It is designed as a balanced option for everyday professional and production workloads — including coding assistance, document analysis, customer support, and multi-step agent tasks — where both output quality and cost efficiency matter. OpenAI positions Terra as delivering performance competitive with GPT-5.5 at approximately half the price, with a context window of around 1,050,000 tokens. On Terminal-Bench 2.1, Terra scores 84.3%, matching Claude Fable 5 on that benchmark. Under OpenAI's Preparedness Framework, Terra is rated High for cybersecurity and biological capabilities, meaning it demonstrates meaningful capability in those domains without reaching the Critical threshold.GPT-5.6 introduces a new naming convention in which the generation number (5.6) is paired with a durable capability tier name (Sol, Terra, or Luna), allowing each tier to advance on its own schedule. Terra carries the API identifier gpt-5.6-terra and supports the same reasoning effort controls available across the family, including adjustable reasoning depth. The model includes prompt caching with explicit cache breakpoints and a 30-minute minimum cache life, with cache writes billed at 1.25x the uncached input rate and cache reads receiving a 90% discount. GPT-5.6 Terra is a proprietary, closed-weights model served through the OpenAI API, Codex, and ChatGPT.
Qwen
Qwen3.7 Flash
Qwen3.7 Flash is the low-latency, cost-oriented tier of Alibaba's Qwen3.7 series, a vision-language reasoning model that accepts interleaved text and image input and returns text. It is built as a hybrid thinking model: like the rest of the Qwen3.7, Qwen3.6, and Qwen3.5 families served through Alibaba Cloud Model Studio, it can either emit an explicit reasoning trace before answering or respond directly, with thinking behavior controlled by an enable_thinking switch that defaults to on for the Qwen3.7 generation. The model exposes a context window of roughly one million tokens and a maximum generation length of 65,536 tokens, which allows long multi-image sequences, long documents, and extended agent trajectories to be held in a single request.Functionally, Qwen3.7 Flash targets multimodal agent workloads rather than pure chat. Reported strengths include object recognition, spatial understanding, and perception of real-world scenes, alongside visual coding, search, and computer-use style interaction where the model reads screen content and reasons over interface state. Weights are not published; the model is a proprietary endpoint positioned below Qwen3.7 Plus and Qwen3.7 Max in the same series, and it supports function calling and tool use for agentic pipelines.
Google
Gemini 3.6 Flash
Gemini 3.6 Flash is a multimodal language model from Google DeepMind, positioned as the workhorse tier in the Gemini 3.x family. It accepts text, image, video, audio, and PDF inputs with a 1 million token context window and produces up to 64,000 output tokens. The model builds directly on Gemini 3.5 Flash, incorporating developer and customer feedback to improve token efficiency, coding quality, and knowledge work performance. According to the Artificial Analysis Index, it consumes 17% fewer output tokens than its predecessor, and on some benchmarks such as DeepSWE, token reduction reaches up to 65%. It supports function calling, structured output, search as a tool, and code execution, and includes computer use as a built-in capability in the Gemini API and Gemini Enterprise.On coding benchmarks, Gemini 3.6 Flash scores 49% on DeepSWE versus 37% for 3.5 Flash, and 63.9% on MLE Bench versus 49.7%. Computer use performance on OSWorld-Verified improves from 78.4% to 83%, and knowledge work scores on GDPval-AA v2 rise from 1349 to 1421. The model carries a knowledge cutoff of March 2026 and ships with enhanced Frontier Safety safeguards covering chemical, biological, radiological, nuclear, and cyber offense domains, with training to minimize refusals for beneficial uses. It is a proprietary, closed-weights model available in preview through the Gemini API via Google AI Studio, Android Studio, Google Antigravity, Gemini Enterprise, and the Gemini app.
Qwen
Qwen3.8 27B
Qwen3.8-27B is a dense vision-language model of roughly 27.78 billion parameters from Alibaba's Qwen team, built on the architectural foundation established by the Qwen3.5 generation. It takes interleaved text, image, and video input through an integrated vision encoder and produces text, covering document and chart understanding, visual question answering, front-end code generation from visual references, and agentic computer-use workflows. The decoder is a hybrid stack of 64 layers that repeats a pattern of three Gated DeltaNet linear-attention blocks, each followed by a feed-forward block, then one grouped-query full-attention block, so only a quarter of the layers maintain a conventional key-value cache. Native context length is 262,144 tokens.Post-training targets long-horizon agentic work, and the model exposes per-request thinking control that lets callers switch reasoning traces on or off and choose a reasoning effort level. Multi-token prediction weights are trained alongside the main network for speculative decoding. Qwen reports improvements over Qwen3.6-27B on agentic and multimodal evaluations including Terminal-Bench 2.1, OSWorld-Verified, and SWE-bench Multimodal, with additional results on MathVision, CharXiv, and an internal Vision2Web suite.

Other Anthropic Sonnet models

Other versions in the same family as Claude Sonnet 5.

Deploy Claude Sonnet 5 with an API

Claude Sonnet 5 runs as a hosted REST endpoint through Roboflow Workflows. Pick a task, then hand the prompt to your coding agent or copy the code. Deploying the workflow into a free Roboflow workspace replaces the your-workspace and YOUR_API_KEY placeholders with your own.

Connect your agent to Roboflow (once)

Add the Roboflow MCP server

claude mcp add --transport http roboflow https://mcp.roboflow.com/mcp

Run /mcp and authorize Roboflow in your browser when the OAuth flow opens.

Start a new Claude Code session so the MCP loads, then paste the prompt below (it works the same in any agent).

Deploy this workflow to your Roboflow workspace to use it.

Integrate the Roboflow "Claude Sonnet 5" workflow into my app.

- Endpoint: POST https://serverless.roboflow.com/<your-workspace>/workflows/claude-sonnet-5-object-detection
- Auth: send my Roboflow API key as `api_key` in the request body, read from the ROBOFLOW_API_KEY env var (never hardcode).
- Body: { "api_key": ..., "inputs": { `image`: { type: "url" | "base64", value }, `classes`: string array } }.
- Billing: this workflow needs no provider API key — inference runs on my Roboflow credits. A BYO provider key can be added to the model step in the Roboflow workflow editor later.

With the Roboflow MCP connected, call `workflows_get` on "claude-sonnet-5-object-detection" to read the exact input schema (the source of truth), then `workflows_run` on a sample image to confirm the output shape before writing code (the MCP is authenticated, so this needs no key). Without the MCP, use the contract above.

Before running the app, set up these keys so it does not error at runtime:
- `ROBOFLOW_API_KEY` (sent as `api_key`) from https://app.roboflow.com/settings/api
Create a .gitignore'd .env with these variables, using placeholder values for any I haven't given you. Then pause and tell me directly, in your reply: the full path to the .env file, exactly which keys I need to paste in, and the link to get each one. Wait for me to confirm I've added them before you run anything. Do not run the app until I confirm.

Then add the integration to my codebase: match my project's language, framework, and conventions; read every key from environment variables (never hardcode); add basic error handling; and include a small runnable example. If you can't tell what language my project uses, ask me.
Installpip install inference-sdk

Deploy this workflow to your Roboflow workspace to use it.

# Inference runs on your Roboflow credits — no provider API key needed. To bill your own provider account instead, add an api_key to the model step in the Roboflow workflow editor.
# 1. Import the library
from inference_sdk import InferenceHTTPClient

# 2. Connect to your workflow
client = InferenceHTTPClient(
  api_url="https://serverless.roboflow.com",
  api_key="YOUR_API_KEY"
)

# 3. Run your workflow on an image
result = client.run_workflow(
  workspace_name="your-workspace",
  workflow_id="claude-sonnet-5-object-detection",
  images={
    "image": "YOUR_IMAGE.jpg"  # Path to your image file
  },
  parameters={
    "classes": ["class1", "class2", "class3"]
  },
  use_cache=True  # cache workflow definition for 15 minutes
)

# 4. Get your results
print(result)

Deploy this workflow to your Roboflow workspace to use it.

// Inference runs on your Roboflow credits — no provider API key needed. To bill your own provider account instead, add an api_key to the model step in the Roboflow workflow editor.
const response = await fetch('https://serverless.roboflow.com/your-workspace/workflows/claude-sonnet-5-object-detection', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    api_key: 'YOUR_API_KEY',
    inputs: {
      "image": {"type": "url", "value": "IMAGE_URL"},
      "classes": ["class1", "class2", "class3"]
    }
  })
});

const result = await response.json();
console.log(result);

Deploy this workflow to your Roboflow workspace to use it.

# Inference runs on your Roboflow credits — no provider API key needed. To bill your own provider account instead, add an api_key to the model step in the Roboflow workflow editor.
curl --location 'https://serverless.roboflow.com/your-workspace/workflows/claude-sonnet-5-object-detection' \
--header 'Content-Type: application/json' \
--data '{
  "api_key": "YOUR_API_KEY",
  "inputs": {
    "image": {"type": "url", "value": "IMAGE_URL"},
    "classes": ["class1", "class2", "class3"]
  }
}'

Claude Sonnet 5 License

Proprietary

Claude Sonnet 5 is proprietary: the weights are not distributed, and the Claude Sonnet 5 license is the vendor's commercial terms of service that you accept when you call the API.

Commercial use
Permitted under the vendor terms, typically metered per token or per request, with the vendor usage policy applying to your inputs and outputs.
Modification
Not available. Claude Sonnet 5 weights are closed, so you can configure prompts and use vendor-hosted fine-tuning where it is offered, but you cannot modify the model itself.
Redistribution
Not permitted. You cannot self-host or resell the model; you build on the hosted API instead.

Vendor terms govern data retention, whether your inputs can be trained on, rate limits, and regional availability, and they can change with notice. Review them if you handle regulated or customer data.

Do I need a commercial license for Claude Sonnet 5?

Proprietary terms are set by the vendor rather than negotiated per project, and no open-source obligation attaches to your code. If you would rather deploy a model whose commercial license is included in your plan — on Roboflow Managed Cloud or a Self-Hosted Inference Server — Roboflow's licensing page lists the supported alternatives to Claude Sonnet 5.

Do not hesitate to reach out with questions for your commercial project — our team will help you start solving business problems on the first call. See Roboflow commercial licensing for the models included in each plan.

Talk to sales

This model is proprietary. The author retains all rights, and use of the model is governed by their specific terms of service or license agreement.

Commercial use depends on the terms set by the model author. Most proprietary commercial models require a paid subscription, API key, or per-call billing. Check the provider’s pricing and terms-of-service for details.

License information is provided as a guide and is not legal advice.

Frequently Asked Questions About Claude Sonnet 5 Vision

Yes. Claude Sonnet 5 accepts image input and handles OCR, data extraction, object counting, identification, visual reasoning, and object detection. On Roboflow's Vision Evals its strongest task is Data Extraction at 89.7% (#8 of 30). You can test it on your own image in the demo above.

Yes. its transcriptions match the ground truth 91.7% on average (#12 of 30) on Vision Evals OCR. Pulling specific fields out of documents (data extraction) scores 89.7%.

Not its strength. On Vision Evals, Claude Sonnet 5 scores 36.1% mAP@50 on object detection (#25 of 30) and 56.8% exact-match accuracy on object counting. For production counting or precise localization, pairing it with a specialized detector like RF-DETR or your own trained model in a Roboflow Workflow is usually more reliable: detect the objects, then count the detections.

On our benchmark's task mix, Claude Sonnet 5 averages $0.0064 per sample at $2.00 per 1M input and $10.00 per 1M output tokens (#16 of 30 on cost), with an average speed of 4.8s per sample across the benchmark. Actual cost depends on your images and prompts.

On the overall Vision Evals ranking, Claude Sonnet 5 sits #21 of 30 at 66.4%, just behind Kimi K3 (66.5%) and just ahead of Gemini 2.5 Pro (66%). See the full side-by-side: Claude Sonnet 5 vs Kimi K3.