AI & Agents

Anthropic Claude API: Models, Capabilities, and Getting Started

Anthropic's Claude API now spans nine endpoints, four model families, and two development tracks. This guide covers the current model lineup from Fable 5 through Haiku 4.5, walks through capabilities like extended thinking and managed agent sessions, and includes the code to make your first API call.

Fast.io Editorial Team 10 min read
Abstract neural network visualization representing AI API infrastructure

What Is the Anthropic Claude API?

Anthropic now lists nine distinct API endpoints in the Claude API documentation, up from just the Messages endpoint when Claude first launched [platform.claude.com, June 2026]. The API has grown from a chat completion service into a full agent development platform. Model access, batch processing, file management, skills, and managed agent sessions all live under a single API key.

The Anthropic Claude API is a RESTful API at https://api.anthropic.com that provides programmatic access to Claude models and Claude Managed Agents. It supports text and image input, tool calling, web search, extended thinking, structured outputs, and streaming responses.

Anthropic offers two development tracks, and choosing the right one matters more than choosing the right model:

Messages API

Direct model prompting. You send a request, get a response, and control the loop yourself. This is the right choice when you need fine-grained control over agent behavior or when you're building a custom orchestration layer. Four GA endpoints (Messages, Message Batches, Token Counting, Models) handle production workloads today.

Claude Managed Agents

A pre-built agent use running in managed infrastructure. You define an agent configuration (model, system prompt, tools, MCP servers), spin up a session, and Anthropic handles the sandbox, tool execution, and state management. Five beta endpoints (Files, Skills, Agents, Sessions, Environments) power this track. It works best for long-running tasks and async workflows where building your own execution environment would be overkill.

Both tracks authenticate the same way. Include your API key in the x-api-key header, or use Workload Identity Federation for token-based auth. The anthropic-version: 2023-06-01 header is required on all requests. Official SDKs handle these headers automatically.

The Claude API is also available through AWS (Bedrock and Claude Platform on AWS), Google Cloud (Vertex AI), and Microsoft Azure (Foundry), each with their own billing and authentication. The direct API gets new features first.

Current Model Lineup and Pricing

Anthropic maintains four model families in active production. Claude Fable 5 became generally available on June 9, 2026, joining Opus 4.8, Sonnet 4.6, and Haiku 4.5. A fifth model, Claude Mythos 5, is available in limited release through Anthropic's Project Glasswing program.

Here is how they compare:

Claude Fable 5 Anthropic's most capable widely released model. Built for demanding reasoning, complex analysis, and long-horizon agentic work. Fable 5 uses adaptive thinking (always on), which automatically adjusts reasoning depth to match task complexity. Context window: 1M tokens. Max output: 128K tokens.

Pricing: $10/MTok input, $50/MTok output.

Model ID: claude-fable-5

Claude Opus 4.8

The strongest Opus-tier model for complex reasoning and agentic coding. Also uses adaptive thinking. Context window: 1M tokens. Max output: 128K tokens. The effort parameter defaults to high on all surfaces.

Pricing: $5/MTok input, $25/MTok output.

Model ID: claude-opus-4-8

Claude Sonnet 4.6

The best combination of speed and intelligence. Sonnet 4.6 supports both extended thinking (explicit chain-of-thought before answering) and adaptive thinking. It's the production workhorse for most teams. Context window: 1M tokens. Max output: 128K tokens.

Pricing: $3/MTok input, $15/MTok output.

Model ID: claude-sonnet-4-6

Claude Haiku 4.5

The fast model in the lineup, with near-frontier intelligence. Supports extended thinking. Best for high-volume, latency-sensitive workloads like classification, routing, and real-time chat. Context window: 200K tokens. Max output: 64K tokens.

Pricing: $1/MTok input, $5/MTok output.

Model ID: claude-haiku-4-5-20251001

The pricing gap between tiers is significant. A task that costs $50 in output tokens on Fable 5 would cost $5 on Haiku 4.5. Start with Sonnet 4.6 for most workloads, move down to Haiku for cost-sensitive production traffic, and reach for Fable 5 or Opus 4.8 only when the task genuinely demands it.

