Claude Sonnet 4
Anthropic's balanced model with excellent coding and reasoning. Best price-to-performance ratio.
200K
tokens
16K
tokens
$3
per 1M tokens
$15
per 1M tokens
95
tokens/sec
May 2025
2025-05-22
$9.00
per 1M tokens
9.8
quality per $
Capabilities
Benchmarks
Price vs Quality
Context Window in Context
- Codestral256K
- ▸ Claude Sonnet 4200K
- o3 Mini200K
- o3200K
- Claude Opus 4200K
- Claude 3.5 Haiku200K
- Sonar Pro200K
- GLM-5.1200K
Not on our gateway yet
Swfte Connect does not hold a key for Claude Sonnet 4, so there is nothing to run here. Add your own provider key and call it with the same API as every other model in this directory.
curl https://api.swfte.com/agents/v2/gateway/chat/completions \
-H "Authorization: Bearer $SWFTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic:claude-sonnet-4-20250514",
"messages": [{"role": "user", "content": "Hello"}]
}'About Claude Sonnet 4
Claude Sonnet 4 is a balanced AI model by Anthropic, released on May 22, 2025. It supports a context window of 200K tokens and can generate up to 16K output tokens.
At $3 per million input tokens and $15 per million output tokens, its blended cost of $9.00/1M tokens places it in the premium pricing tier. Its value score of 9.8 reflects the balance of quality and cost.
Using Claude Sonnet 4 with Swfte
Access Claude Sonnet 4 through Swfte Connect, our unified LLM gateway. Connect gives you a single API for 50+ models, with automatic routing, cost optimization, and fallback handling. You can also try Claude Sonnet 4 in our AI Playground before integrating.