No description available
Sonnet 5 APIActive
AI Code With channel availability
The same model is billed by channel discount. Copy a channel code to set your preference.
Related Models
More models from Anthropic
Compare models from other providers
Sonnet 5 API: price, model ID, and how to call it
Call Sonnet 5 through AI Code With. Use model ID claude-sonnet-5 with 1M context. list price about $2.00 / $10.00 per 1M tokens before channel discounts. About $0.0570 for 100,000 input / 10,000 output tokens at the cheapest live channel.
Next: Get API key · Claude Code setup guide · Compare Claude models · All model prices
Cost calculator
Estimate at the cheapest live channel: $0.3800 / $1.90 per 1M tokens, cache read $0.0380, cache write $0.4750. Billed usage follows your prepaid balance.
cURL example
Set model to claude-sonnet-5. The page slug is only the URL, not the API parameter.
curl https://api.aicodewith.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AICODEWITH_API_KEY" \
-d '{
"model": "claude-sonnet-5",
"messages": [
{ "role": "user", "content": "What is the meaning of life?" }
]
}'FAQ
What is the Sonnet 5 model ID?
Send model "claude-sonnet-5" in the API request. The page path /claude-sonnet-5 is only the URL, not the model parameter.
How do I call the Sonnet 5 API?
Use one AI Code With API key against https://api.aicodewith.ai/v1/chat/completions(OpenAI Chat Completions)和 https://api.aicodewith.ai/v1/messages(Anthropic Messages,Authorization: Bearer), and set model to claude-sonnet-5. Supported protocols: OpenAI Chat Completions / Anthropic Messages. See Claude Code setup guide.
How is Sonnet 5 priced?
Sonnet 5 is list price about $2.00 / $10.00 per 1M tokens before channel discounts. The public page shows available channel discounts; billed usage follows your prepaid balance and the live channel. About $0.0570 for 100,000 input / 10,000 output tokens at the cheapest live channel.
How long is the Sonnet 5 context window?
Sonnet 5 has about 1M input context and up to 65.54K output tokens. Treat that as capacity, not a reason to fill every request.
GPT-5.6 Sol