Claude Opus 5 API

Claude Opus 5 is ideal for complex agentic coding and enterprise work. Features a 1M token context window, adaptive thinking, and top-tier performance across long-horizon agentic tasks, knowledge work, and vision.
Context
1M tokens
Input
$6.50 / 1M
Output
$32.50 / 1M
Released
Jul 24, 2026

How to use Claude Opus 5 API

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

import requests

r = requests.post(
"https://api.aimlapi.com/v1/chat/completions",
headers={"Authorization": "Bearer " + AIMLAPI_KEY},
json={
"model": "anthropic/claude-opus-5",
"messages": [
{
"role": "user",
"content": "Hello!"
}
]
},
)
print(r.json())

const r = 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-opus-5",
"messages": [
{
"role": "user",
"content": "Hello!"
}
]
}),
});
console.log(await r.json());

curl -X POST https://api.aimlapi.com/v1/chat/completions \
-H "Authorization: Bearer $AIMLAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"anthropic/claude-opus-5","messages":[{"role":"user","content":"Hello!"}]}'

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

Claude Opus 5 API Pricing

TypePrice
Input
$6.50 / 1M tokens
Output
$32.50 / 1M tokens

The full 1M context window is included at standard pricing. Free credits on signup.

Claude Opus 5 vs other models

ModelInputOutputContextBest for
Claude Opus 5
This page
$6.50 / 1M
$32.50 / 1M
1M tokens
Complex agentic coding and enterprise workflows
$6.5 / 1M
$39 / 1M
1.05M tokens
Reasoning + agents
$2.6 / 1M
$13 / 1M
1M tokens
Balanced coding + agents
$3.9 / 1M
$19.5 / 1M
1M tokens
Long-context, multimodal & agentic workflows
$0.65 / 1M
$3.9 / 1M
1.05M tokens
Reasoning + agents
$0.5655 / 1M
$1.131 / 1M
1M tokens
Reasoning + agents

Start building with Claude Opus 5

Get API Key
1000+ models, one API.