API Free WeekHundreds of APIs are free to call this week.Browse free APIs

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%), Sonnet 4 balances capability and computational efficiency, making it suitable for a broad range of applications from routine coding tasks to complex software development projects. Key enhancements include improved autonomous codebase navigation, reduced error rates in agent-driven workflows, and increased reliability in following intricate instructions. Sonnet 4 is optimized for practical everyday use, providing advanced reasoning capabilities while maintaining efficiency and responsiveness in diverse internal and external scenarios.

Input price
$3.00USD / 1M tokens
Output price
$15.00USD / 1M tokens
Context window
N/A
Max output
64K

Try the model

Playground

Open playground
Input⌘ / Ctrl + Enter

Try a prompt

64K max outputVision
Input$3.00/MOutput$15.00/MCache read$0.30/MCache write$3.75/M
OutputReady

Your response will appear here

Choose an example or write a prompt, then click Run.

Model card

Specifications

Pricing

Input
$3 / 1M tokens
Output
$15 / 1M tokens
Cache read
$0.30 / 1M tokens
Cache write
$3.75 / 1M tokens

Context & modalities

Max output
64,000 tokens
Input
Text, image
Output
Text

Capabilities

Chat
Supported
Vision
Supported
Reasoning
Supported
Structured output
Not supported
Function calling
Supported
Audio input
Not supported

Access

Provider
Anthropic
Model ID
anthropic/claude-sonnet-4
Execution
sync
Base URL
https://api.sandbase.ai
API
Chat Completions API
Endpoint
/v1/chat/completions
API
Messages API
Endpoint
/v1/messages

Start building

Send your first request

Choose either supported API with unified authentication and usage tracking.

Production API
Chat Completions API endpoint
https://api.sandbase.ai/v1/chat/completions
Model ID
anthropic/claude-sonnet-4
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
  -X POST "https://api.sandbase.ai/v1/chat/completions" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'SANDBASE_JSON'
{
  "model": "anthropic/claude-sonnet-4",
  "messages": [
    {
      "role": "user",
      "content": "Hello"
    }
  ],
  "max_tokens": 2048
}
SANDBASE_JSON
)
printf '%s\n' "$result"

Choose your model

Compare models

All language models
ModelContextInput / 1MOutput / 1MReleased
Claude Sonnet 4This model
Anthropic
—$3.00$15.00May 22, 2025
Anthropic1M$0.10$0.50Oct 7, 2026
Anthropic—Coming soonComing soonComing soon
Anthropic1M$2.00$10.00Sep 28, 2026
Anthropic1M$4.00$20.00Sep 22, 2026
Anthropic1M$10.00$50.00Sep 1, 2026

Questions

FAQ

How do I call Anthropic Claude Sonnet 4 through SandBase?

Create a SandBase API key, then send requests with the model ID "anthropic/claude-sonnet-4" to Chat Completions API (/v1/chat/completions) or Messages API (/v1/messages) at https://api.sandbase.ai. The request examples on this page show the exact payload.

How much does Anthropic Claude Sonnet 4 cost?

$3 per 1M input tokens and $15 per 1M output tokens, billed per request from your SandBase balance. Discounts, when available, are shown in the pricing on this page.

Which features does Anthropic Claude Sonnet 4 support?

Anthropic Claude Sonnet 4 supports vision (image input), reasoning, function calling. See Specifications above for the full list.

Do I need a separate Anthropic account?

No. One SandBase API key and balance gives you access to Anthropic Claude Sonnet 4 and the other models in the catalog; you do not need to sign up with Anthropic separately.