Claude Sonnet 5.5 via API: connection, prices and cache at October 18, 2026

How to call claude-sonnet-5-5 from Python and curl, what a typical request costs with and without cache, and how it differs from Sonnet 5 and Sonnet 4.6.

6 min · · models · API keys

Claude Sonnet API in Zukko means the model claude-sonnet-5-5 at $0.4 per million input tokens and $2 per million output tokens (prices at October 18, 2026). You can call it in both the Anthropic format and the OpenAI format with one fetch_... key. Below: model parameters, two ways to connect, a cost calculation for a typical request with and without cache, and a comparison with neighbouring Sonnet versions by price and strength index.

Claude Sonnet API: parameters and prices

Zukko prices, $ per 1M tokens. Cache is billed separately. The strength index is the Intelligence Index from Artificial Analysis.

ModelIn / outCache read / writeOfficial in / outContextIndex
claude-sonnet-5-50.4 / 20.05 / 0.52 / 101M48
claude-sonnet-50.4 / 20.05 / 0.52 / 101M45
claude-sonnet-4-60.5 / 2.50.063 / 0.63 / 151M42
claude-opus-5-50.8 / 40.08 / 14 / 201M58

All four models accept images as input. The current list and prices are always available via GET https://api.zukko.pro/v1/models and on the "Models" page in the dashboard: providers change prices, and the table is accurate as of the article date.

Connecting in the Anthropic format

This is the main path for Claude: it is how the official Anthropic SDK, Claude Code and other clients on this format work. An important detail: the base URL has no /v1, the SDK adds the path itself.

bash
import os
import anthropic

client = anthropic.Anthropic(
    base_url="https://api.zukko.pro",
    api_key=os.environ["ZUKKO_API_KEY"],
)

msg = client.messages.create(
    model="claude-sonnet-5-5",
    max_tokens=512,
    messages=[{"role": "user", "content": "Explain the difference between a mutex and a semaphore"}],
)
print(msg.content[0].text)
print(msg.usage)

The same through curl if you need a minimal key test:

bash
curl https://api.zukko.pro/v1/messages \
  -H "x-api-key: $ZUKKO_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{"model":"claude-sonnet-5-5","max_tokens":256,
       "messages":[{"role":"user","content":"Hello"}]}'

The request format is described in the messages reference.

Connecting in the OpenAI format

If your code or tool already works through the OpenAI SDK, it is enough to change the address and model name. The base URL here is with /v1.

bash
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.zukko.pro/v1",
    api_key=os.environ["ZUKKO_API_KEY"],
)

resp = client.chat.completions.create(
    model="claude-sonnet-5-5",
    messages=[{"role": "user", "content": "Explain the difference between a mutex and a semaphore"}],
)
print(resp.choices[0].message.content)
print(resp.usage)

This format has one caveat about the cache, covered in the next section.

Cache: where there is a discount and where there is not

Prompt cache for Claude is billed at separate prices: reads are cheaper than input (0.05 versus 0.4), writes are more expensive (0.5 versus 0.4). The cache discount comes from the Anthropic format (/v1/messages, the Anthropic SDK, Claude Code): there the gateway sees how much input came from the cache. In the OpenAI format all input for Claude is billed at the input price. If you have a long repeating prefix (a system prompt, a document, tool descriptions), choose the Anthropic format for Claude. A detailed breakdown: Claude via messages or chat completions: what happens to the cache.

How to enable the cache in a request:

bash
msg = client.messages.create(
    model="claude-sonnet-5-5",
    max_tokens=512,
    system=[{"type": "text", "text": LONG_INSTRUCTIONS,
             "cache_control": {"type": "ephemeral"}}],
    messages=[{"role": "user", "content": question}],
)
u = msg.usage
cost = (u.input_tokens * 0.4
        + (u.cache_read_input_tokens or 0) * 0.05
        + (u.cache_creation_input_tokens or 0) * 0.5
        + u.output_tokens * 2) / 1_000_000
print(f"${cost:.5f}")

The formula in the code is exactly the cost formula: fresh input × input price + cache read × read price + cache write × write price + output × output price. The cache conditions (minimum prefix length, lifetime) are set by Anthropic: see their documentation, we do not fix these parameters here.

What a typical request costs

