Claude API: models, pricing, keys and your first call
Updated 2026-11-19
Claude is Anthropic's family of language models, and the Claude API is how software uses it: you send a list of messages to the Messages API and get Claude's reply back, optionally streamed, with tool use, extended thinking, image and PDF input and prompt caching. Claude.ai and the Claude apps are the chat products built on top; the API is for your own apps, scripts, agents and tools such as Claude Code and Cursor.
This page covers what you need to start: which model to pick, what it costs, how to get a key, a first request, and where to go when something breaks. Prices were checked against Anthropic's pricing page on 19 November 2026.
Claude API models and prices
Claude 4.6 and later models, except Haiku 5.5, include the full 1M-token context window at standard pricing, so a 900K-token request is billed at the same rate per token as a 9K-token one. Haiku 5.5 is the exception: prompts over 100K tokens pay higher rates. Thinking tokens bill as output. Anthropic also notes that Claude 4.7 and later produce roughly 30% more tokens for the same text, which matters when you compare costs with older models.
| Model | Anthropic list (input / output per 1M tokens) | APIMODELS (input / output per 1M tokens) | Call name |
|---|---|---|---|
| Claude Fable 5.2 | $8 / $40 | $4.80 / $24 | claude-fable-5-2 |
| Claude Opus 5.5 | $4 / $20 | $2.40 / $12 | claude-opus-5-5 |
| Claude Sonnet 5.5 | $2 / $10 | $1.20 / $6 | claude-sonnet-5-5 |
| Claude Haiku 5.5 (prompts up to 100K tokens) | $0.10 / $0.50 | $0.09 / $0.45 | claude-haiku-5-5 |
Which Claude model to use
Claude Sonnet 5.5: the default for most coding, writing and agent work, at a quarter of Fable 5.2's price.
Claude Opus 5.5: harder reasoning and long agent runs, when Sonnet is not quite enough.
Claude Fable 5.2: the highest-priced model in the lineup, for the hardest problems where quality matters more than cost.
Claude Haiku 5.5: high-volume, latency-sensitive jobs such as classification, extraction and routing.
How to use the Claude API
1. Get a key: in the Claude Console at platform.claude.com/settings/keys, or an APIMODELS key from the console.
2. Send a POST to /v1/messages with your key in x-api-key, an anthropic-version header, the model name, max_tokens and your messages.
3. Use an SDK for anything real: the official Python and TypeScript SDKs handle retries, streaming and types. With APIMODELS you only change base_url.
4. Stream long answers: Anthropic recommends streaming or batches for requests that may run longer than 10 minutes.
Calling the Claude API through APIMODELS
APIMODELS serves the same Claude models on the native Anthropic Messages API, so existing code and tools keep working after you change the base URL to https://api.apimodels.app. Stability first: every current Claude model runs on at least two upstream routes, and if the first fails before the answer starts the request moves to the next automatically; failed requests are not charged; long streams get keep-alive pings so proxies do not drop them. Then price: Fable 5.2, Opus 5.5 and Sonnet 5.5 are 40% below Anthropic's list, and one key also calls GPT, Gemini, image and video models, with no Anthropic account needed.
When to use Anthropic directly instead
Go direct for the Message Batches API, which Anthropic discounts by 50% on input and output and which we do not resell; for account-level products such as fast mode and US-only inference; and when you need an enterprise agreement and compliance paperwork signed with Anthropic itself.
Quick start
cURL
curl https://api.apimodels.app/v1/messages \
-H "x-api-key: $APIMODELS_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{
"model": "claude-sonnet-5-5",
"max_tokens": 512,
"messages": [{"role": "user", "content": "Say hello in three languages."}]
}'Python
import anthropic
client = anthropic.Anthropic(
base_url="https://api.apimodels.app", # leave this out to call Anthropic directly
api_key="sk_...your_apimodels_key...", # or read ANTHROPIC_API_KEY from the environment
)
msg = client.messages.create(
model="claude-sonnet-5-5",
max_tokens=512,
messages=[{"role": "user", "content": "Say hello in three languages."}],
)
print(msg.content[0].text)FAQ
What is the Claude API?
It is Anthropic's Messages API, at /v1/messages, which lets your own code use Claude models such as Fable 5.2, Opus 5.5, Sonnet 5.5 and Haiku 5.5. You authenticate with an API key, pay per token, and get replies with optional streaming, tool use, thinking and prompt caching.
How do I use the Claude API?
Create a key, then send a POST to /v1/messages with the key in the x-api-key header, an anthropic-version header, a model name such as claude-sonnet-5-5, max_tokens and your messages. For real projects use the official Python or TypeScript SDK; through APIMODELS you only change base_url to https://api.apimodels.app.
How much does the Claude API cost?
Anthropic list prices per 1M input/output tokens are $8 / $40 for Fable 5.2, $4 / $20 for Opus 5.5, $2 / $10 for Sonnet 5.5 and $0.10 / $0.50 for Haiku 5.5 (prompts up to 100K tokens). On APIMODELS they are $4.80 / $24, $2.40 / $12, $1.20 / $6 and $0.09 / $0.45. Checked on 19 November 2026.
Is the Claude API included in Claude Pro?
No. Anthropic bills the API separately from Claude.ai subscriptions. Max, Ultra and Team plans include some monthly API credits ($100, $200 and up to $500 pooled), but those do not cover interactive Claude Code sessions and do not roll over.
Which Claude model should I use for coding?
Start with Claude Sonnet 5.5, the default for most coding and agent work. Move to Opus 5.5 for harder reasoning or long agent runs, and to Fable 5.2 only when quality matters more than a price four times Sonnet's. Use Haiku 5.5 for fast, high-volume side tasks.
