[KongchangAI]
ConceptAuth Token环境变量

ANTHROPIC_AUTH_TOKEN

An environment variable for Claude Code used to store API authentication credentials; a third-party provider's API key can be entered here.

Core Facts

Timeline (last 90 days)

Nov 9

The key parameters for switching providers generally include ANTHROPIC_BASE_URL (API endpoint) and ANTHROPIC_AUTH_TOKEN (or API Key) in env, as well as the model field specifying the default model.

Unverified50%
Oct 20

The ANTHROPIC_AUTH_TOKEN environment variable is the authentication token sent with requests; local Ollama does not verify a real key, so any placeholder value works.

Unverified50%
Oct 14

ANTHROPIC_AUTH_TOKEN sends authentication via the Authorization: Bearer header, ANTHROPIC_API_KEY sends it via the x-api-key header, and ANTHROPIC_API_KEY overrides subscription login and requires interactive confirmation.

Unverified50%
Oct 14

If ANTHROPIC_AUTH_TOKEN and ANTHROPIC_API_KEY are both set with different values, the manager rejects the request with a 401.

Unverified50%
Oct 12

Meta's documentation defines three environment variables to point Claude Code at its API: ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, and ANTHROPIC_MODEL, and requires setting the Opus, Sonnet, and Haiku aliases and the sub-agent model to the same ID to ensure no request falls back to a Claude model.

Unverified50%
Oct 12

By setting environment variables such as ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, and ANTHROPIC_MODEL, Claude Code can be pointed at Meta's API, but only Muse Wonder is available, not Wonder Full.

Unverified50%
Oct 12

Claude Code decides the domain to which requests are sent by reading the environment variable ANTHROPIC_BASE_URL, and performs authentication through ANTHROPIC_AUTH_TOKEN.

Unverified50%

All Facts (8)

Verified

Claude Code uses the environment variables ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY to determine the API endpoint and authentication information.

80%
Unverified

The key parameters for switching providers generally include ANTHROPIC_BASE_URL (API endpoint) and ANTHROPIC_AUTH_TOKEN (or API Key) in env, as well as the model field specifying the default model.

50%
Unverified

The ANTHROPIC_AUTH_TOKEN environment variable is the authentication token sent with requests; local Ollama does not verify a real key, so any placeholder value works.

50%
Unverified

ANTHROPIC_AUTH_TOKEN sends authentication via the Authorization: Bearer header, ANTHROPIC_API_KEY sends it via the x-api-key header, and ANTHROPIC_API_KEY overrides subscription login and requires interactive confirmation.

50%
Unverified

If ANTHROPIC_AUTH_TOKEN and ANTHROPIC_API_KEY are both set with different values, the manager rejects the request with a 401.

50%
Unverified

By setting environment variables such as ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, and ANTHROPIC_MODEL, Claude Code can be pointed at Meta's API, but only Muse Wonder is available, not Wonder Full.

50%
Unverified

Meta's documentation defines three environment variables to point Claude Code at its API: ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, and ANTHROPIC_MODEL, and requires setting the Opus, Sonnet, and Haiku aliases and the sub-agent model to the same ID to ensure no request falls back to a Claude model.

50%
Unverified

Claude Code decides the domain to which requests are sent by reading the environment variable ANTHROPIC_BASE_URL, and performs authentication through ANTHROPIC_AUTH_TOKEN.

50%

Source Articles