ANTHROPIC_WORKSPACE_ID
A Claude Code environment variable, read out of the shipped bundle. It has been in the build since v2.1.141, including the newest one read.
What it is
Workspace ID for [workload identity federation](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation). Set this when your federation rule is scoped to more than one workspace so the token exchange knows which workspace to target
Anthropic's own wording. Read off Environment variables, captured 2026-08-28.
Presence across releases
| Releases | Reading | Declared type | Default |
|---|---|---|---|
| 2.1.245 – 2.1.250 5 releases | never mined | — | — |
| 2.1.210 – 2.1.243 33 releases | in the build | str | — |
| 2.1.141 – 2.1.209 59 releases | in the build | — | — |
A row reading never mined is a release with no archived bundle behind it. Nothing was read out of it, so nothing here says whether the name was in it. A declared type or a default is only ever what that release's own bundle stated.
Changelog entries naming it
No changelog entry here has ever named it. That is a statement about what has been written, not about the name: it has been in the build since v2.1.141 without anybody writing a line about it.
Documentation pages
- Environment variables reference table Claude Code CLI
- console mentions it Claude Developer Platform
- Edit docker-compose.yaml: increment the integer in the setup service's mentions it Claude Developer Platform
- reference mentions it Claude Developer Platform
- On a remote host without a browser: mentions it Claude Developer Platform
- using mentions it Claude Developer Platform
- wif-admin-api mentions it Claude Developer Platform
- aws mentions it Claude Developer Platform
- Create the app registration that represents the Claude API audience. mentions it Claude Developer Platform
- gcp mentions it Claude Developer Platform
- github-actions mentions it Claude Developer Platform
- kubernetes mentions it Claude Developer Platform
- okta mentions it Claude Developer Platform
A reference table page is one whose own table defines this name, and it is where the description above came from. A page that mentions it carries the name somewhere in its text and may say nothing about it at all. Every page carrying it.
Names beside it
Every environment variable in the inventory starting anthropic, up to twelve of them.
ANTHROPIC_API_KEYAPI key sent as X-Api-Key header. When set, this key is used instead of your Claude Pro, Max, Team, or Enterprise subscription even if you are logged in. In non-interactive mode (-p), the key is always used when present. In interactive mode, you are prompted to approve the key once before it overrides your subscription. To use your subscription instead, run unset ANTHROPIC_API_KEY 2.1.138
ANTHROPIC_AUTH_TOKENCustom value for the Authorization header (the value you set here will be prefixed with Bearer ) 2.1.138
ANTHROPIC_AWS_API_KEYWorkspace API key for [Claude Platform on AWS](/docs/en/claude-platform-on-aws), generated in the AWS Console. Sent as x-api-key and takes precedence over AWS SigV4 2.1.138
ANTHROPIC_AWS_BASE_URLOverride the [Claude Platform on AWS](/docs/en/claude-platform-on-aws) endpoint URL. Use for custom regions or when routing through an [LLM gateway](/docs/en/llm-gateway). Defaults to https://aws-external-anthropic.{region}.api.aws. Claude Code resolves the region with the [same precedence as on Amazon Bedrock](/docs/en/amazon-bedrock#3-configure-claude-code) 2.1.138
ANTHROPIC_AWS_WORKSPACE_IDRequired for [Claude Platform on AWS](/docs/en/claude-platform-on-aws). Sent on every request as the anthropic-workspace-id header 2.1.138
ANTHROPIC_BASE_URLOverride the API endpoint to route requests through a proxy or gateway. When set to a non-first-party host, [MCP tool search](/docs/en/mcp#scale-with-mcp-tool-search) is disabled by default. Set ENABLE_TOOL_SEARCH=true if your proxy forwards tool_reference blocks. As of v2.1.196, [Remote Control](/docs/en/remote-control#requirements) is disabled when this points at a host other than api.anthropic.com, matching its behavior on Amazon Bedrock, Google Cloud's Agent Platform, and Microsoft Foundry 2.1.138
ANTHROPIC_BEDROCK_BASE_URLOverride the Amazon Bedrock endpoint URL. Use for custom Amazon Bedrock endpoints or when routing through an [LLM gateway](/docs/en/llm-gateway). See [Amazon Bedrock](/docs/en/amazon-bedrock) 2.1.138
ANTHROPIC_BEDROCK_MANTLE_BASE_URLOverride the Amazon Bedrock Mantle endpoint URL. See [Mantle endpoint](/docs/en/amazon-bedrock#use-the-mantle-endpoint) 2.1.138
ANTHROPIC_BEDROCK_REGION_PREFIXCross-region inference profile prefix (us, eu, apac, jp, au, or global) Claude Code tries first instead of the one derived from the AWS region. Ignored in AWS GovCloud regions. Requires Claude Code v2.1.224 or later. See [Amazon Bedrock](/docs/en/amazon-bedrock#cross-region-inference-profile-prefixes) 2.1.224
ANTHROPIC_BEDROCK_SERVICE_TIERAmazon Bedrock [service tier](https://docs.aws.amazon.com/bedrock/latest/userguide/service-tiers-inference.html) (default, flex, or priority). Sent as the X-Amzn-Bedrock-Service-Tier header. See [Amazon Bedrock](/docs/en/amazon-bedrock#service-tiers) 2.1.138
ANTHROPIC_BETASComma-separated list of additional anthropic-beta header values to include in API requests. Claude Code already sends the beta headers it needs; use this to opt into an [Anthropic API beta](https://platform.claude.com/docs/en/api/beta-headers) before Claude Code adds native support. Unlike the [--betas flag](/docs/en/cli-reference#cli-flags), which requires API key authentication, this variable works with all auth methods including Claude.ai subscription 2.1.138
ANTHROPIC_CONFIG_DIRNo description from anybody. 2.1.138
Read out of the published npm bundle release by release, and out of Anthropic's own documentation as this site captured it. Nothing on this page is a description anybody here wrote about what the environment variable does. All environment variables.