Claude Platform Docs
API referenceUsing the API

API overview

Understand the Claude API's available endpoints, authentication headers, client SDKs, pagination, rate limits, and cloud platform access options.

The Claude API is a RESTful API at https://api.anthropic.com that provides programmatic access to Claude models and Claude Managed Agents.

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:

  • 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)