Answer: Claude Code reads ANTHROPIC_API_KEY and ANTHROPIC_AUTH_TOKEN for authentication, ANTHROPIC_MODEL (plus the ANTHROPIC_DEFAULT_*_MODEL variables) for model selection, and ANTHROPIC_BASE_URL to route requests through a proxy or gateway. Status: Confirmed Entry: tool/claude-code/settings/list-of-env-vars Revision: 5 Digest: sha256:7863c1521f898e95 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:04:06Z Last changed: 2026-11-20T12:20:31Z (Check succeeded again) Last verified: 2026-11-20T12:20:31Z Next check: 2026-11-21T12:20:31Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Authentication API key variable | ANTHROPIC_API_KEY | [1] | 2026-11-20 Authentication token variable | ANTHROPIC_AUTH_TOKEN | [1] | 2026-11-20 Model selection variable | ANTHROPIC_MODEL | [1] | 2026-11-20 Request routing variable | ANTHROPIC_BASE_URL | [1] | 2026-11-20 Sources: [1] Anthropic. "Environment variables". https://code.claude.com/docs/en/env-vars.md Role: primary. Accessed: 2026-11-20T12:20:31Z Quote: "`ANTHROPIC_API_KEY` | API key sent as `X-Api-Key` header." (Supports: Authentication API key variable) Quote: "`ANTHROPIC_AUTH_TOKEN` | Custom value for the `Authorization` header" (Supports: Authentication token variable) Quote: "`ANTHROPIC_MODEL` | Name of the model setting to use" (Supports: Model selection variable) Quote: "`ANTHROPIC_BASE_URL` | Override the API endpoint to route requests through a proxy or gateway." (Supports: Request routing variable) Published: 2026-11-20T02:53:00Z Snapshot SHA-256: 5a92055baebcd045c25b5e47ef862490e0db33a9505309b81cadf159ce951572 (captured 2026-11-20T12:20:30Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. Cross-check: not-available at 2026-11-20T12:20:31Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:20:31Z Last attempt: 2026-11-20T12:20:31Z Notes and limitations: Extracted automatically from a single official source (section "Variables"). Only the first 60,000 characters of the page text were read. Related: https://latestn.com/tool/claude-code/settings/load-plugin-every-session How do I make a Claude Code plugin load in every session? https://latestn.com/tool/claude-code/settings/local-session-env-vars How do I set environment variables for local sessions in Claude Code Desktop? https://latestn.com/tool/claude-code/settings/lsp-recommendation-dialog How do I accept or dismiss the LSP plugin recommendation dialog in Claude Code? https://latestn.com/tool/claude-code/settings/gitlab-cicd-variables What CI/CD variables and parameters can I configure for Claude Code in GitLab? https://latestn.com/tool/claude-code/settings/hook-locations Where can I configure hooks in Claude Code (which settings files and locations)? https://latestn.com/tool/claude-code/settings/inspect-effective-config How do I inspect the defaults and my effective auto mode config in Claude Code? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-20T12:20:31Z | recovered | Check succeeded again | — 2026-11-20T12:20:31Z | changed | Request routing variable: — → ANTHROPIC_BASE_URL | [1] 2026-11-20T12:20:31Z | changed | Model selection variable: — → ANTHROPIC_MODEL | [1] 2026-11-20T12:20:31Z | changed | Authentication token variable: — → ANTHROPIC_AUTH_TOKEN | [1] 2026-11-20T12:20:31Z | changed | Authentication API key variable: — → ANTHROPIC_API_KEY | [1] 2026-11-20T12:20:31Z | changed | Request routing: ANTHROPIC_BASE_URL → — | [1] 2026-11-20T12:20:31Z | changed | Default model: ANTHROPIC_DEFAULT_MODEL → — | [1] 2026-11-20T12:20:31Z | changed | Model selection: ANTHROPIC_MODEL → — | [1] 2026-11-20T12:20:31Z | changed | Authentication token: ANTHROPIC_AUTH_TOKEN → — | [1] 2026-11-20T12:20:31Z | changed | Authentication API key: ANTHROPIC_API_KEY → — | [1] 2026-11-19T12:16:06Z | check-failed | Extraction did not pass verification: answer contains `ANTHROPIC_DEFAULT_*_MODEL`, which does not appear in the source | — 2026-11-18T12:16:01Z | changed | Request routing: — → ANTHROPIC_BASE_URL | [1] 2026-11-18T12:16:01Z | changed | Default model: — → ANTHROPIC_DEFAULT_MODEL | [1] 2026-11-18T12:16:01Z | changed | Model selection: — → ANTHROPIC_MODEL | [1] 2026-11-18T12:16:01Z | changed | Authentication token: — → ANTHROPIC_AUTH_TOKEN | [1] 2026-11-18T12:16:01Z | changed | Authentication API key: — → ANTHROPIC_API_KEY | [1] 2026-11-18T12:16:01Z | changed | Request routing variable: ANTHROPIC_BASE_URL → — | [1] 2026-11-18T12:16:01Z | changed | Default model variable: ANTHROPIC_DEFAULT_MODEL → — | [1] 2026-11-18T12:16:01Z | changed | Model selection variable: ANTHROPIC_MODEL → — | [1] 2026-11-18T12:16:01Z | changed | Auth token variable: ANTHROPIC_AUTH_TOKEN → — | [1] 2026-11-18T12:16:01Z | changed | API key variable: ANTHROPIC_API_KEY → — | [1] 2026-11-17T12:25:32Z | changed | Request routing variable: — → ANTHROPIC_BASE_URL | [1] 2026-11-17T12:25:32Z | changed | Default model variable: — → ANTHROPIC_DEFAULT_MODEL | [1] 2026-11-17T12:25:32Z | changed | Model selection variable: — → ANTHROPIC_MODEL | [1] 2026-11-17T12:25:32Z | changed | Auth token variable: — → ANTHROPIC_AUTH_TOKEN | [1] 2026-11-17T12:25:32Z | changed | API key variable: — → ANTHROPIC_API_KEY | [1] 2026-11-17T12:25:32Z | changed | Request routing: ANTHROPIC_BASE_URL → — | [1] 2026-11-17T12:25:32Z | changed | Default model: ANTHROPIC_DEFAULT_MODEL → — | [1] 2026-11-17T12:25:32Z | changed | Model selection: ANTHROPIC_MODEL → — | [1] 2026-11-17T12:25:32Z | changed | Authentication (auth token): ANTHROPIC_AUTH_TOKEN → — | [1] 2026-11-17T12:25:32Z | changed | Authentication (API key): ANTHROPIC_API_KEY → — | [1] 2026-11-15T12:20:25Z | changed | Request routing: — → ANTHROPIC_BASE_URL | [1] 2026-11-15T12:20:25Z | changed | Default model: — → ANTHROPIC_DEFAULT_MODEL | [1] 2026-11-15T12:20:25Z | changed | Model selection: — → ANTHROPIC_MODEL | [1] 2026-11-15T12:20:25Z | changed | Authentication (auth token): — → ANTHROPIC_AUTH_TOKEN | [1] 2026-11-15T12:20:25Z | changed | Authentication (API key): — → ANTHROPIC_API_KEY | [1] 2026-11-15T12:20:25Z | changed | Default model variable: ANTHROPIC_DEFAULT_MODEL → — | [1] 2026-11-15T12:20:25Z | changed | Base URL variable: ANTHROPIC_BASE_URL → — | [1] 2026-11-15T12:20:25Z | changed | Profile variable: ANTHROPIC_PROFILE → — | [1] 2026-11-15T12:20:25Z | changed | Auth token variable: ANTHROPIC_AUTH_TOKEN → — | [1] 2026-11-15T12:20:25Z | changed | API key variable: ANTHROPIC_API_KEY → — | [1] 2026-11-15T12:20:25Z | changed | Model selection variable: ANTHROPIC_MODEL → — | [1] 2026-11-13T03:04:06Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/settings/list-of-env-vars/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/settings/list-of-env-vars POST: https://latestn.com/dispute/tool/claude-code/settings/list-of-env-vars with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/settings/list-of-env-vars?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). Which environment variables does Claude Code read to control model selection, authentication, and request routing? Revision 5, last verified 2026-11-20T12:20:31Z. https://latestn.com/tool/claude-code/settings/list-of-env-vars (accessed 2026-11-21T10:03:43Z). @misc{LatestN_tool_claude_code_settings_list_of_env_vars_r5, title = {Which environment variables does Claude Code read to control model selection, authentication, and request routing?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/settings/list-of-env-vars}}, note = {Revision 5; digest sha256:7863c1521f898e95; last verified 2026-11-20T12:20:31Z; accessed 2026-11-21T10:03:43Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/settings/list-of-env-vars