What Is the Anthropic API?
The Anthropic API is the developer interface for Claude, Anthropic’s family of language models. It lets an application send text or supported media to a Claude model and receive generated text in return.
A typical request contains:
An API key for authentication
A model ID, such as claude-sonnet-5
One or more user and assistant messages
A maximum output-token limit
Optional controls for tools, structured output, thinking, caching, or other supported features
Anthropic’s native API centers on the Messages API. Anthropic also provides endpoints for token counting, message batches, model discovery, files, and skills. Exact feature support varies by model and endpoint, so model capability and API compatibility should be checked separately.
The phrases Anthropic API, Anthropic AI API, Anthropic Claude API, and Claude API usually describe the same general product area. “Anthropic” is the company, “Claude” is the model family, and the API is how software calls those models.
Anthropic API vs Claude API vs Claude Subscription
These terms are often mixed together, but they are not interchangeable.
| Term |
What it refers to |
How you pay |
| Anthropic |
The company that develops Claude |
Not applicable |
| Claude |
The family of AI models |
Depends on the product used |
| Claude.ai |
Anthropic’s consumer and workplace chat application |
Subscription plans |
| Anthropic API or Claude API |
Developer access for applications and services |
Usage-based API billing |
| GPT Proto Claude API |
GPT Proto routes that provide access to supported Claude models |
GPT Proto balance and route pricing |
A Claude Pro, Max, Team, or Enterprise subscription does not include Anthropic API usage. Anthropic documents the Claude app and Console/API as separate products with separate billing.
This distinction matters when estimating a project. Paying for Claude.ai gives people access to the chat product; it does not give your application an included pool of API tokens.
The Current Anthropic Claude API Family
Anthropic currently positions four models as its main Claude API family. The table below compares their standard upstream API prices with the corresponding GPT Proto routes.
| Model |
API model ID |
Official input / output per 1M tokens |
GPT Proto input / output per 1M tokens |
Context window |
Best starting use |
| Claude Fable 5 |
claude-fable-5 |
$10 / $50 |
$8 / $40 |
1M tokens |
Hardest long-running tasks |
| Claude Opus 5 |
claude-opus-5 |
$5 / $25 |
$4 / $20 |
1M tokens |
Complex coding and agents |
| Claude Sonnet 5 |
claude-sonnet-5 |
$2 / $10 |
$1.60 / $8 |
1M tokens |
Most production applications |
| Claude Haiku 4.5 |
claude-haiku-4-5-20251001 |
$1 / $5 |
$0.80 / $4 |
200K tokens |
Fast, high-volume work |
Official specifications and prices come from Anthropic’s models overview and pricing documentation. GPT Proto prices come from the live Claude model catalog.
The context window is the maximum combined space available for instructions, conversation history, documents, tool results, and output. It should not be treated as a target. Sending unnecessary context increases cost and can make prompts less focused.
Claude Fable 5
Claude Fable 5 is Anthropic’s highest-capability generally available model. It is intended for difficult, long-running work where errors are expensive and the model must maintain coherence across many steps.
Fable is a candidate for complex research agents, large migration plans, intricate architecture work, and other tasks where evaluation results show a meaningful gain over Opus. It is also the slowest and most expensive model in the current family.
There is another important constraint: Anthropic states that Fable 5 API requests require 30-day data retention and are not eligible for zero data retention. Anthropic says retained data is not used for model training without express permission, but the retention period may still rule Fable out for some workloads. Review Anthropic’s API data-retention documentation before using it with sensitive information.
Claude Opus 5
Claude Opus 5 is aimed at demanding professional workloads, especially complex coding and agentic tasks. It offers a 1M-token context window and a 128K maximum output.
Opus is a sensible upgrade when Sonnet fails a defined quality threshold: for example, resolving difficult repository-wide bugs, coordinating a long sequence of tool calls, or producing work that requires stronger planning and verification.
Do not choose Opus only because the task is important. Test Sonnet first, define what “good enough” means, and move up only if Opus produces a measurable improvement. At official rates, Opus costs 2.5 times as much as Sonnet for both input and output tokens.
Claude Sonnet 5
Claude Sonnet 5 is the default recommendation for most teams. It combines a 1M-token context window, fast response time, adaptive thinking, and lower pricing than Opus or Fable.
Sonnet fits customer-support assistants, document analysis, content workflows, software development, and everyday agents. It is capable enough to establish a useful quality baseline without committing every request to the most expensive model.
If you are unsure which Anthropic Claude API fits your application, begin with Sonnet. Then use task-specific evaluations to decide whether some requests should be routed down to Haiku or up to Opus.
Claude Haiku 4.5
Claude Haiku 4.5 is the fastest and least expensive current Claude model. It has a 200K-token context window and a 64K maximum output.
Haiku suits classification, extraction, tagging, routing, short summaries, simple support questions, and other high-volume tasks with clear instructions. It is also useful as a first stage in a model-routing system: Haiku can categorize a request before a more capable model handles only the difficult cases. 
Its lower price does not make it the right choice for every small prompt. If a failed response creates expensive rework, the total cost can exceed the token savings. Test the task, not just the model’s price.
What Is the Difference Between Claude Fable, Opus, Sonnet, and Haiku?
The family names describe product tiers, not different APIs. The models can be called through the same general interface, but they differ in reasoning quality, latency, price, context limits, and feature support.
| Decision factor |
Fable 5 |
Opus 5 |
Sonnet 5 |
Haiku 4.5 |
| Relative capability |
Highest |
Very high |
High |
Efficient |
| Relative latency |
Slowest |
Moderate |
Fast |
Fastest |
| Relative price |
Highest |
High |
Mid-range |
Lowest |
| Adaptive thinking |
Always on |
Supported |
Supported |
Not supported |
| Best use |
Hardest long-horizon tasks |
Complex coding and agents |
General production |
Simple, high-volume tasks |
| Main tradeoff |
Cost and 30-day retention |
Higher cost than Sonnet |
May need escalation for hardest work |
Lower ceiling on complex tasks |
“Claude Fable API,” “Claude Opus API,” “Claude Sonnet API,” and “Claude Haiku API” therefore refer to choosing different model IDs within the broader Anthropic Claude API family.
Model IDs also deserve attention. Anthropic says every model ID maps to a pinned snapshot. For Claude 4.6 and later, a dateless ID such as claude-sonnet-5 is itself a pinned snapshot rather than an automatically moving alias. Do not assume a dateless model name will silently update to a future generation.
Which Anthropic Claude API Should You Choose?
The best model is the least expensive one that consistently passes your real evaluation set.
Choose Haiku for speed and volume
Start with Haiku when requests are repetitive, instructions are narrow, and mistakes are easy to detect. Common examples include intent classification, entity extraction, moderation triage, metadata generation, and short FAQ answers.
Choose Sonnet for most production applications
Start with Sonnet when the task mixes reasoning, writing, document understanding, or code. It provides the best general starting point for teams that do not yet have evidence supporting a more specialized choice.
Choose Opus for difficult coding and agents
Move to Opus when Sonnet fails on multi-step planning, repository-scale changes, extended tool use, or expert work with a high cost of error. Compare success rate and required retries, not just the quality of one impressive response.
Choose Fable for the hardest evaluated workload
Use Fable when Opus is still below your acceptance threshold and Fable produces a repeatable improvement. Include response time, token cost, retention requirements, and the cost of review in the decision.
A practical production pattern is to route routine requests to Haiku, general requests to Sonnet, and only failed or high-risk cases to Opus or Fable. This approach requires evaluation and routing logic, but it can reduce cost without lowering the quality of the difficult cases.