All models support vision (image input), tool use, streaming, and structured outputs. The Batch API cuts pricing in half across every model: Fable 5 drops to $5/$25, Opus 4.8 to $2.50/$12.50, Sonnet 4.6 to $1.50/$7.50, and Haiku 4.5 to $0.50/$2.50 per MTok.

Dashboard showing AI-powered content analysis and summarization

Capabilities Beyond Chat Completion

The Claude API has moved well past simple prompt-in, text-out interactions. Several capabilities available today change how you architect applications.

Extended Thinking and Adaptive Thinking

Extended thinking lets the model reason through a problem step by step before producing a final answer. It is available on Sonnet 4.6 and Haiku 4.5. You enable it with a parameter, and the model's internal reasoning appears in a separate thinking content block. This is useful for math, logic, code generation, and multi-step planning.

Adaptive thinking takes a different approach: instead of explicit chain-of-thought, the model automatically adjusts reasoning depth based on task difficulty. It ships with Fable 5, Opus 4.8, and Sonnet 4.6. You can fine-tune it with the effort parameter (low through max).

Tool Use

Claude can call tools (functions) you define. You describe tools with JSON Schema, Claude decides when to call them, and you execute the tool and return results. This supports everything from database queries to API calls. Server-side tools like web search ($10 per 1,000 searches) and web fetch (free, beyond token costs) run inside Anthropic's infrastructure. Client-side tools run in your environment.

Vision All current Claude models accept image input alongside text. You can send screenshots, charts, documents, and photos. Images are passed as base64-encoded content blocks or via URL. This works well for UI analysis, document processing, and visual question answering.

Prompt Caching

Repeated context (system prompts, large documents, conversation history) can be cached to reduce both cost and latency. Cache reads cost 10% of standard input pricing. A 5-minute cache write costs 1.25x the base rate; a 1-hour cache write costs 2x. Caching pays for itself after just one cache hit on the 5-minute tier.

Structured Outputs and Streaming

You can constrain Claude's responses to match a JSON schema, which eliminates parsing errors in production. Streaming delivers tokens as they're generated via server-sent events, reducing time-to-first-token for interactive applications.

Seven official SDKs (Python, TypeScript, C#, Go, Java, PHP, Ruby) wrap all of these capabilities with type-safe interfaces, automatic retries, and built-in streaming support.

Fastio features

Give Your Claude Agents Persistent Storage

50GB free workspace with MCP-native access at mcp.fast.io. No credit card, no trial expiration. Your agents write files, your team picks them up.

What Are Claude Managed Agents?

Claude Managed Agents is the second API track, currently in beta. It gives Claude a cloud sandbox where it can run shell commands, read and write files, search the web, and connect to external services through MCP servers. You don't build the agent loop or manage infrastructure. Anthropic handles that.

The system is built around four concepts:

Agent

A reusable configuration that bundles the model, system prompt, tools, MCP servers, and skills. Create it once and reference it by ID across sessions.

Environment

Where sessions run. Anthropic offers managed cloud sandboxes, or you can run self-hosted sandboxes on your own infrastructure for compliance or data residency needs.

Session

A running agent instance performing a specific task. Sessions are stateful: the filesystem, conversation history, and outputs persist across multiple interactions within the session. Runtime is billed at $0.08 per session-hour, measured to the millisecond, and only while the session is actively running.

Events

Messages exchanged between your application and the agent. You send user turns and tool results; the agent streams back status updates and tool calls via SSE.

A typical one-hour coding session on Opus 4.8 with 50K input and 15K output tokens costs roughly $0.71 total: $0.25 for input, $0.375 for output, and $0.08 for runtime.

When your managed agent session ends, the outputs live only within the session sandbox. For workflows that need to persist files between sessions, hand results to a human team, or feed outputs into other agents, you need external storage. Local filesystems and S3 buckets work, but they require manual setup. Cloud workspaces like Fast.io offer a simpler path: agents connect via MCP at /storage-for-agents/, write outputs to shared workspaces, and humans access the same files through a browser. The free agent tier includes 50GB storage and 5,000 monthly credits with no credit card required.

All Managed Agents requests require the managed-agents-2026-04-01 beta header. The SDKs set this automatically.

How to Make Your First Claude API Call

Getting started takes three steps: get an API key, install an SDK, and send a request.

Step 1: Get an API Key

Create an account at platform.claude.com. Go to Account Settings and generate an API key. Export it as an environment variable:

export ANTHROPIC_API_KEY="your-api-key-here"

Step 2: Install the SDK

Python:

pip install anthropic

TypeScript:

npm install @anthropic-ai/sdk

Step 3: Send a Request

Python:

import anthropic

client = anthropic.Anthropic()

message = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=1024,
    messages=[
        {"role": "user", "content": "Explain how API rate limiting works."}
    ],
)
print(message.content[0].text)