Assumptions: a request with 20,000 input tokens, 18,000 of which are a stable prefix (instructions, documents), and 1,000 output tokens. This is an example for calculation; measure your own values from the response usage or through POST /v1/messages/count_tokens. Formula: (fresh input × input price + cache read × read price + cache write × write price + output × output price) / 1,000,000.

  • Without cache (or the OpenAI format): 20,000 × 0.4 / 1,000,000 + 1,000 × 2 / 1,000,000 = 0.008 + 0.002 = $0.010.
  • With cache, repeated request: fresh input 2,000 × 0.4 / 1,000,000 = 0.0008; read 18,000 × 0.05 / 1,000,000 = 0.0009; output 0.002. Total $0.0037.
  • First request with a cache write: 0.0008 (fresh input) + 18,000 × 0.5 / 1,000,000 = 0.009 (write) + 0.002 (output) = $0.0118, i.e. more than usual by 18,000 × (0.5 − 0.4) / 1,000,000 = $0.0018. The saving on each read: 18,000 × (0.4 − 0.05) / 1,000,000 = $0.0063. So the cache pays off already on the first repeat.
  • 1000 requests in a row within the cache lifetime: without cache 1000 × 0.010 = $10.00; with cache 0.0118 + 999 × 0.0037 ≈ $3.71 (the first request writes, the other 999 read). If the cache expires over time, there will be more writes.

For comparison, the same request without cache at the official prices from the table (2 / 10): 20,000 × 2 / 1,000,000 + 1,000 × 10 / 1,000,000 = $0.05. We do not compare official cache prices here; check them with the provider.

Sonnet 5.5, Sonnet 5 and Sonnet 4.6

At October 18, 2026:

  • claude-sonnet-5-5 versus claude-sonnet-5. Zukko prices are the same (0.4 / 2, cache 0.05 / 0.5), context is the same, index 48 versus 45. There is no price reason to take the older version, but model behaviour differs, so for critical prompts run your own test set. The pair on another axis: Sonnet 5 or Opus 5.5.
  • claude-sonnet-4-6. Costs more (0.5 / 2.5) with an index of 42. It makes sense to keep it if you have prompts validated on it and are not ready to revalidate, not because of price.
  • claude-opus-5-5. Twice the price of Sonnet 5.5 (0.8 / 4), index 58. The same example request above costs $0.020 without cache and $0.0070 with cache (2,000 × 0.8 + 18,000 × 0.08 + 1,000 × 4, divided by 1,000,000).

The index does not say which model is better on your task: it averages other people's tests. Take 20 of your real requests, run them on two or three models and compare the result with the price.

Can I get Claude Sonnet for free

There is no free API for Claude Sonnet: every request is billed per the table above, and the balance is topped up from $1. A small extra is a one-time $0.50 for subscribing to the Telegram channel @zukkopro, once per Telegram account. Sonnet 4.5 is not in the current model table at October 18, 2026; check the available versions in GET /v1/models.

Connection errors

  • 401: the key is wrong or was copied with a space.
  • 402: the balance is insufficient.
  • 403 model_not_allowed_for_key: the key's model list is restricted (allowed_models).
  • 404 model_not_found: a typo in the model name. Check claude-sonnet-5-5 with hyphens, not a dot.
  • 429: the key's daily or monthly limit is exhausted, or a model provider limit applies.
  • 404 on /v1/v1/messages or /messages: the base URL is mixed up. For the Anthropic SDK the address has no /v1, for the OpenAI SDK it does.

Connecting

Create a key in the dashboard, set limits on it and paste it into the examples above. Payment from Russia: the balance is topped up from $1 via SBP (the payment page adds 8.5% on top, and the billed dollar amount is credited to the balance), cryptocurrency or a MasterCard (commission about 13%, amounts $2-$594).

FAQ

How much does Claude Sonnet cost through the API?

For claude-sonnet-5-5 in Zukko, $0.4 per million input tokens and $2 per million output tokens at October 18, 2026. Cache: read $0.05, write $0.5.

Which format should I choose for Sonnet?

The Anthropic format if the cache discount matters. The OpenAI format if your code is already written for the OpenAI SDK and there is no repeating prefix.

How does Sonnet 5.5 differ from Sonnet 5?

Price and context are the same, strength index 48 versus 45. Check other differences on your own tasks.

Is Sonnet 5.5 suitable for Claude Code?

Yes, you can set it in ANTHROPIC_MODEL. For Claude Code the base URL is https://api.zukko.pro without /v1, and the token goes in ANTHROPIC_AUTH_TOKEN. Details in the Claude Code documentation.

zukko

Pay 25×
less

for Claude Code & ChatGPT

One fetch_* key and base URL api.zukko.pro — for Cursor, Claude Code, Codex, and any SDK.

Get API keyDocumentation

api.zukko.pro · fetch_*

Claude Sonnet API: connection, price and cache · Zukko