ModelsSupportEnterpriseBlog
500+ AI Model API, All In One API.Just In CometAPI
Models API
Developer
Quick StartDocumentationAPI Dashboard
Resources
AI ModelsBlogEnterpriseChangelogAbout
2025 CometAPI. All right reserved.Privacy PolicyTerms of Service
Home/Models/Anthropic/Claude Sonnet 4.6
A

Claude Sonnet 4.6

Input:$2.4/M
Output:$12/M
Claude Sonnet 4.6 is our most capable Sonnet model yet. It’s a full upgrade of the model’s skills across coding, computer use, long-context reasoning, agent planning, knowledge work, and design. Sonnet 4.6 also features a 1M token context window in beta.
New
Commercial Use
Playground
Overview
Features
Pricing
API
Versions

Technical specifications — Claude Sonnet 4.6

ItemClaude Sonnet 4.6 (public summary)
ProviderAnthropic
Model familySonnet (Claude v4.x family) — Sonnet 4.6 variant
Model id (canonical)claude-sonnet-4-6
Input typesText (primary). Limited/secondary support for structured tool/JSON I/O. Not positioned as a primary image-generation model.
Output typesText (natural language, structured JSON, code, and tool-call payloads)
Context window~200,000 tokens (approx.) — designed for multi-document and long-session coherence
Function-calling / tool useYes — structured tool invocation, JSON-constrained outputs, agent-style orchestration supported
MultimodalityLimited — Sonnet is focused on text and structured tool integration; not optimized for image generation.
Release note highlightsStability/improvements in long-context reasoning, lower-latency Sonnet variant tuned for speed–accuracy tradeoffs, improved instruction adherence.

What Is Claude Sonnet 4.6

Claude Sonnet 4.6 is the latest evolution of Anthropic’s Sonnet model line, designed to deliver near-Opus performance at a more accessible price point. It upgrades Sonnet from its earlier 4.5 iteration, bringing stronger instruction following, vastly expanded context support, improved coding and computer use skills, and broader multi-step reasoning abilities — all while maintaining pricing parity with Sonnet 4.5.

Unlike Opus models, which are flagship and optimized for heavy agentic workloads, Sonnet 4.6 targets developers and general knowledge work where broad capability and cost-effectiveness matter.

Main Features of Claude Sonnet 4.6

  • 1M Token Context Window (Beta): Sonnet 4.6 supports up to one million tokens of context in beta — roughly enough to ingest entire codebases, stacks of legal contracts, or multiple academic papers in a single request.
  • Improved Coding Performance: Compared with Sonnet 4.5, Sonnet 4.6 shows significant gains in real-world developer tasks and benchmarks like SWE-Bench Verified (~79.6% score reported), making it suitable for complex coding tasks.
  • Enhanced Computer Use: New levels of competency in tasks involving operating software (spreadsheets, multi-step web form workflows, etc.) approaching human-level performance on OSWorld-Verified tests.
  • Adaptive Thinking: The model incorporates enhanced reasoning strategies and can dynamically allocate internal computation to tackle complex problems step by step.
  • Stronger Instruction Following: Users report more consistency and precision in following detailed requests, with fewer hallucinations and better task completion.
  • Safety & Prompt Injection Resistance: Anthropic has improved robustness over Sonnet 4.5 in resisting prompt injection attacks and similar vulnerabilities.

Benchmark Performance of Claude Sonnet 4.6

EvaluationClaude Sonnet 4.6 (approx.)Notes
SWE-Bench Verified~79.6%Strong coding performance close to Opus-class.
OSWorld-Verified (Computer Use)~72.5%Near human-level task performance; powerful for workflows.
ARC-AGI-2~60.4%Reflects broad reasoning strength.

As a mid-tier model, Sonnet 4.6 narrows the performance gap with Opus models significantly, making it suitable for many tasks previously reserved for flagship class.

Claude Sonnet 4.6 vs Other Claude Models

