[metadata]
apple-mobile-web-app-status-bar-style: default
description: Understand the Claude API's available endpoints, authentication headers, client SDKs, pagination, rate limits, and cloud platform access options.
mobile-web-app-capable: yes
og:description: Understand the Claude API's available endpoints, authentication headers, client SDKs, pagination, rate limits, and cloud platform access options.
og:image: https://platform.claude.com/web-api/og/docs/en/api/overview?design-rev=2
og:image:alt: API overview
og:image:height: 630
og:image:type: image/png
og:image:width: 1200
og:locale: en
og:site_name: Claude Platform Docs
og:title: API overview
og:type: article
og:url: https://platform.claude.com/docs/en/api/overview
twitter:card: summary_large_image
twitter:description: Understand the Claude API's available endpoints, authentication headers, client SDKs, pagination, rate limits, and cloud platform access options.
twitter:image: https://platform.claude.com/web-api/og/docs/en/api/overview?design-rev=2
twitter:title: API overview
viewport: width=device-width, initial-scale=1, viewport-fit=cover

[canonical-links]
https://platform.claude.com/docs/en/api/overview

[document-links]
AI agents: https://claude.com/solutions/agents
API key: /settings/keys
API versions: /docs/en/api/versioning
Account Settings: https://platform.claude.com/settings/keys
Admin API: /docs/en/manage-claude/admin-api
Admin: /docs/en/api/http/admin
Admin: /docs/en/manage-claude/admin-api
Agents API: /docs/en/managed-agents/agent-setup
Anthropic: https://www.anthropic.com/company
Authentication: /docs/en/manage-claude/authentication
Availability: https://www.anthropic.com/supported-countries
Best practices: /docs/en/about-claude/use-case-guides/overview
Beta headers: /docs/en/api/beta-headers
Billing: /settings/billing
Blog: https://claude.com/blog
CLI, SDKs, and libraries: /docs/en/cli-sdks-libraries/overview
Careers: https://www.anthropic.com/careers
Claude API skill: /docs/en/agents-and-tools/agent-skills/claude-api-skill
Claude Console account: https://platform.claude.com
Claude Managed Agents quickstart: /docs/en/managed-agents/quickstart
Claude Managed Agents reference: /docs/en/managed-agents/sessions
Claude Platform Docs: /docs/en/home
Claude Platform on AWS: /docs/en/build-with-claude/claude-platform-on-aws
Claude in Amazon Bedrock: /docs/en/build-with-claude/claude-in-amazon-bedrock
Claude in Microsoft Foundry: /docs/en/build-with-claude/claude-in-microsoft-foundry
Claude on AWS: https://claude.com/partners/amazon-bedrock
Claude on Google Cloud: /docs/en/build-with-claude/claude-on-vertex-ai
Claude on Google Cloud: https://claude.com/partners/google-cloud-vertex-ai
Client SDKs: /docs/en/cli-sdks-libraries/overview
Code modernization: https://claude.com/solutions/code-modernization
Coding: https://claude.com/solutions/coding
Completions: /docs/en/api/http/completions
Compliance API: /docs/en/api/http/compliance
Connectors: https://claude.com/partners/mcp
Console: https://platform.claude.com/
Courses: https://claude.com/resources/courses
Customer stories: https://claude.com/customers
Customer support: https://claude.com/solutions/customer-support
Discord: https://www.anthropic.com/discord
Economic Futures: https://www.anthropic.com/economic-futures
Engineering at Anthropic: https://www.anthropic.com/engineering
Environments API: /docs/en/managed-agents/environments
Errors: /docs/en/api/errors
Events: https://www.anthropic.com/events
Features overview: /docs/en/api/overview
Features overview: /docs/en/build-with-claude/overview
Files API: /docs/en/api/files/upload
Files API: /docs/en/build-with-claude/files
Files: /docs/en/api/http/beta/files
Financial services: https://claude.com/solutions/financial-services
Get started: /docs/en/get-started
Government: https://claude.com/solutions/government
Higher education: https://claude.com/solutions/education
IAM actions (Claude Platform on AWS): /docs/en/api/claude-platform-on-aws-iam-actions
IP addresses: /docs/en/api/ip-addresses
Identify the workspace behind an API response: /docs/en/manage-claude/workspaces#identify-the-workspace-behind-an-api-response
K-12 teachers: https://claude.com/solutions/teachers
Key types: /docs/en/manage-claude/authentication#key-types
Life sciences: https://claude.com/solutions/life-sciences
Listing sessions: /docs/en/managed-agents/session-operations#listing-sessions
Log in: /login?returnTo=%2Fdocs%2Fen%2Fapi%2Foverview
Managed Agents: /docs/en/managed-agents/overview
Message Batches API: /docs/en/api/messages/batches/create
Message Batches API: /docs/en/build-with-claude/batch-processing
Messages API reference: /docs/en/api/messages/create
Messages API: /docs/en/api/messages/create
Messages: /docs/en/api/http/beta/messages
Messages: /docs/en/intro
Microsoft Foundry: /docs/en/build-with-claude/claude-in-microsoft-foundry
Models & pricing: /docs/en/models/overview
Models API: /docs/en/api/models/list
Models: /docs/en/api/http/beta/models
News: https://www.anthropic.com/news
Organization : /docs/en/api/http/beta/organization
Parse Unverified: /docs/en/api/http/beta/webhooks/parse_unverified
Powered by Claude: https://claude.com/partners/powered-by-claude
Privacy policy: https://www.anthropic.com/legal/privacy
Rate limits: /docs/en/api/rate-limits
Rate limits: /settings/limits
Release notes: /docs/en/release-notes/overview
Request ID: /docs/en/api/errors#request-id
Request IDs: /docs/en/build-with-claude/claude-platform-on-aws#request-ids
Research: https://www.anthropic.com/research
Response headers: /docs/en/api/rate-limits#response-headers
Responsible Scaling Policy: https://www.anthropic.com/news/announcing-our-updated-responsible-scaling-policy
Responsible disclosure policy: https://www.anthropic.com/responsible-disclosure-policy
Security and compliance: https://trust.anthropic.com
Select a workspace: /docs/en/manage-claude/authentication#select-a-workspace
Service partners: https://claude.com/partners/services
Service tiers: /docs/en/api/service-tiers
Sessions API: /docs/en/managed-agents/sessions
Skills API: /docs/en/api/skills/create
Skills: /docs/en/api/http/beta/skills
Startups program: https://claude.com/programs/startups
Status: https://status.claude.com/
Support: https://support.claude.com/
Supported regions: /docs/en/api/supported-regions
Terms of service: Commercial: https://www.anthropic.com/legal/commercial-terms
Terms of service: Consumer: https://www.anthropic.com/legal/consumer-terms
Token Counting API: /docs/en/api/messages-count-tokens
Transparency: https://www.anthropic.com/transparency
Trigger a routine: /docs/en/api/claude-code/routines-fire
Tunnels : /docs/en/api/http/beta/tunnels
Unwrap: /docs/en/api/http/beta/webhooks/unwrap
Usage policy: https://www.anthropic.com/legal/aup
Use cases: https://claude.com/resources/use-cases
User Profiles : /docs/en/api/http/beta/user_profiles
Versions: /docs/en/api/versioning
Webhooks : /docs/en/api/http/beta/webhooks
Working with Messages: /docs/en/build-with-claude/working-with-messages
Workload Identity Federation: /docs/en/manage-claude/workload-identity-federation
client SDKs: /docs/en/cli-sdks-libraries/overview
control spend: /docs/en/api/rate-limits
expiration: /docs/en/manage-claude/authentication#key-expiration
https://instagram.com/claudeai
https://www.linkedin.com/showcase/claude
https://www.threads.com/@claudeai
https://www.youtube.com/@anthropic-ai
https://x.com/claudeai
many countries and regions: /docs/en/api/supported-regions
playground: https://platform.claude.com/playground
workspace: /docs/en/manage-claude/workspaces
workspaces: https://platform.claude.com/settings/workspaces
 Archive Tunnel: /docs/en/api/http/beta/tunnels/archive
 Count tokens in a Message: /docs/en/api/http/beta/messages/count_tokens
 Create Enrollment URL: /docs/en/api/http/beta/user_profiles/create_enrollment_url
 Create Skill: /docs/en/api/http/beta/skills/create
 Create Tunnel: /docs/en/api/http/beta/tunnels/create
 Create User Profile: /docs/en/api/http/beta/user_profiles/create
 Create a Message: /docs/en/api/http/beta/messages/create
 Create a Text Completion: /docs/en/api/http/completions/create
 Reveal Tunnel Token: /docs/en/api/http/beta/tunnels/reveal_token
 Rotate Tunnel Token: /docs/en/api/http/beta/tunnels/rotate_token
 Update User Profile: /docs/en/api/http/beta/user_profiles/update
 Upload File: /docs/en/api/http/beta/files/upload
 API reference: /docs/en/api/overview
 Console: /
 Delete File: /docs/en/api/http/beta/files/delete
 Delete Skill: /docs/en/api/http/beta/skills/delete
 Download File: /docs/en/api/http/beta/files/download
 Get Current Organization: /docs/en/api/http/beta/organization/retrieve
 Get File Metadata: /docs/en/api/http/beta/files/retrieve_metadata
 Get Skill: /docs/en/api/http/beta/skills/retrieve
 Get Tunnel: /docs/en/api/http/beta/tunnels/retrieve
 Get User Profile: /docs/en/api/http/beta/user_profiles/retrieve
 Get a Model: /docs/en/api/http/beta/models/retrieve
 List Files: /docs/en/api/http/beta/files/list
 List Models: /docs/en/api/http/beta/models/list
 List Skills: /docs/en/api/http/beta/skills/list
 List Tunnels: /docs/en/api/http/beta/tunnels/list
 List User Profiles: /docs/en/api/http/beta/user_profiles/list

