TokenRoute
Get started
Back to models

Anthropic: Claude Sonnet 4

Moderated

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%),...

Pricing

Input$2.10 /M
Output$10.50 /M
Cache read$0.2100 /M
Cache write$2.63 /M
Web search$0.0070 /req

Specs

Context length1M tokens
Max output64K tokens
Inputimage, text, file
Outputtext

Quickstart

Point the OpenAI SDK at https://tokenroute.app/api/v1 and use a TokenRoute API key.

bash
curl https://tokenroute.app/api/v1/chat/completions \
  -H "Authorization: Bearer $TOKENROUTE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-sonnet-4",
    "messages": [{ "role": "user", "content": "Hello!" }]
  }'

Supported parameters

include_reasoning
max_tokens
reasoning
stop
temperature
tool_choice
tools
top_k
top_p