ModelBest ForKey Differences
Claude Sonnet 4.6Balanced coding, reasoning, large contextsMassive context window beta, cost-efficient, strong for workflow tasks.
Claude Sonnet 4.5Mid-tier general tasksLower benchmarks, smaller context window before 4.6.
Claude Opus 4.6Deep reasoning & agentic codingStronger raw reasoning and agent capabilities; pricier.

Compared to Sonnet 4.5, the 4.6 release boosts contextual understanding and performance on office-style tasks; compared to Opus models, Sonnet sits slightly below in flagship reasoning power but often closer than expected in coding and general task benchmarks.


Limitations of Claude Sonnet 4.6

  • Beta Context Window: The 1M token context is currently in beta — adoption and stability may vary depending on API usage and plan.
  • Latency & Cost: Handling very large contexts increases computational cost and may introduce higher latency on API calls relative to smaller contexts.
  • Benchmark Granularity: While strong in reported tests, Sonnet may lag a bit behind Opus on the most complex reasoning or multidisciplinary benchmarks.

Representative Use Cases of Claude Sonnet 4.6

  1. Large Codebase Assistance: Ideal for ingesting and reasoning about entire software systems, refactorings, or cross-file dependencies.
  2. Document & Research Synthesis: Useful for long-document analysis where context extends beyond typical limits.
  3. Workflow Automation: Solving multi-step computer tasks, such as spreadsheets and form automation.
  4. General Knowledge Work: Suitable for knowledge workers needing reliable instruction following and reasoning without the cost of flagship models.

How to access and use Claude Sonnet 4.6 API

Step 1: Sign Up for API Key

Log in to cometapi.com. If you are not our user yet, please register first. Sign into your CometAPI console. Get the access credential API key of the interface. Click “Add Token” at the API token in the personal center, get the token key: sk-xxxxx and submit.

Step 2: Send Requests to claude-sonnet-4-6 API

Select the “claude-opus-4-6” endpoint to send the API request and set the request body. The request method and request body are obtained from our website API doc. Our website also provides Apifox test for your convenience. Replace <YOUR_API_KEY> with your actual CometAPI key from your account. Where to call it:  Anthropic Messages format and Chat format.

Insert your question or request into the content field—this is what the model will respond to . Process the API response to get the generated answer.

Step 3: Retrieve and Verify Results

Process the API response to get the generated answer. After processing, the API responds with the task status and output data.

FAQ

How large is the context window in the Claude Sonnet 4.6 API?

Claude Sonnet 4.6 supports a 1,000,000-token context window in beta, allowing developers to process entire codebases, contracts, or research datasets within a single request.

How does Claude Sonnet 4.6 compare with Claude Opus 4.6?

Sonnet 4.6 is a mid-tier model designed to deliver near-Opus performance at lower cost, while Opus 4.6 remains Anthropic’s flagship model for the most complex reasoning and research tasks.

Can Claude Sonnet 4.6 handle large software engineering projects?

Yes. Sonnet 4.6 performs strongly on software engineering benchmarks such as SWE-Bench Verified, achieving around 79.6%, making it well suited for repository-scale coding and debugging.

What new capabilities were added in Claude Sonnet 4.6 compared with Sonnet 4.5?

Sonnet 4.6 introduces a 1M token context window, improved coding accuracy, better instruction following, and stronger computer-use capabilities across software environments.

Is Claude Sonnet 4.6 suitable for agent workflows and automation?

Yes. The model supports tool calling, web search, and programmatic workflows, making it effective for building AI agents that perform multi-step tasks.

Which platforms support the Claude Sonnet 4.6 API?

Claude Sonnet 4.6 is available through CometAPI’s API .

Features for Claude Sonnet 4.6

Explore the key features of Claude Sonnet 4.6, designed to enhance performance and usability. Discover how these capabilities can benefit your projects and improve user experience.

Pricing for Claude Sonnet 4.6

