Models

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

ProviderAnthropic
Model IDclaude-sonnet-5-5
Best forCoding
Available onChat Completions, Vibe coding
Context window1,000,000 tokens
Max output128,000 tokens
ModalitiesText, Image
Tool / function callingYes
Knowledge cutoff2026-06
Acceleration⚡ Geo-Distributed — AMER, EMEA, APAC

Pricing

Pricing in USD per 1M tokens.

InputCached inputOutput
$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.

RequestCost
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-code

claude-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:

~/.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:

claude

Want 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-ai

Declare 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):

~/.config/opencode/opencode.json
{
  "$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"
opencode

Use /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-agent

Add 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':

~/.pi/agent/models.json
{
  "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:

~/.pi/agent/settings.json
{
  "defaultProvider": "vivgrid-anthropic",
  "defaultModel": "claude-sonnet-5-5"
}

Then verify and start Pi:

pi --list-models vivgrid-anthropic
pi

Or run a one-shot prompt without entering the TUI:

pi -p "explain the auth flow in this repo" --model vivgrid-anthropic/claude-sonnet-5-5

See 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.

SurfacePrimary endpointUse it for
Chat Completions/chat/completionsAgent projects, where Vivgrid injects the model, system prompt and tools server-side, and Model API calls that name the model per request.
Vibe coding/messagesCoding 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.

ModelContextMax outputInputOutput
claude-fable-5-11,000,000128,000$10.00$50.00
claude-opus-5-51,000,000128,000$4.00$20.00
claude-opus-51,000,000128,000$5.00$25.00
claude-sonnet-5-5 — this page1,000,000128,000$2.00$10.00
claude-sonnet-51,000,000128,000$2.00$10.00
claude-haiku-5-51,000,000128,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-5 upgrading at the same price

On this page