Claude Sonnet 4.6
⧉Claude Sonnet 4.6 strikes an excellent balance between capability and speed, excelling at everyday chat, code and agents at a great price. Fully OpenAI-API compatible: set model to claude-sonnet-4-6 and you are connected.
What is the Claude Sonnet 4.6 API and what does it cost?
Claude Sonnet 4.6 is an Anthropic Claude model released on February 17, 2026, with a 1M-token context window and up to 128K output tokens. NezhaGate serves it through an OpenAI-compatible endpoint and through the native Anthropic Messages API used by Claude Code. On NezhaGate it costs $1.50 per 1M input tokens and $7.50 per 1M output tokens (Anthropic list price: $3 / $15). Base URL: https://nezhagate.com/v1 (OpenAI-compatible).
Measured performance
Real streaming requests sent through the public NezhaGate API. Test window 2026-10-20 18:17 – 2026-10-20 18:40 UTC; sample size 100.
How this was measured
POST /v1/chat/completions with stream: true, one at a time with a 1-second gap, rotating through 10 prompts that each ask for about 200 words on a software topic, max_tokens 2500, reasoning_effort not sent (model default).
Time to first token runs from sending the request to the first streamed token of any kind (answer or reasoning text).
Output speed is answer tokens divided by the time from the first to the last answer token; reasoning tokens are subtracted when the API reports them, and a request is left out when the token count cannot be separated from hidden thinking.
Success means HTTP 200 and a completed stream with a non-empty answer. Percentiles are nearest-rank over successful requests. The test key belongs to an internal account, so these calls are not part of the public success-rate figures elsewhere on the site.
Measurements are repeated every week and this page updates itself; the date above is the latest run.
Cost example
NezhaGate figures use the live price on this page; vendor figures use the vendor's published list price (sources below).
1,000 coding-assistant calls
Each call sends 20,000 input tokens and receives 2,000 output tokens, without prompt caching.
| Where | Cost | Difference |
|---|---|---|
| NezhaGate | $45.00 | — |
| Anthropic API list price | $90.00 | NezhaGate 50% cheaper |
With prompt caching, NezhaGate bills cache reads at $0.15 per 1M tokens (1/10 of input) and cache writes at 1.25x input. Anthropic lists $0.30 for cache reads and $3.75 for 5-minute cache writes.
Vendor list prices checked 2026-09-25: Anthropic pricing.
Parameters & capabilities
"Vendor spec" is what the model's maker publishes. "Via NezhaGate" is what our own requests through the gateway showed (last checked 2026-10-20).
| Item | Vendor spec | Via NezhaGate |
|---|---|---|
| Model id | claude-sonnet-4-6 Anthropic: Claude Sonnet 4.6 overview |
claude-sonnet-4-6 |
| Endpoints | — | /v1/chat/completions (OpenAI format) and /anthropic/v1/messages (native Anthropic, for Claude Code and the Anthropic SDK) |
| Price per 1M tokens | $3 input · $15 output · $0.30 cache read · $3.75 cache write (5 min) Anthropic pricing | $1.50 input · $7.50 output · $0.15 cache read · 1.25x input cache write |
| Context window | 1M tokens Anthropic: Claude Sonnet 4.6 overview | Not measured by us |
| Max output | 128K tokens Anthropic: Claude Sonnet 4.6 overview | ✓ max_tokens is enforced (stops with finish_reason: length) |
| Vendor status | Legacy (Anthropic model overview) Anthropic: Claude Sonnet 4.6 overview | Served |
| Streaming | — | ✓ Yes (SSE), with usage in the final chunk |
| Tool calling | — | ✓ Yes, OpenAI tools / tool_calls format |
| Image input (vision) | — | ✓ Yes (image_url, base64 data: URL tested) |
| JSON mode | — | ✓ Yes, response_format: json_object returned bare JSON |
| Structured output | — | ✗ Not enforced: the reply did not follow the schema in our test |
| Extended thinking | — | ✓ Yes: reasoning_effort turns it on and the thinking comes back in reasoning_content |
Tool setup
Base URL https://nezhagate.com/v1, your NezhaGate API key, and the model id claude-sonnet-4-6. Request and response samples (cURL, Python, Node.js) are in the Claude Sonnet 4.6 API docs.
- Open Cursor Settings → Models.
- Under API Keys, paste your NezhaGate key into OpenAI API Key, turn on Override OpenAI Base URL and enter
https://nezhagate.com/v1. - Add a custom model named
claude-sonnet-4-6, enable it, and pick it in the chat model menu.
Differences from the official API & known limits
/v1/responsesis not available for this model. Use/v1/chat/completionsor the native/anthropic/v1/messages.- On
/anthropic/v1/messages,max_tokensis required (HTTP 400 without it), and theanthropic-versionandanthropic-betaheaders are passed through unchanged. - Other request parameters on the OpenAI-compatible route are passed to the model unchanged; if the model provider rejects one with a 4xx error, you receive that error and the call is not billed.
- No Batch API: Anthropic's batch discount does not apply; every call is billed at the rate on this page.
- Prompt caching works on both routes: a byte-identical prefix repeated within a short window is billed as a cache read at 1/10 of the input rate. Short prompts are not cached; Claude Code with a large
CLAUDE.mdusually hits on every turn.
Claude Sonnet 4.6 API: frequently asked questions
How do I use Claude Sonnet 4.6 in Claude Code?
ANTHROPIC_BASE_URL to https://nezhagate.com/anthropic, put your NezhaGate key in ANTHROPIC_API_KEY, and set ANTHROPIC_MODEL and ANTHROPIC_DEFAULT_HAIKU_MODEL to claude-sonnet-4-6 (NezhaGate serves no Haiku model). The full settings.json snippet is in the Claude Code tab above.How much does Claude Sonnet 4.6 cost on NezhaGate compared with Anthropic?
Can I call Claude Sonnet 4.6 with the OpenAI SDK?
https://nezhagate.com/v1 and set model to claude-sonnet-4-6. Tool calling, image input and streaming work in the OpenAI format.How fast is Claude Sonnet 4.6 through NezhaGate?
Are failed requests billed?
Live Test · Playground
Try out Claude Sonnet 4.6 right here (available after login).
Input
Advanced
Conversation
About Claude Sonnet 4.6
Claude Sonnet 4.6 is Anthropic's balanced-tier chat and coding model, tuned to sit between deep reasoning, response speed, and running cost. It is strong at multi-turn conversation, code generation and review, and long-context document work. On NezhaGate it is served through an OpenAI-compatible API: point your base_url at NezhaGate, set the model to claude-sonnet-4-6, and reuse your existing OpenAI SDK. Billing is pay-as-you-go, and failed requests are not charged.
Use cases
Generate functions, refactor snippets, locate bugs, and explain fixes as a day-to-day pair-programming assistant.
Summarize, extract from, and answer questions over contracts, papers, and technical manuals while staying coherent across long context.
Power multi-turn support and knowledge-base bots that balance answer quality against per-call cost.
Pull fields from emails, tickets, or web pages and return clean JSON for downstream workflows.
Expand, rewrite, translate, and adjust the tone of copy with a healthy quality-to-throughput ratio.
How to choose
Pick Claude Sonnet 4.6 when your workload is everyday chat, coding, and moderate reasoning and you want to keep costs in check — for a new project, try the newer Claude Sonnet 5 first. For deeper reasoning, code engineering or agent orchestration switch to Claude Opus 5; for narrative and long-form writing switch to Claude Fable 5. For the hardest reasoning or large code projects you can also step up to GPT-5.6 Sol or Gemini 3.1 Pro, or drop to Gemini 3.6 Flash Low or GPT-5.6 Luna when you need lower latency for high-volume, lightweight calls. All the Claude models share one endpoint — just change the model field.
Related Models
Explore other models you can integrate.
Claude Opus 5
Next-generation flagship from Anthropic
Claude Fable 5
Anthropic Fable series · narrative and long-form writing
Gemini 3.1 Pro
Next-generation flagship reasoning model from Google