Claude Sonnet 5 API
Balanced multimodal Claude model for everyday coding, agents, and production workloads
- Input per 1M
- $2.00
- Cached input per 1M
- $0.20
- Output per 1M
- $10.00
- Context window
- 1M
Call Claude Sonnet 5 in one request
Runware's endpoint takes the OpenAI Chat Completions format, so the OpenAI SDK works as it is. Change the base URL, key, and model ID. Claude Sonnet 5 is also available through the Anthropic Messages API.
anthropic:claude@sonnet-5import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["RUNWARE_API_KEY"],
base_url="https://api.runware.ai/v1",
)
stream = client.chat.completions.create(
model="anthropic:claude@sonnet-5",
messages=[
{"role": "user", "content": "What is the capital of France?"},
],
stream=True,
stream_options={"include_usage": True},
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)
if chunk.usage:
print("\n", chunk.usage)Usage and cost come back with the response. The stream ends with the request's token counts and its cost, so there is no second call to make.
About Claude Sonnet 5
Claude Sonnet 5 is Anthropic’s balanced model for daily production use, from coding and agent workflows to customer-facing assistants and high-volume automation. It reads text and images, calls tools, and supports extended thinking, at a fraction of the price of the Opus line. Its 1M-token context window and 128K-token maximum output cover long conversations, large documents, and multi-file code work.
- Developer
- Anthropic
- Released
- 30 Jun, 2026
- Input
- Text, Image
- Context window
- 1M tokens
- Max output
- 128K tokens
- API
- OpenAI Chat Completions, Anthropic Messages
Already on another provider?
Code that uses the OpenAI SDK moves over with three changes: the base URL, the API key and the model ID. Moving production traffic? We'll help you plan the switch.
Claude Sonnet 5 pricing
Pay per token with prepaid credits, on the same key and billing as every other model on Runware. No subscription.
- Input
- $2.00/1M tokens
- Cached input
- $0.20/1M tokens
- Cache write
- $2.50/1M tokens
- Output
- $10.00/1M tokens
More LLMs on Runware
Same key, same endpoint, same per-token billing. Switching models means changing one ID.
Start on demand. Scale on dedicated.
Call your first model in minutes, or tell us about your workload and we will size dedicated capacity for it.