Cập nhật
What is the Claude Sonnet 4.6 API?
The Claude Sonnet 4.6 API is live on UnificAlly as anthropic/claude-sonnet-4-6, from $0.45/1M tokens of input. Claude Sonnet 4.6 is Anthropic's February 17, 2026 Sonnet model, built for coding, agents, computer use, long-context reasoning, and document work. It sits between the older Sonnet 4.5 and the newer Sonnet 5 in the Sonnet family, and runs on UnificAlly as anthropic/claude-sonnet-4-6. It accepts text and image input and outputs text. Its strength is balance: near-Opus results on many software, browser, and knowledge-work tasks without paying for the heaviest model in the Claude line. It does its best work when a task needs broad context, careful tool use, and follow-through across many steps.
Claude Sonnet 4.6 API specs
| Model ID | anthropic/claude-sonnet-4-6 |
| Endpoint | POST https://direct-api.unifically.com/v1/chat/completions |
| Other API formats | POST /v1/responses, POST /v1/messages |
| Request types | Chat, streaming, tool calls |
| Response | The full reply in one JSON response, or server-sent events with stream set to true |
| Input rate | $0.45/1M tokens |
| Output rate | $2.25/1M tokens |
| Cache read rate | $0.045/1M tokens |
| Cache creation rate | $0.5625/1M tokens |
Billing is per token, with no subscription. The Claude API pricing guide covers the rates for every Claude model.
How to use the Claude Sonnet 4.6 API
The Claude Sonnet 4.6 API uses /v1/chat/completions, the OpenAI-compatible endpoint shared by every language model on UnificAlly.
- Create an API key on the API keys page.
- Send a POST request to
/v1/chat/completionsonhttps://direct-api.unifically.comwith the model ID and amessagesarray. - Read the reply from
choices[0].message.contentin the same response.
curl -X POST https://direct-api.unifically.com/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_API_KEY" -d '{
"model": "anthropic/claude-sonnet-4-6",
"messages": [
{ "role": "user", "content": "Trace why this test fails intermittently and propose a fix." }
]
}'
The response comes back synchronously with the completion:
{
"id": "3f8e2a1c-7b4d-4e9a-9c2f-5d1e8b7a6c40",
"object": "chat.completion",
"created": 1710000000,
"model": "anthropic/claude-sonnet-4-6",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "The test shares a temp directory with another test..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 28,
"completion_tokens": 64,
"total_tokens": 92,
"prompt_tokens_details": {
"cached_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 0
}
}
}
The usage object holds the token counts for the request. Set "stream": true to receive tokens as they generate. The stream ends with data: [DONE].
Claude Sonnet 4.6 API parameters
| Parameter | Type | Default | What it does |
|---|---|---|---|
model | string | required | Model identifier, anthropic/claude-sonnet-4-6 |
messages | array | required | Non-empty array of message objects with role and content (a string or a content parts array). Allowed roles are system, developer, user, assistant, tool, and function |
stream | boolean | false | If true, the response is streamed using server-sent events |
stream_options | object | none | Set { "include_usage": true } to get a final chunk with token usage. Only used when stream is true |
temperature | number | none | Sampling temperature between 0 and 2. Higher values produce more random output |
max_tokens | integer | none | Maximum number of tokens to generate in the completion |
max_completion_tokens | integer | none | Accepted as an alias for max_tokens |
reasoning_effort | string | none | How much the model reasons before answering |
top_p | number | none | Nucleus sampling parameter. Alternative to temperature |
stop | string or array | none | Up to four sequences where the model stops generating further tokens |
tools | array | none | List of tools the model may call. Each tool requires a type and function definition |
tool_choice | string or object | none | Controls which tool is called, if any. Options are none, auto, required, or a specific tool |
response_format | object | none | Set { "type": "json_object" } to enable JSON mode when supported by the model |
The Claude Sonnet 4.6 API documentation has the full reference, with the Responses and Messages formats.
Messages request
To work in Anthropic's own format, call /v1/messages with the same key.
curl -X POST https://direct-api.unifically.com/v1/messages -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_API_KEY" -H "anthropic-version: 2023-06-01" -d '{
"model": "anthropic/claude-sonnet-4-6",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Review this function for potential bugs."}
]
}'
Key features of Claude Sonnet 4.6
1M token context window
Large codebases, long contracts, research packs, or multi-document work fit in one context, with a callable max output of 128k tokens.
Strong coding results
It scores 79.6% on SWE-bench Verified and 59.1% on Terminal-Bench 2.0, with better codebase reading and follow-through than Sonnet 4.5.
Better computer use
It reaches 72.5% on OSWorld-Verified, close to Claude Opus 4.6 at 72.7%, and holds up on browser and desktop-style tasks that click, type, and read screens.
Adaptive and extended thinking
The model spends more reasoning effort on harder turns and stays fast on simpler ones, without switching models.
Vision and chart reasoning
Image input covers documents, charts, scientific figures, and multimodal Q&A. It scores 74.5% on MMMU-Pro and 72.4% on CharXiv Reasoning, both without tools.
Better prompt-injection resistance
Safety testing shows a large gain over Sonnet 4.5 in coding, browser, and computer-use prompt-injection settings. That matters for agents that read untrusted pages or files.
What Claude Sonnet 4.6 is best for
Large-codebase work
Debugging and feature work where the model must trace a bug across a full repo.
Browser and computer-use agents
Form filling, tab-to-tab comparison, and internal tools, with clear action limits.
Long document review
Contracts, filings, PDFs, and tables held together in one context.
Research agents
Search, synthesis, and long context across many sources.
Frontend generation
Design-heavy coding tasks where visual judgment matters.
Multilingual knowledge work
Broad language coverage, with human review on the output.
Claude Sonnet 4.6 use cases
Build a coding assistant that reads a full repo, traces a bug, writes tests, and applies a fix with fewer false success claims. Use it for document-heavy workflows like contract review, financial research, or policy analysis where the model must hold many files in context. It also fits browser agents that fill forms, compare options across tabs, or operate internal tools. For product teams, Claude Sonnet 4.6 is a good base for agents that draft reports, inspect charts, update spreadsheets, and explain their choices in plain language.
Claude Sonnet 4.6 limitations
Claude Sonnet 4.6 still trails skilled humans on real computer-use work. OSWorld is a controlled benchmark, and real web apps are messier.
The model can be too eager in GUI computer-use tasks. Safety testing observed cases where it used unwanted workarounds when the intended path was blocked. It is more steerable than Opus 4.6 on this behavior, but agent builders should still set clear action limits.
Low-resource language performance drops more than English. On GMMLU, the largest gaps appear in languages such as Igbo, Chichewa, Yoruba, Shona, and Somali.
High-stakes finance, medical, legal, and security outputs need human review. One-pass deliverables are drafts, not final work.
Claude Sonnet 4.6 vs Claude Sonnet 4.5
Claude Sonnet 4.6 is a clear step up on coding, long-context reasoning, computer use, and prompt-injection resistance. It scores 79.6% on SWE-bench Verified versus 77.2% for Sonnet 4.5, and 72.5% on OSWorld-Verified versus 61.4%. Arena's Text board ranks claude-sonnet-4-6 at #23 with a 1472±4 score, ahead of Sonnet 4.5 at #42 with 1455±3. That matches the practical feel: Sonnet 4.6 reads more context before acting and handles multi-step tasks with fewer rough edges.
When to use Claude Sonnet 4.6
Use Claude Sonnet 4.6 when you want a strong general model for agentic software work, browser tasks, long documents, and mixed text-plus-image reasoning. Pick it over Sonnet 4.5 for long sessions and hard coding. Move up to a heavier Claude model when the task needs the deepest reasoning or high-risk autonomy.
Câu hỏi thường gặp
Câu hỏi thường gặp về Claude Sonnet 4.6
anthropic/claude-sonnet-4-6, called through the OpenAI-compatible POST /v1/chat/completions endpoint with your UnificAlly API key.
Requests authenticate with a key from the API keys page, sent as Authorization: Bearer <key> to https://direct-api.unifically.com/v1/chat/completions with the model ID anthropic/claude-sonnet-4-6. Anthropic's /v1/messages format accepts the same key.
Put anthropic/claude-sonnet-4-6 and a messages array in the body; the answer comes back synchronously in the OpenAI chat completions format, or as server-sent events when stream is true. Use reasoning_effort to set how much it reasons, and tools with tool_choice for tool calls.
Text and image input with text output. It handles mixed document work, chart reading, screenshots, and code tasks in the same request.
1M tokens, with a callable max output of 128k tokens. That fits large codebases, long contracts, or many research papers in one run.
Yes. It scores 79.6% on SWE-bench Verified and 59.1% on Terminal-Bench 2.0, with better codebase reading and multi-step fixes than Sonnet 4.5.
Yes, with guardrails. It scores 72.5% on OSWorld-Verified, close to Claude Opus 4.6. Real UI work still has edge cases, and the model can take unwanted shortcuts if instructions are loose, so set clear action limits.
Yes. Claude Sonnet 4.6 supports adaptive thinking and extended thinking, so it spends more effort on harder turns and stays faster on simple ones.
Set clear limits for agents that act in browsers or desktop-style environments. Low-resource language quality drops more than English, and finance, legal, medical, and security outputs need human review.
Hướng dẫn và so sánh Claude Sonnet 4.6
Xem bảng giá, giới hạn và kết quả thử nghiệm thực tế trước khi chạy mô hình này.
Các mô hình tương tự Claude Sonnet 4.6
Xem tất cả mô hình
Claude Sonnet 5 API
Agentic coding, 1M context, 128k output, image input, 85.2% SWE-bench Verified.
- Văn bản thành Văn bản

Claude Opus 4.6 API
1M context, 128k output, effort controls, top Arena Document and Search rank.
- Văn bản thành Văn bản

Claude Fable 5 API
1M context, 128k output, text and image input, adaptive thinking, top Arena Text and Vision rank.
- Văn bản thành Văn bản
GPT 5.4 API
Native computer use, 75% OSWorld-Verified, up to 1M context, 128k output, tool search for agents.
- Văn bản thành Văn bản

