LLM / Assistant

Anthropic API

Direct API access to Claude models for developers

Visit site

The Anthropic API provides direct access to Claude Opus, Sonnet, and Haiku models with features like tool use, prompt caching, and batching. It offers a 1M token context window and structured outputs.

Pay-per-use from $0.10/M input tokens (Haiku 5.5)
Pricing
LLM / Assistant
Category

Last reviewed: · Reviewed from official documentation and product information.

Sources: Official site · Pricing · Docs · Changelog

Updated : Updated the top model to Fable 5.2 at $8/M input tokens.

Beginner verdict, For developers

Requires some technical comfort with API keys, command line, or coding. If you're new to AI, start with a chat-based tool first.

Best for

AI application developmentAgent buildingContent generation at scaleEnterprise AI integration

Pros & cons

Pros

✓1M token context window on all current models
✓Prompt caching saves 90% on repeated calls
✓Tool use and structured outputs
✓Batch API for high-volume processing

What this won't do

✗Top models cost more: Opus 5.5 is $4/M input tokens, Fable 5.2 $8/M
✗Rate limits require planning
✗No fine-tuning available yet

Use cases

Building AI-powered products

Automated content pipelines

Customer support chatbots

Document analysis at scale

1

Get an API key

Sign up for a Claude Console account on platform.claude.com and create an API key. An API key is a secret password that lets your code use Claude.

2

Save the key and install

Store the key in an environment variable named ANTHROPIC_API_KEY. Then install the Python library with: pip install anthropic

3

Send your first message

Write a short script that asks Claude a question, using the model claude-opus-5-5 as the official quickstart does. Run it, and Claude's reply prints as text.

4

Keep the key out of code

The library reads ANTHROPIC_API_KEY on its own, so you never need to paste the key into your script. Keep it out of any file you share or upload.

Compare alternatives

ToolCategoryPricing
Anthropic API (current)LLM / AssistantPay-per-use from $0.10/M input tokens (Haiku 5.5)
ChatGPTLLM / AssistantFree / $8 mo Go / $20 mo Plus / from $100 mo Pro
ClaudeLLM / AssistantFree / $20 mo
Google GeminiLLM / AssistantFree / from $4.99 mo (AI Plus) / $19.99 mo AI Pro
OpenAI APILLM / AssistantPay-per-use from $0.10/M input tokens

Comparisons