Back to Models

Claude Sonnet 4

anthropicanthropic/claude-sonnet-4

Claude Sonnet 4 balances impressive performance for coding with the right speed and cost for high-volume use cases: Coding: Handle everyday development tasks with enhanced performance-power code reviews, bug fixes, API integrations, and feature development with immediate feedback loops. AI Assistants: Power production-ready assistants for real-time applications—from customer support automation to operational workflows that require both intelligence and speed. Efficient research: Perform focused analysis across multiple data sources while maintaining fast response times. Ideal for rapid business intelligence, competitive analysis, and real-time decision support. Large-scale content: Generate and analyze content at scale with improved quality. Create customer communications, analyze user feedback, and produce marketing materials with the right balance of quality and throughput.

Context Length
1M
Max Output
64K
Input Price
$3.60/ 1M tokens
Output Price
$18.00/ 1M tokens

Modalities

textimagepdftext

Pricing Breakdown

TypeRate
Input$3.60 / 1M tokens
Output$18.00 / 1M tokens

Supported Parameters

temperaturemax_tokenstop_ptoolstool_choiceresponse_formatreasoningstop

API Usage Examples

cURL
curl https://api.therouter.ai/v1/chat/completions   -H "Content-Type: application/json"   -H "Authorization: Bearer $THE_ROUTER_API_KEY"   -d '{
    "model": "anthropic/claude-sonnet-4",
    "messages": [
      {"role": "user", "content": "Summarize the key points from this input."}
    ]
  }'