Claude-Sonnet-4 API

Claude Sonnet 4 excels in coding, reasoning, and analytics. Anthropic’s model offers precise API solutions for developers and enterprises.
Output

How to use Claude-Sonnet-4 API

Install any OpenAI-compatible SDK, point it at api.aimlapi.com/v1, and set the model to .

OpenAI-compatible — swap the base URL and it works with your existing SDK.

Claude-Sonnet-4 API Pricing

TypePrice
Input
Output

Claude-Sonnet-4 Benchmarks

BenchmarkScoreWhat it measuresSourceRetrieved
OSWorld
42.2%
Computer-use across real desktop applicationsSourceJuly 8, 2026
SWE-bench Verified
72.7%
Resolving verified real GitHub issuesSourceJuly 8, 2026
Intelligence
18.9
Composite score across standardised reasoning, knowledge and problem-solving evaluations, measured independently by Artificial AnalysisSourceSeptember 12, 2026
Coding
37.6
Composite score across standardised coding evaluations, measured independently by Artificial AnalysisSourceSeptember 12, 2026
Math
74.3
Composite score across standardised mathematics evaluations, measured independently by Artificial AnalysisSourceSeptember 12, 2026

Claude-Sonnet-4 vs other models

ModelInputOutputContextBest for
$6.5 / 1M tokens
$39 / 1M tokens
1.05M tokens
Reasoning + agents
$2.6 / 1M tokens
$13 / 1M tokens
1M tokens
Balanced coding + agents
$3.9 / 1M tokens
$19.5 / 1M tokens
1M tokens
Long-context, multimodal & agentic workflows
$0.65 / 1M tokens
$3.9 / 1M tokens
1.05M tokens
Reasoning + agents

Frequently asked questions

No items found.

Start building with Claude-Sonnet-4

Get API Key
1000+ models, one API.