Explore competitive pricing for Claude Sonnet 4.6, designed to fit various budgets and usage needs. Our flexible plans ensure you only pay for what you use, making it easy to scale as your requirements grow. Discover how Claude Sonnet 4.6 can enhance your projects while keeping costs manageable.
Comet Price (USD / M Tokens)Official Price (USD / M Tokens)Discount
Input:$2.4/M
Output:$12/M
Input:$3/M
Output:$15/M
-20%

Sample code and API for Claude Sonnet 4.6

Access comprehensive sample code and API resources for Claude Sonnet 4.6 to streamline your integration process. Our detailed documentation provides step-by-step guidance, helping you leverage the full potential of Claude Sonnet 4.6 in your projects.
POST
/v1/messages
POST
/v1/chat/completions
Python
JavaScript
Curl
import anthropic
import os

# Get your CometAPI key from https://api.cometapi.com/console/token, and paste it here
COMETAPI_KEY = os.environ.get("COMETAPI_KEY") or "<YOUR_COMETAPI_KEY>"
BASE_URL = "https://api.cometapi.com"

message = anthropic.Anthropic(
    base_url=BASE_URL,
    api_key=COMETAPI_KEY,
)
messages = message.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello, Claude"}],
)
print(messages.content[0].text)

Python Code Example

import anthropic
import os

# Get your CometAPI key from https://api.cometapi.com/console/token, and paste it here
COMETAPI_KEY = os.environ.get("COMETAPI_KEY") or "<YOUR_COMETAPI_KEY>"
BASE_URL = "https://api.cometapi.com"

message = anthropic.Anthropic(
    base_url=BASE_URL,
    api_key=COMETAPI_KEY,
)
messages = message.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello, Claude"}],
)
print(messages.content[0].text)

JavaScript Code Example

import Anthropic from "@anthropic-ai/sdk";

// Get your CometAPI key from https://api.cometapi.com/console/token, and paste it here
const api_key = process.env.COMETAPI_KEY || "<YOUR_COMETAPI_KEY>";
const base_url = "https://api.cometapi.com";

const anthropic = new Anthropic({
  apiKey: api_key,
  baseURL: base_url,
});

const message = await anthropic.messages.create({
  model: "claude-sonnet-4-6",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Hello, Claude" }],
});
console.log(message.content[0].text);

Curl Code Example

curl https://api.cometapi.com/v1/messages \
     --header "Authorization: $COMETAPI_KEY" \
     --header "content-type: application/json" \
     --data \
'{
    "model": "claude-sonnet-4-6",
    "max_tokens": 1024,
    "messages": [
        {"role": "user", "content": "Hello, Claude"}
    ]
}'

Versions of Claude Sonnet 4.6

The reason Claude Sonnet 4.6 has multiple snapshots may include potential factors such as variations in output after updates requiring older snapshots for consistency, providing developers a transition period for adaptation and migration, and different snapshots corresponding to global or regional endpoints to optimize user experience. For detailed differences between versions, please refer to the official documentation.
version
claude-sonnet-4-6-thinking
claude-sonnet-4-6

More Models

A

Claude Opus 4.6

Input:$4/M
Output:$20/M
Claude Opus 4.6 is Anthropic’s “Opus”-class large language model, released February 2026. It is positioned as a workhorse for knowledge-work and research workflows — improving long-context reasoning, multi-step planning, tool use (including agentic software workflows), and computer-use tasks such as automated slide and spreadsheet generation.
O

GPT-5.4 nano

Input:$0.16/M
Output:$1/M
GPT-5.4 nano is designed for tasks where speed and cost matter most like classification, data extraction, ranking, and sub-agents.
O

GPT-5.4 mini

Input:$0.6/M
Output:$3.6/M
GPT-5.4 mini brings the strengths of GPT-5.4 to a faster, more efficient model designed for high-volume workloads.
A

Claude Mythos Preview

A

