VOOZH about

URL: https://platform.claude.com/docs/en/api/overview

⇱ API overview - Claude API Docs


Features overview
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

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:

For step-by-step setup instructions, see Get started.

Available APIs

The Claude API includes the following APIs:

General Availability:

  • Messages API: Send messages to Claude for conversational interactions (POST /v1/messages)
  • : Process large volumes of Messages requests asynchronously with 50% cost reduction ()

Was this page helpful?

Message Batches API
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)
  • Beta:

    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 both authentication methods and when to use each, see Authentication. All requests to the Claude API must include these headers:

    HeaderValueRequired
    x-api-keyYour API key from ConsoleOne of x-api-key or Authorization
    AuthorizationBearer <token>, where <token> is a short-lived access token obtained from POST /v1/oauth/token via Workload Identity FederationOne of x-api-key or Authorization
    anthropic-versionAPI version (for example, 2023-06-01)Yes
    content-typeapplication/jsonYes

    If you are using the Client SDKs, the SDK will send these headers automatically. 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 the Workbench to try out the API in the browser and then generate API keys in Account Settings. Use workspaces to segment your API keys 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:

    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

    Cloud platform APIs

    Access Claude through AWS, Google Cloud, or Microsoft Azure:

    PlatformProviderDocumentation
    Claude Platform on AWSAWS (Anthropic-operated)Claude Platform on AWS
    Amazon BedrockAWSClaude in Amazon Bedrock
    Vertex AIGoogle CloudClaude on Vertex AI
    Microsoft FoundryMicrosoft 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

    EndpointMaximum request size
    Messages, Token Counting32 MB
    Message Batches API256 MB
    Files API500 MB
    Sessions, Agents, Environments32 MB

    If you exceed these limits, you'll receive a 413 request_too_large error.

    Partner-operated platforms have their own request size limits: Vertex AI limits requests to 30 MB, and Bedrock limits requests to 20 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 every 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.

    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 that increase automatically as you use the API. Each tier has:

    You can view your organization's current limits in the Console. For higher limits or Priority Tier (enhanced service levels with committed spend), contact sales through the Console.

    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, spend limits, and token bucket algorithm