Anthropic API Pricing Explained
Claude API pricing is primarily token-based. Input tokens include the instructions and content sent to the model. Output tokens are the text generated by the model.
The basic formula is:
Request cost = (input tokens ÷ 1,000,000 × input rate) + (output tokens ÷ 1,000,000 × output rate)
Example: 10,000 input tokens and 2,000 output tokens
| Model |
Official API cost |
GPT Proto route cost |
| Claude Fable 5 |
$0.200 |
$0.160 |
| Claude Opus 5 |
$0.100 |
$0.080 |
| Claude Sonnet 5 |
$0.040 |
$0.032 |
| Claude Haiku 4.5 |
$0.020 |
$0.016 |
This example uses standard token rates and excludes caching, batch discounts, web search, code execution, and other separately priced features. Actual cost depends on the tokens processed, not the nominal size of the context window.
Prompt caching and batch pricing
Anthropic’s first-party API offers prompt caching for repeated context. A five-minute cache write is priced at 1.25 times the base input rate, while a cache hit is priced at 10% of the base input rate. A one-hour cache write is priced at twice the base input rate.
For example, repeatedly sending the same 100,000-token Sonnet 5 context five times would cost $1.00 in uncached input. With a five-minute cache, the first write costs $0.25 and four cache reads cost $0.08 in total, for $0.33 before any additional uncached tokens or output.
Anthropic’s Message Batches API applies a 50% discount to input and output tokens for asynchronous work. It fits evaluations, offline classification, bulk analysis, and other jobs that do not require an immediate response.
These are first-party Anthropic features. A model’s upstream capability does not prove that every third-party route exposes the same caching, batch, tool, or beta behavior. Check the provider’s live documentation before designing around a specific feature.
Direct Anthropic API vs GPT Proto Claude API
The direct Anthropic API and GPT Proto can expose the same underlying Claude model, but they are not the same service.
| Factor |
Direct Anthropic API |
GPT Proto Claude routes |
| Authentication |
Anthropic API key |
GPT Proto API key |
| Native endpoint |
api.anthropic.com/v1/messages |
gptproto.com/v1/messages |
| OpenAI-compatible endpoint |
Not the primary interface |
gptproto.com/v1/chat/completions |
| Model scope |
Anthropic models |
Supported models from multiple providers under one balance |
| Current standard price |
Official Anthropic rate |
Route-specific GPT Proto rate |
| New Anthropic features |
Usually available first |
Support must be checked by route |
| Modalities and limits |
Defined by Anthropic |
May differ from upstream model capability |
| Data and compliance |
Anthropic’s terms and controls |
Review GPT Proto and any upstream requirements |
| Best fit |
Direct vendor relationship and latest native features |
One key, route comparison, and multi-model access |
Choose Anthropic directly when you need the newest first-party feature, a direct enterprise relationship, or Anthropic-specific compliance controls. Choose GPT Proto’s Claude API routes when one key, a shared balance, and access to models from multiple providers simplify your application.
Do not describe the services as identical merely because the model name matches. Confirm the endpoint schema, accepted parameters, media inputs, retention terms, rate limits, and feature support for the route you will use.
How to Call a Claude Model Through GPT Proto
The following request calls Claude Sonnet 5 through GPT Proto’s OpenAI-compatible chat-completions endpoint. Store the key in an environment variable rather than placing it in source code.
curl --request POST "https://gptproto.com/v1/chat/completions" \
--header "Authorization: Bearer $GPTPROTO_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "claude-sonnet-5",
"messages": [
{
"role": "user",
"content": "Summarize the main risks in this product launch plan."
}
]
}'
To test another current Claude route, replace the model value with claude-opus-5, claude-fable-5, or claude-haiku-4-5-20251001.
Changing the model ID is technically simple, but the models are not behaviorally interchangeable. Recheck supported parameters and inputs, then rerun your evaluations before moving production traffic.
For comparison, a direct request to Anthropic’s native Messages API uses Anthropic-specific headers and requires max_tokens:
curl "https://api.anthropic.com/v1/messages" \
--header "x-api-key: $ANTHROPIC_API_KEY" \
--header "anthropic-version: 2023-06-01" \
--header "content-type: application/json" \
--data '{
"model": "claude-sonnet-5",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "Summarize the main risks in this product launch plan."
}
]
}'
Anthropic API Limitations to Know Before Building
First, API access has separate billing from Claude subscriptions. Create the correct account and budget before integration work begins.
Second, upstream model support and route support are different facts. A Claude model may accept images through Anthropic while a particular third-party route currently lists only text or document input. Treat the live route page as the operational source for that route.
Third, current Claude models can analyze images but do not generate images as output. If your product must create images, it needs a separate image-generation model or service.
Fourth, rate limits and spend limits can both produce HTTP 429 responses. Inspect the error body and response headers instead of assuming every 429 will disappear after a short wait.
Fifth, the largest context window is not always the best prompt strategy. Long inputs cost more, increase latency, and can contain distracting material. Retrieval and selective context often work better than sending an entire archive.
Finally, data controls vary by model, account, contract, and provider. Anthropic states that API data is not used to train its models without express permission, but zero data retention is not automatic for every customer or model. Third-party routes are not covered by an Anthropic-only agreement. Review all applicable policies before sending sensitive data.
Final Verdict
There is no single best Anthropic family API for every request. The useful default is straightforward:
That model ladder is more reliable than choosing by brand tier alone. Build a small evaluation set from real requests, record quality, latency, retries, and total token cost, and then route each task to the least expensive Claude model that passes.