Speed
Output tokens / second
Custom pricing for production workloads
Claude 4.5 Sonnet offers a balance of intelligence and speed for diverse enterprise and coding tasks.
anthropic/claude-sonnet-4.5https://api.aimlapi.com/v1What is Claude 4.5 Sonnet API?
Claude 4.5 Sonnet offers a balance of intelligence and speed for diverse enterprise and coding tasks.
Where to Use Claude 4.5 Sonnet
Coding and code review
Generate, debug, and review code across languages, reading whole files or repos in a single prompt.
See how Claude 4.5 Sonnet Thinking compares in generation speed and latency. Data retrieved Nov 4, 2026.
Output tokens / second
Compare 8 models available on AI/ML API across 5 independent benchmarks.
Expert-written questions across academic subjects.
Graduate-level science questions written to resist web search.
Agentic tasks completed in a command-line environment.
Reasoning across long documents of about 100k tokens.
Python coding tasks drawn from scientific research.
| Usage | Price | Unit |
|---|---|---|
| Input | $3 | 1M tokens |
| Output | $15 | 1M tokens |
| Cached input | $0.3174 | 1M tokens |
Prices from the AI/ML API price list, checked on Nov 4, 2026.
AI/ML API input and output rates for 5 models, per million tokens.
| Model | Input | Output |
|---|---|---|
| $3 | $15 | |
| $0.1 | $0.5 | |
| $2 | $10 | |
| $4 | $20 | |
| $10 | $50 |
Give your agent the model details, code and documentation.
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"curl 'https://api.aimlapi.com/v1/chat/completions' \
-H "Authorization: Bearer $AIMLAPI_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "anthropic/claude-sonnet-4.5",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}'import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['AIMLAPI_KEY']}",
"Content-Type": "application/json",
}
payload = {
"model": "anthropic/claude-sonnet-4.5",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}
response = requests.post("https://api.aimlapi.com/v1/chat/completions", headers=headers, json=payload, timeout=120)
response.raise_for_status()
print(response.json())const response = await fetch("https://api.aimlapi.com/v1/chat/completions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "anthropic/claude-sonnet-4.5",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());Claude 4.5 Sonnet Thinking has a 200,000 tokens context window and can return up to 64,000 tokens.
Claude 4.5 Sonnet Thinking takes text as input and returns text.
Use anthropic/claude-sonnet-4.5 as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.
Claude 4.5 Sonnet Thinking costs $3 input and $15 output per 1M tokens on AI/ML API, billed as you go with no subscription.
Yes, Claude 4.5 Sonnet Thinking can stream responses as they are generated.
Claude 4.5 Sonnet Thinking was built by Anthropic.
Its name includes 'Thinking,' indicating it is built for extended reasoning tasks.