claude-sonnet-5-5 — API, Pricing & Context Window | Vivgrid
Run Anthropic's claude-sonnet-5-5 on Vivgrid: the best balance of speed and intelligence, with a 1M-token context window and 128K max output.
claude-sonnet-5-5 is the latest model in Anthropic's Sonnet tier, offering the best combination of speed and intelligence in the Claude lineup. It keeps the 1M-token context window and 128K-token max output of claude-sonnet-5 at the same per-token price, and runs with adaptive thinking on by default.
On Vivgrid, claude-sonnet-5-5 is geo-distributed across AMER, EMEA, and APAC and reachable on both the native Messages API (/messages) and Chat Completions (/chat/completions). It uses the same unified Vivgrid API key as the rest of the catalog, so moving an agent from claude-sonnet-5 is a model-string change.
Specifications
| Provider | Anthropic |
| Model ID | claude-sonnet-5-5 |
| Best for | Coding |
| Available on | Chat Completions, Vibe coding |
| Context window | 1,000,000 tokens |
| Max output | 128,000 tokens |
| Modalities | Text, Image |
| Tool / function calling | Yes |
| Knowledge cutoff | 2026-06 |
| Acceleration | ⚡ Geo-Distributed — AMER, EMEA, APAC |
Pricing
Pricing in USD per 1M tokens.
| Input | Cached input | Output |
|---|---|---|
| $2.00 | $0.20 | $10.00 |
What one request costs
The rates above applied to a 20K-token prompt with a 2K-token reply — a typical single agent turn, small enough that every request is billed at the base rate.
| Request | Cost |
|---|---|
| Cold prompt, nothing cached | $0.0600 |
| Warm prompt, 90% of the input served from cache | $0.0276 |
Prompt caching is billed at $2.50 per 1M cache-write tokens on the 5-minute TTL and $4.00 per 1M on the 1-hour TTL, with cached reads at $0.20.
Use claude-sonnet-5-5 in your coding agent
claude-sonnet-5-5 works with the same Vivgrid key and https://api.vivgrid.com/v1 endpoint as every other model in the catalog. Grab your API key from the Vivgrid Console, then drop one of the configurations below into your agent of choice.
Claude Code
Install Claude Code:
npm install -g @anthropic-ai/claude-codeclaude-sonnet-5-5 is served on Vivgrid's native Messages API (/messages), so Claude Code connects directly. Point it at Vivgrid and select the model in ~/.claude/settings.json:
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "viv-xxxxxxxxxxxxx",
"ANTHROPIC_BASE_URL": "https://api.vivgrid.com/",
"ANTHROPIC_MODEL": "claude-sonnet-5-5"
}
}Then start Claude Code in your project:
claudeWant different Vivgrid models for the Opus, Sonnet and Haiku slots? See the full Claude Code tutorial.
OpenCode
OpenCode has Vivgrid built in, so you can use claude-sonnet-5-5 without writing any config: open /models, search for vivgrid, paste your API key and pick the model. The OpenCode tutorial walks through it step by step.
Prefer to configure it by hand? Install OpenCode:
npm i -g opencode-aiDeclare claude-sonnet-5-5 under the Vivgrid provider in your global OpenCode config, ~/.config/opencode/opencode.json. The @ai-sdk/anthropic provider talks to Vivgrid over the Messages API (/v1/messages):
{
"$schema": "https://opencode.ai/config.json",
"model": "vivgrid/claude-sonnet-5-5",
"provider": {
"vivgrid": {
"npm": "@ai-sdk/anthropic",
"name": "Vivgrid",
"options": {
"baseURL": "https://api.vivgrid.com/v1",
"apiKey": "{env:VIVGRID_API_KEY}"
},
"models": {
"claude-sonnet-5-5": {
"name": "claude-sonnet-5-5",
"tool_call": true,
"attachment": true,
"modalities": { "input": ["text", "image"], "output": ["text"] },
"limit": { "context": 1000000, "output": 128000 }
}
}
}
}
}Export your key and launch OpenCode:
export VIVGRID_API_KEY="viv-xxxxxxxxxxxxx"
opencodeUse /models to switch between claude-sonnet-5-5 and other Vivgrid models mid-session. See the full OpenCode tutorial.
Pi
Install Pi:
npm install -g --ignore-scripts @earendil-works/pi-coding-agentAdd claude-sonnet-5-5 to a Vivgrid provider in ~/.pi/agent/models.json. Pi talks to Vivgrid over the native Messages API (/v1/messages) with "api": "anthropic-messages". authHeader sends the key as a Bearer token. Keep it as its own provider, since a provider has a single base URL and this one differs from the Chat Completions models':
{
"providers": {
"vivgrid-anthropic": {
"baseUrl": "https://api.vivgrid.com",
"apiKey": "viv-xxxxxxxxxxxxx",
"authHeader": true,
"api": "anthropic-messages",
"compat": {
"sendSessionAffinityHeaders": true
},
"models": [
{
"id": "claude-sonnet-5-5",
"input": ["text", "image"],
"contextWindow": 1000000,
"maxTokens": 128000
}
]
}
}
}Make it the model Pi starts with in ~/.pi/agent/settings.json:
{
"defaultProvider": "vivgrid-anthropic",
"defaultModel": "claude-sonnet-5-5"
}Then verify and start Pi:
pi --list-models vivgrid-anthropic
piOr run a one-shot prompt without entering the TUI:
pi -p "explain the auth flow in this repo" --model vivgrid-anthropic/claude-sonnet-5-5See the full Pi tutorial.
API surfaces
The Vivgrid Console catalogs claude-sonnet-5-5 on 2 surfaces, all behind the same API key. The endpoint shown is the one the Console previews for that surface.
| Surface | Primary endpoint | Use it for |
|---|---|---|
| Chat Completions | /chat/completions | Agent projects, where Vivgrid injects the model, system prompt and tools server-side, and Model API calls that name the model per request. |
| Vibe coding | /messages | Coding CLIs and IDE agents that drive the model themselves — point the tool at Vivgrid and keep your own loop. |
Quick start
Get an API key from the Vivgrid Console, then call claude-sonnet-5-5 directly.
/chat/completions
curl https://api.vivgrid.com/v1/chat/completions \
-H "Authorization: Bearer $VIVGRID_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-5-5",
"messages": [
{ "role": "user", "content": "Say hello in English, Chinese and Spanish." }
],
"stream": true
}'/messages
curl https://api.vivgrid.com/v1/messages \
-H "Authorization: Bearer $VIVGRID_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-5-5",
"max_tokens": 1024,
"messages": [
{ "role": "user", "content": "Say hello in English, Chinese and Spanish." }
],
"stream": true
}'Choosing within the Claude 5 family
Prices are USD per 1M tokens at the base rate. Rows marked this page are the model described here.
| Model | Context | Max output | Input | Output |
|---|---|---|---|---|
claude-fable-5-1 | 1,000,000 | 128,000 | $10.00 | $50.00 |
claude-opus-5-5 | 1,000,000 | 128,000 | $4.00 | $20.00 |
claude-opus-5 | 1,000,000 | 128,000 | $5.00 | $25.00 |
claude-sonnet-5-5 — this page | 1,000,000 | 128,000 | $2.00 | $10.00 |
claude-sonnet-5 | 1,000,000 | 128,000 | $2.00 | $10.00 |
claude-haiku-5-5 | 1,000,000 | 128,000 | $0.10 | $0.50 |
Ideal use cases
- Everyday coding agents balancing quality, speed, and cost
- High-volume tool-calling and agentic workflows
- Long-context analysis within a 1M-token budget
- Teams on
claude-sonnet-5upgrading at the same price
Related models
- claude-sonnet-5 — the prior Sonnet release
- claude-opus-5-5 — the latest frontier Opus model
- gpt-6.1-sol — OpenAI's latest balanced gpt-6 model
claude-opus-4-6
claude-opus-4-6 on Vivgrid: Anthropic's high-end Opus coding model with a 1M-token context window, Messages API, and geo-distributed acceleration.
claude-sonnet-5
claude-sonnet-5 on Vivgrid: Anthropic's Sonnet 5 model with a 1M-token context window, Messages API, and geo-distributed acceleration.