Models / Anthropic
Anthropic
Claude Sonnet 4
anthropic/claude-sonnet-4
Claude Sonnet 4 significantly enhances the capabilities of its predecessor, Sonnet 3.7, excelling in both coding and reasoning tasks with improved precision and controllability. Achieving state-of-the-art performance on SWE-bench (72.7%),...
Input
$3.9 / 1M tokens
Output
$19.5 / 1M tokens
Context
1000K tokens
Capabilities
✓ Streaming✓ Tool / function calling○ JSON / structured output✓ Vision (image input)
Call this model
Pass anthropic/claude-sonnet-4 as the model. Change only the base URL from your existing OpenAI SDK setup.
quickstart.sh
curl https://modeldatabase.com/v1/chat/completions \
-H "Authorization: Bearer $MDB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-sonnet-4",
"messages": [{"role":"user","content":"Hello!"}]
}'
Prices are final — the routing margin is already included. See the full pricing table or the API docs.