Chat model

Claude Sonnet 5 API

Claude Sonnet 5 is a chat model you call through the OpenAI-compatible /chat/completions endpoint, with streaming and tool calls. Send "claude-sonnet-5" as the model name and keep the rest of your code. You pay per token from a prepaid balance.

200K tokens of contextUp to 128K output tokensFrom $1.80 per 1M input tokensStreaming and tool calls

Price

US$ per 1M tokens. The first figure is what you pay; the list price is struck through.

ModelInput (cache hit)Input (cache miss)Output
claude-sonnet-5−10% off the list price
Context: 200K
$0.18 $0.20$1.80 $2.00$9.00 $10.00Try it

See all prices →

Specifications

Model IDclaude-sonnet-5
TypeChat model
EndpointPOST /chat/completions
Context window200,000 tokens
Max output128,000 tokens

Copy, paste, run

Copy this request, put in your key, and run it. "claude-sonnet-5" is the model name to send.

from openai import OpenAI

client = OpenAI(
    base_url="https://api.apistore.cloud/v1",
    api_key="sk-...",
)

stream = client.chat.completions.create(
    model="claude-sonnet-5",
    messages=[{"role": "user", "content": "Hello!"}],
    stream=True,
)
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="")

Questions

How do I call Claude Sonnet 5?

Send an OpenAI-format request to /chat/completions with "model": "claude-sonnet-5". Any SDK or tool that accepts an OpenAI-compatible base URL and key works.

How much does Claude Sonnet 5 cost?

From $1.80 per 1M input tokens and from $9.00 per 1M output tokens. The table above always shows the current prices.

What are the limits of Claude Sonnet 5?

A context window of 200K tokens and up to 128K output tokens per answer. Request limits apply per key and per account.

How do I get an API key for Claude Sonnet 5?

Create an account with email or Google, verify your address, then create a key on the API keys page. Add credit by card and the key works at once.

Other models

Start in a few minutes

Create an account, verify your email, create a key and make your first call.