[content]
API overview - Claude Platform Docs
Claude Platform Docs
Messages
Managed Agents
Admin
Resources

Best practices
Models & pricing
CLI, SDKs, and libraries
Claude API skill
Release notes

API reference

English


Console
Log in


Search
Ctrl
K

Include beta APIs
Using the API
Features overview
Beta headers
Errors
Messages

Create a Message

Count tokens in a Message
Batches

Managed Agents

Agents

Environments

Sessions

Deployments

Deployment Runs

Vaults

Memory Stores

Dreams

Files

Upload File

List Files

Download File

Get File Metadata

Delete File
Models

List Models

Get a Model
Skills

Create Skill

List Skills

Get Skill

Delete Skill
Versions

Organization


Get Current Organization
API Keys

External Keys

Federation

Invites

Service Accounts

Users

Workspaces

Rate Limits

Compliance Settings

Tunnels


Create Tunnel

Get Tunnel

List Tunnels

Archive Tunnel

Reveal Tunnel Token

Rotate Tunnel Token
Certificates

User Profiles


Create User Profile

List User Profiles

Get User Profile

Update User Profile

Create Enrollment URL
Webhooks

Unwrap
Parse Unverified
Admin
Organizations

Invites

Users

RBAC Groups

RBAC Roles

Workspaces