Claude Mythos Preview

Coming soon
Input:$60/M
Output:$240/M
Claude Mythos Preview is our most capable frontier model to date, and shows a striking leap in scores on many evaluation benchmarks compared to our previous frontier model, Claude Opus 4.6.
X

mimo-v2-pro

Input:$0.8/M
Output:$2.4/M
MiMo-V2-Pro is Xiaomi's flagship foundation model, featuring over 1T total parameters and a 1M context length, deeply optimized for agentic scenarios. It is highly adaptable to general agent frameworks like OpenClaw. It ranks among the global top tier in the standard PinchBench and ClawBench benchmarks, with perceived performance approaching that of Opus 4.6. MiMo-V2-Pro is designed to serve as the brain of agent systems, orchestrating complex workflows, driving production engineering tasks, and delivering results reliably.
X

mimo-v2-omni

Input:$0.32/M
Output:$1.6/M
MiMo-V2-Omni is a frontier omni-modal model that natively processes image, video, and audio inputs within a unified architecture. It combines strong multimodal perception with agentic capability - visual grounding, multi-step planning, tool use, and code execution - making it well-suited for complex real-world tasks that span modalities. 256K context window.

Related Blog

Claude Mythos Preview is coming: Can I use this top-of-the-line model now?
Apr 8, 2026
claude-mythos

Claude Mythos Preview is coming: Can I use this top-of-the-line model now?

Claude Mythos Preview, Anthropic's next-generation cutting-edge model, is also the most powerful model trained by Anthropic to date. Its benchmark scores completely outperform the previous generation, Opus 4.6. However, this model will not be publicly released at this time. Anthropic has chosen a completely different release approach: only allowing a select few partners to use it, and only for one purpose: finding vulnerabilities.
Why Is Claude AI So Good at Coding in 2026?
Apr 4, 2026

Why Is Claude AI So Good at Coding in 2026?

Claude (especially Opus 4.6 and Sonnet 4.6) leads 2026 coding benchmarks with ~80.8% on SWE-bench Verified — outperforming or matching GPT-5.4 and Gemini 3.1 Pro on real GitHub issue resolution, agentic workflows, and large-codebase refactoring. Its edge comes from 1M-token context, advanced tool-use agents via Claude Code, superior intent understanding, and RLAIF training that emphasizes self-correction.
What Is Auto Compact in Claude Code
Mar 31, 2026
claude-code

What Is Auto Compact in Claude Code

Auto Compact in Claude Code is Anthropic’s intelligent context management feature that automatically summarizes and compresses long conversation histories when approaching the ~200k token context window limit. It analyzes key decisions, code changes, and project state, replaces older messages with a concise summary, and lets you continue coding seamlessly—preventing crashes, token waste, and context loss in extended development sessions. Since version 2.0.64 (early 2026), compaction is near-instant, with manual `/compact` commands and configurable API options for power users.
Can I Use Claude Code in VSCode in 2026
Mar 30, 2026
claude-code

Can I Use Claude Code in VSCode in 2026

You can use Claude Code in VS Code. Anthropic’s current docs say the VS Code extension is the recommended way to use Claude Code in the editor, with inline diffs, @-mentions, plan review, and conversation history. You can also run the Claude Code CLI inside VS Code’s integrated terminal for advanced workflows and CLI-only features.
Claude Mythos(Opus 5) Leaked: What happened and What to expect
Mar 29, 2026
claude-mythos

Claude Mythos(Opus 5) Leaked: What happened and What to expect

Claude Mythos, internally codenamed Capybara and positioned as the next tier above Claude Opus (potentially Opus 5 equivalent), is Anthropic’s unreleased flagship AI model. Leaked draft documents reveal it delivers “dramatically higher scores” than Claude Opus 4.6 in software coding, academic reasoning, and cybersecurity. It represents a “step change” in capabilities and is currently in limited early-access testing due to unprecedented cybersecurity risks.