Claude Sonnet 5 API
Run anthropic/claude-sonnet-5 through FastInfra's API.
Pay per token, no subscription, routed to the cheapest available provider.
Claude Sonnet 5 pricing
Billed per token used. Prices sync automatically from wholesale providers.
| Direction | Price per 1M tokens |
|---|---|
| Input | $2.10 |
| Output | $10.50 |
2 routes available
Requests route to route-07 by default (lowest cost). FastInfra fails over automatically if a route is unavailable.
| Route label | Model ID |
|---|---|
route-07 |
anthropic/claude-sonnet-5 |
route-21 |
anthropic/claude-sonnet-5 |
Call Claude Sonnet 5 in 30 seconds
Works with any OpenAI SDK — change the base URL and API key only.
Python
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.fastinfra.ai/v1")
response = client.chat.completions.create(
model="anthropic/claude-sonnet-5",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)
curl
curl https://api.fastinfra.ai/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-sonnet-5",
"messages": [{"role": "user", "content": "Hello!"}]
}'
Claude Sonnet 5 — common questions
How much does the anthropic/claude-sonnet-5 API cost?
On FastInfra, anthropic/claude-sonnet-5 costs $2.1/1M input, $10.5/1M output tokens. Billing is per token used, with no subscription.
Is anthropic/claude-sonnet-5 compatible with the OpenAI SDK?
Yes. FastInfra exposes anthropic/claude-sonnet-5 through an OpenAI-compatible endpoint at https://api.fastinfra.ai/v1 — point any OpenAI SDK at that base URL with a FastInfra API key and keep your existing code.
How does routing work for anthropic/claude-sonnet-5?
anthropic/claude-sonnet-5 is available on 2 route(s): route-07, route-21. Requests use route-07 by default (lowest cost). FastInfra fails over automatically if a route is unavailable.
Related models
Compare side by side: Claude Sonnet 5 vs Claude 3 Haiku · Claude Sonnet 5 vs Claude Haiku 4.5:batch · Claude Sonnet 5 vs Claude Haiku 4 5