API Keys

External Keys

Usage Report

Cost Report

Analytics

Spend Limits

Rate Limits

Service Accounts

Federation Issuers

Federation Rules

MCP Tunnels


Compliance API
Activities

Organizations

Groups

Apps

Code

Completions

Create a Text Completion
Support & configuration
Rate limits
Service tiers
IAM actions (Claude Platform on AWS)
Versions
IP addresses
Supported regions
Claude Code
Trigger a routine

Console
API reference

Using the API
API overview

Copy page

Understand the Claude API's available endpoints, authentication headers, client SDKs, pagination, rate limits, and cloud platform access options.

Copy page

The Claude API is a RESTful API at
https://api.anthropic.com
that provides programmatic access to Claude models and Claude Managed Agents.

New to Claude?
For direct model access, start with
Get started
and
Working with Messages
. For managed agent infrastructure, see the
Claude Managed Agents quickstart
.
Prerequisites

To use the Claude API, you'll need:
A
Claude Console account
An
API key
, or a configured
Workload Identity Federation
rule
For step-by-step setup instructions, see
Get started
.
Available APIs

The Claude API includes the following APIs:
Messages API
: Send messages to Claude for conversational interactions (
POST /v1/messages
)
Message Batches API
: Process large volumes of Messages requests asynchronously with 50% cost reduction (
POST /v1/messages/batches
)
Token Counting API
: Count tokens in a message before sending to manage costs and rate limits (
POST /v1/messages/count_tokens
)
Models API
: List available Claude models and their details (
GET /v1/models
)
Files API
: Upload and manage files for use across multiple API calls (
POST /v1/files
,
GET /v1/files
)
Skills API
: Create and manage custom agent skills (
POST /v1/skills
,
GET /v1/skills
)
The following APIs are in beta:
Agents API
: Define reusable, versioned agent configurations for Claude Managed Agents (
POST /v1/agents
,
GET /v1/agents
)
Sessions API
: Run stateful agent sessions in managed cloud sandboxes (
POST /v1/sessions
,
GET /v1/sessions/{id}/events/stream
)
Environments API
: Configure sandbox templates for agent sessions (
POST /v1/environments
,
GET /v1/environments
)
For the complete API reference with all endpoints, parameters, and response schemas, explore the API reference pages listed in the navigation. To access beta features, see
Beta headers
.
Authentication

