Claude Sonnet 5 pricing

RouterHub token prices · USD per million tokens
Model / exact API IDVariantInputCached inputOutputContextAvailability
Claude Sonnet 5
claude-sonnet-5
standard$0.3587445$0.03587445$1.7937225Not publishedpreview

Cache-write rate: $0.448430625 per million tokens.

Prices are USD per million tokens. Cached input uses the cache-read rate when a cache hit is reported.

Compare variants

RouterHub token prices · USD per million tokens
Model / exact API IDVariantInputCached inputOutputContextAvailability
Claude Sonnet 5
claude-sonnet-5
standard$0.3587445$0.03587445$1.7937225Not publishedpreview

API compatibility and context

Exact model ID
claude-sonnet-5
Variant
standard
Supported API
Anthropic-compatible Messages
Availability
preview
Context window
Not published
Maximum input
Not published
Maximum output
Not published

Use Claude Sonnet 5 through the API

Create a RouterHub account, add prepaid credits and create an API key. Set ROUTERHUB_API_KEY locally, then send a first request with the exact model ID below.

cURL

curl --connect-timeout 30 --max-time 600 https://routerhub.si/v1/messages \
  -H "x-api-key: $ROUTERHUB_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-sonnet-5","messages":[{"role":"user","content":"Write a short noir scene set in a lighthouse."}],"max_tokens":256}'

Python

Install anthropic with pip. The examples request 256 output tokens and disable automatic retries. Check Usage after completion or a timeout before resending a paid request.

import os
from anthropic import Anthropic

client = Anthropic(
    api_key=os.environ["ROUTERHUB_API_KEY"],
    base_url="https://routerhub.si",
    timeout=600.0,
    max_retries=0,
)
response = client.messages.create(
    model="claude-sonnet-5",
    max_tokens=256,
    messages=[{"role": "user", "content": "Write a short noir scene set in a lighthouse."}],
)
print(response.content)

Claude Sonnet 5 FAQ

What is Claude Sonnet 5?

Claude Sonnet 5 is a Anthropic language model served through RouterHub using the Anthropic-compatible Messages API.

How much does Claude Sonnet 5 cost?

RouterHub charges $0.3587445 input / $0.03587445 cached / $1.7937225 output per million tokens. Usage is billed against your prepaid balance.

What is the Claude Sonnet 5 context window?

Context window: Not published. Maximum input: Not published. Maximum output: Not published.

Which API does Claude Sonnet 5 support?

Use Anthropic-compatible Messages with the exact model ID claude-sonnet-5 and your RouterHub API key.

Which variants can I compare with Claude Sonnet 5?

Compare Claude Sonnet 5 with the models in the RouterHub directory using token prices, API support and context window.

Explore models and setup