Claude Sonnet 5 is Anthropic's Sonnet-class model released in June 2026. In Jantaris it has a 1,000,000-token context window, which is both its default and its maximum, and up to 128K output tokens. Anthropic calls it the most agentic Sonnet so far: it makes plans, works with browsers and terminals and runs on its own for longer stretches. Anthropic places its results close to Claude Opus 4.8 at a lower price, with gains over Sonnet 4.6 in reasoning, tool use, coding and knowledge work.
Best for
- Day-to-day coding in Claude Code, Cursor or Cline
- Debugging messy legacy code down to the root cause
- Agents that call tools and APIs in multi-step loops
- Drafting reports, emails and documentation at volume
How to call it
Swap the base URL in the OpenAI SDK and use the id claude-sonnet-5:
from openai import OpenAI
client = OpenAI(base_url="https://jantaris.com/v1", api_key="sk-jt-...")
resp = client.chat.completions.create(
model="claude-sonnet-5",
messages=[{"role": "user", "content": "Write unit tests for utils/dates.py."}],
)
print(resp.choices[0].message.content)It also works with the Anthropic SDK and Claude Code through /v1/messages, see the Claude Code guide.
FAQ
How much does Claude Sonnet 5 cost per 1M tokens?
In Jantaris: $3.24 / $16.20 per 1M tokens. Anthropic notes that Sonnet 5 uses a new tokenizer that produces about 30% more tokens for the same text than Sonnet 4.6, so compare the cost of whole requests, not just the rate per token.
Why does Sonnet 5 return a 400 error for my temperature setting?
Anthropic changed this in Sonnet 5: non-default values of temperature, top_p or top_k are rejected. Remove those parameters from the request. Adaptive thinking is also on by default.
Sonnet 5 or Opus 5.5 for Claude Code?
Sonnet 5 is the cheaper default for routine tasks. Switch to Claude Opus 5.5 for large migrations or long autonomous sessions where one extra mistake costs more than the price difference.
How to call Claude Sonnet 5 via API
from openai import OpenAI
client = OpenAI(base_url="https://jantaris.com/v1", api_key="sk-jt-...")
resp = client.chat.completions.create(
model="claude-sonnet-5",
messages=[{"role": "user", "content": "Write a haiku about Baltic amber."}],
)
print(resp.choices[0].message.content)curl https://jantaris.com/v1/chat/completions \
-H "Authorization: Bearer $JANTARIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "claude-sonnet-5", "messages": [{"role": "user", "content": "Write a haiku about Baltic amber."}]}'import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://jantaris.com/v1", apiKey: process.env.JANTARIS_API_KEY });
const resp = await client.chat.completions.create({
model: "claude-sonnet-5",
messages: [{ role: "user", content: "Write a haiku about Baltic amber." }],
});
console.log(resp.choices[0].message.content);export ANTHROPIC_BASE_URL=https://jantaris.com
export ANTHROPIC_AUTH_TOKEN=sk-jt-...
export ANTHROPIC_MODEL=claude-sonnet-5
claude