For details on each authentication method and when to use it, see
Authentication
. Requests to the Claude API include these headers:
Header
Value
Required
Authorization
Bearer <token>
, where
<token>
is your API key or a short-lived access token obtained from
POST /v1/oauth/token
through
Workload Identity Federation
Yes, unless
x-api-key
is set
x-api-key
Your API key from Console. Legacy fallback for
Authorization
, still supported
No
anthropic-workspace-id
ID of the
workspace
the request runs in (for example,
wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ
). See
Select a workspace
.
Required with a multi-workspace API key. Optional for other API keys. Not used with Workload Identity Federation tokens, which select a workspace at token exchange.
anthropic-version
API version (for example,
2023-06-01
)
Yes
content-type
application/json
Yes
If you are using the
Client SDKs
, the SDK sends the authentication, version, and content-type headers automatically; you pass
anthropic-workspace-id
yourself when your key needs it. For API versioning details, see
API versions
.
When accessing Claude through a
cloud platform
, authentication is integrated with the cloud provider's IAM system. See the platform-specific documentation for supported credential types, required headers, and authentication options.
Getting API keys

The API is made available through the web
Console
. You can use
playground
to try out the API in the browser and then generate API keys in
Account Settings
. You choose each key's type (see
Key types
) and its
expiration
when you create it. Use
workspaces
to separate environments and
control spend
by use case.
Client SDKs

Anthropic provides official SDKs that simplify API integration by handling authentication, request formatting, error handling, and more.
Benefits:
Automatic header management (authentication,
anthropic-version
,
content-type
)
Type-safe request and response handling
Built-in retry logic and error handling
Streaming support
Request timeouts and connection management
For a list of client SDKs, see
Client SDKs
.
Claude API vs cloud platforms

Claude is available through the direct Claude API and through cloud platforms. Choose based on your infrastructure, feature availability, compliance requirements, and pricing preferences.
Claude API

Direct access
to the latest models and features
Anthropic billing and support
Best for:
New integrations, full feature access, direct relationship with Anthropic
Cloud platform APIs

Access Claude through AWS, Google Cloud, or Microsoft Azure:
Integrated
with cloud provider billing and IAM
Feature availability varies by platform:
Anthropic-operated platforms include
Claude Platform on AWS
and
Microsoft Foundry
; partner-operated platforms include Amazon Bedrock and Google Cloud. See each platform's page for feature availability and timing.
Best for:
Existing cloud commitments, specific compliance requirements, consolidated cloud billing
Platform
Provider
Documentation
Agent Platform
Google Cloud
Claude on Google Cloud
Amazon Bedrock
AWS
Claude in Amazon Bedrock
Claude Platform on AWS
AWS (Anthropic-operated)
Claude Platform on AWS
Microsoft Foundry
Microsoft Azure (Anthropic-operated)
Claude in Microsoft Foundry

Claude Managed Agents is available through the direct Claude API and
Claude Platform on AWS
. For feature availability across platforms, see the
Features overview
.
Request and response format

Request size limits

Endpoint
Maximum request size
Messages, Token Counting
32 MB
Message Batches API
256 MB
Files API
500 MB
Sessions, Agents, Environments
32 MB
If you exceed these limits, you'll receive a 413
request_too_large
error.

Partner-operated platforms have their own request size limits: Bedrock limits requests to 20 MB, and Google Cloud limits requests to 30 MB. Claude Platform on AWS uses the same limits as the direct Claude API. Consult your platform's documentation for current values.
Response headers

The Claude API includes the following headers in its responses:
Header
Description
request-id
A globally unique identifier for the request, such as
req_018EeWyXxfu5pfWkrYcMdjWG
. Include it when you contact support about a specific request. See
Request ID
.
anthropic-organization-id
The ID of the organization that the API key or access token used in the request belongs to.
anthropic-workspace-id
The
wrkspc_
-prefixed ID of the
workspace
that the API key or access token resolved to, such as
wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ
, including when that is your organization's Default Workspace. Absent when the credential doesn't resolve to a workspace (for example, on Admin API requests) or the request fails before authentication completes. See
Identify the workspace behind an API response
.
For the rate limit headers, see
Response headers
in Rate limits. For examples that read a response header by name with each SDK, see
Identify the workspace behind an API response
.

