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
.

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. A key created for a single workspace runs in that workspace when you omit the header. Not used with Workload Identity Federation tokens, which select a workspace at token exchange.
