NezhaGateNezhaGate
Chat

Claude Sonnet 5

⧉
claude-sonnet-5

Claude Sonnet 5 is Anthropic's new-generation Sonnet: Sonnet-tier speed and price, with coding and agentic work close to Opus. Adaptive thinking is on by default, and five effort levels (low to max) trade depth for speed. It supports image understanding, tool use and prompt caching. Fully OpenAI-API compatible: set model to claude-sonnet-5; or use the native Anthropic Messages API so Claude Code connects directly.

ChatCodeAgentsImage understandingPrompt caching

Live Test · Playground

Try out Claude Sonnet 5 right here (available after login).

Input

Advanced
Web search
Memory · multi-turn
Thinking

Conversation

Start a conversationType a message below to begin

About Claude Sonnet 5

Claude Sonnet 5 is the newest model in Anthropic's Sonnet line - the Sonnet of the Claude 5 generation. It keeps Sonnet-tier speed and price while bringing coding and agentic work close to Opus quality. Adaptive thinking is on by default: the model decides how long to reason, answering simple requests directly and working through harder ones first, and five effort levels (low / medium / high / xhigh / max) let you trade depth for speed. It supports image input, tool use and prompt caching. NezhaGate serves it two ways: the OpenAI-compatible endpoint (point base_url at NezhaGate, set model to claude-sonnet-5, reuse your OpenAI SDK unchanged), and the native Anthropic Messages API (point ANTHROPIC_BASE_URL at NezhaGate's /anthropic so Claude Code connects directly, with thinking, tool_use and prompt caching intact). Billing is pay-as-you-go and failed requests are not charged.

Use cases

Everyday coding and agents

Write, refactor and debug code, and run multi-step agent loops with tool calls - a strong default for coding assistants and bots that make many calls a day.

High-volume production traffic

Support replies, extraction, summarization and classification at scale, where you want quality close to Opus without paying Opus rates.

Long documents and codebases

Summarize, extract from and answer questions over contracts, papers, manuals and repositories; prompt caching makes repeated questions over the same material much cheaper.

Reasoning depth on demand

Keep effort at low for quick chat and raise it to high or xhigh for hard bugs and planning; the per-token price is the same at every level.

Mixed text and image tasks

Read screenshots, charts and design mockups and respond with analysis or code; both base64 and remote image URLs are accepted.

How to choose

Make Claude Sonnet 5 your default Claude for most work: it is faster and cheaper than Claude Opus 5 and close to it on coding and agentic tasks. Step up to Claude Opus 5 for the hardest reasoning and the largest code projects, or switch to Claude Fable 5 for narrative and long-form writing; keep Claude Sonnet 4.6 for workflows already tuned to it. All of them switch with a single model field on the same endpoint.

FAQ

What is Claude Sonnet 5?
Claude Sonnet 5 is Anthropic's newest Sonnet model, part of the Claude 5 generation. It aims for near-Opus quality on coding and agentic work at Sonnet speed and price, with adaptive thinking on by default, image input, tool use and prompt caching. On NezhaGate you can call it through the OpenAI-compatible API or the native Anthropic Messages API.
How is it different from Claude Sonnet 4.6?
It is a newer generation: stronger at coding and agents, adaptive thinking on by default (Sonnet 4.6 only thinks when asked), a fifth effort level (xhigh), and higher-resolution image understanding. Anthropic's list price is also lower - $2 / $10 per million input / output tokens versus $3 / $15. When comparing bills, note that Sonnet 5 uses a newer tokenizer that counts roughly 30% more tokens for the same text, so compare the cost of a finished task rather than the per-token rate.
Why is my temperature ignored?
Anthropic no longer takes temperature / top_p / top_k on this generation. So that existing OpenAI SDK code keeps working unchanged, the gateway strips those three parameters before forwarding: the request succeeds, no error is raised, and sampling runs at the model default. To steer the output, use reasoning_effort (low / medium / high / xhigh / max) - every level costs the same per token; deeper thinking simply produces more tokens.
Can I turn thinking off?
Yes. On the native Anthropic Messages API, send thinking: {"type": "disabled"} and the model answers directly, which is fastest and cheapest. On the OpenAI-compatible endpoint, reasoning_effort: low comes close. Whenever the model does think, thinking tokens are billed as output.
Can Claude Code connect directly?
Yes. Point ANTHROPIC_BASE_URL at NezhaGate's /anthropic, use your gateway key as x-api-key and set model to claude-sonnet-5. Thinking, tool_use, prompt caching and streaming SSE all pass through unchanged.

Related Models

Explore other models you can integrate.

View all →