TypeScript:

import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic();

const message = await client.messages.create({
  model: "claude-sonnet-4-6",
  max_tokens: 1024,
  messages: [
    { role: "user", content: "Explain how API rate limiting works." }
  ],
});
console.log(message.content[0].text);

The response includes the generated text, token usage counts, and a stop reason. You're billed based on the input_tokens and output_tokens reported in the usage object.

Understanding Rate Limits

The API enforces rate limits organized into usage tiers that increase automatically as your account matures. Each tier has spend limits (maximum monthly cost), requests per minute (RPM), and tokens per minute (TPM). You can view your current limits in the Console under Account Settings. For higher limits or priority service levels, contact Anthropic's sales team through the Console.

Where to Go Next

Once your first call works, the natural next steps are adding a system prompt, enabling streaming for real-time output, and connecting tools. Anthropic's quickstart guide walks through building a web search assistant as a second project. The Anthropic Cookbook has runnable Jupyter notebooks covering PDFs, embeddings, structured extraction, and more.

For agent development specifically, the combination of Claude's API with persistent storage is where things get practical. Your agent generates outputs through the Messages API or a Managed Agent session, then stores those outputs in a workspace that other agents or team members can access. Whether you use local files, S3, or an intelligent workspace with built-in semantic search, the storage layer is what turns a one-shot API call into a repeatable workflow.

Frequently Asked Questions

What is the Anthropic Claude API?

The Anthropic Claude API is a RESTful API at api.anthropic.com that provides programmatic access to Claude models and Claude Managed Agents. It supports text and image input, tool calling, web search, extended thinking, prompt caching, structured outputs, and streaming. Developers can use it directly or through cloud platforms like AWS Bedrock, Vertex AI, and Microsoft Foundry.

How much does the Claude API cost?

Pricing varies by model. Claude Haiku 4.5 is the cheapest at $1/MTok input and $5/MTok output. Sonnet 4.6 costs $3/$15, Opus 4.8 costs $5/$25, and Fable 5 costs $10/$50. The Batch API cuts all prices in half for asynchronous workloads. Prompt caching further reduces costs, with cache reads at 10% of the standard input price.

What models are available in the Claude API?

Four model families are generally available: Claude Fable 5 (most capable), Claude Opus 4.8 (complex reasoning and coding), Claude Sonnet 4.6 (best speed-to-intelligence ratio), and Claude Haiku 4.5 (fastest, for high-volume tasks). Claude Mythos 5 is available in limited release through Project Glasswing. Legacy models including Opus 4.7, Opus 4.6, and Sonnet 4.5 remain available but are no longer the recommended option.

How do I get started with the Anthropic API?

Create an account at platform.claude.com, generate an API key from Account Settings, and install the official SDK for your language (Python, TypeScript, C#, Go, Java, PHP, or Ruby). The SDK reads your API key from the ANTHROPIC_API_KEY environment variable. A basic Messages API call takes about five lines of code.

What is the difference between the Messages API and Claude Managed Agents?

The Messages API gives you direct model access where you control the prompt, tool execution, and orchestration loop. Claude Managed Agents is a pre-built agent use that runs in Anthropic's cloud sandboxes with bash, file operations, web access, and MCP built in. Use the Messages API when you need fine-grained control. Use Managed Agents when you want Anthropic to handle the execution environment for long-running or async tasks.

Does the Claude API support streaming?

Yes. All Claude models support streaming via server-sent events (SSE). When streaming is enabled, the API delivers tokens incrementally as they are generated, reducing time-to-first-token for interactive applications. All seven official SDKs include built-in streaming support with type-safe event handling.

Related Resources

Fastio features

Give Your Claude Agents Persistent Storage

50GB free workspace with MCP-native access at mcp.fast.io. No credit card, no trial expiration. Your agents write files, your team picks them up.