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.