Claude Platform on AWS adds an AWS request ID (
x-amzn-requestid
) alongside the standard
request-id
header. See
Request IDs
for the dual-ID handling pattern.
Pagination

List endpoints return results in pages. Most newer list endpoints use the
page
and
next_page
cursor scheme described in this section. Some use a different scheme; see the note at the end of this section. Use the
limit
query parameter to control the page size and the
page
query parameter to fetch an adjacent page. Each response includes a
data
array alongside cursor fields for navigating between pages.
Name
Location
Description
limit
Query parameter
Maximum number of items to return per page.
page
Query parameter
Opaque cursor from a previous response. Pass a
next_page
or
prev_page
value here to fetch the adjacent page.
order
Query parameter
Sort direction for the results (
asc
or
desc
), on list endpoints that support sorting. A
page
cursor is only valid with the
order
it was created with.
next_page
Response field
Cursor for the next page, or
null
if there are no more results.
prev_page
Response field
Cursor for the previous page on endpoints that support backward pagination (currently
GET /v1/sessions
), or
null
if you are on the first page. Other list endpoints omit the field.
To go back a page, pass
prev_page
as the
page
parameter.
prev_page
is
null
when you're on the first page. Not all list endpoints support
prev_page
. Only
GET /v1/sessions
returns
prev_page
; on list endpoints that do not support backward pagination, the field is absent from the response rather than
null
. For a request walkthrough, see
Listing sessions
.
Every SDK provides an auto-paginating iterator that follows
next_page
for you. In Python and TypeScript, you get it by iterating the list result directly. The other SDKs provide the iterator through a separate method. SDK auto-pagination is forward-only; to go back a page, read
prev_page
from the response and pass it back as the
page
parameter yourself. See
client SDKs
for language-specific details.

Some list endpoints use a different cursor scheme. The
Message Batches API
, the
Models API
, and several
Admin API
endpoints take
after_id
and
before_id
query parameters instead of
page
. Their responses return
has_more
,
first_id
, and
last_id
instead of
next_page
. See the reference page for each endpoint for its exact pagination fields.
Rate limits and availability

Rate limits

The API enforces rate limits and spend limits to prevent misuse and manage capacity. Limits are organized into usage tiers; your organization is placed on a tier automatically and can move to a higher tier over time. Each tier has:
Spend limits
: Maximum monthly cost for API usage
Rate limits
: Maximum number of requests per minute (RPM) and tokens per minute (TPM)
You can view your rate limits on the
Rate limits
page and your spend limits on the
Billing
page in the Console. For higher rate limits or a higher monthly spend cap, use
Request rate limit increase
on the Rate limits page.
For detailed information about limits, tiers, and the token bucket algorithm used for rate limiting, see
Rate limits
.
Availability

The Claude API is available in
many countries and regions
worldwide. Check the supported regions page to confirm availability in your location.
Next steps


Messages API reference
Complete API specification for direct model interactions

Claude Managed Agents reference
Agents, Sessions, and Environments endpoints

Client SDKs
Python, TypeScript, C#, Go, Java, PHP, and Ruby

Rate limits
Usage tiers, requesting higher limits, and the token bucket algorithm
Was this page helpful?


Prerequisites
Available APIs
Authentication
Getting API keys
Client SDKs
Claude API vs cloud platforms
Claude API
Cloud platform APIs
Request and response format
Request size limits
Response headers
Pagination
Rate limits and availability
Rate limits
Availability
Next steps
Claude Platform Docs


Solutions
AI agents
Code modernization
Coding
Customer support
Financial services
Government
Higher education
K-12 teachers
Life sciences
Partners
Claude on AWS
Claude on Google Cloud
Learn
Blog
Courses
Use cases
Connectors
Customer stories
Engineering at Anthropic
Events
Powered by Claude
Service partners
Startups program
Company
Anthropic
Careers
Economic Futures
Research
News
Responsible Scaling Policy
Security and compliance
Transparency
Learn
Blog
Courses
Use cases
Connectors
Customer stories
Engineering at Anthropic
Events
Powered by Claude
Service partners
Startups program
Help and security
Availability
Status
Support
Discord
Terms and policies
Privacy policy
Responsible disclosure policy
Terms of service: Commercial
Terms of service: Consumer
Usage policy
Ask Docs

