Answer: Set the gateway's base URL and credential as environment variables: use ANTHROPIC_AUTH_TOKEN for a bearer token or Authorization header, or ANTHROPIC_API_KEY for an API key or x-api-key, and set ANTHROPIC_BASE_URL to the gateway's base URL. You can set them as shell environment variables or in the env block of a settings file. Status: Confirmed Entry: tool/claude-code/admin-and-enterprise/configure-llm-gateway Revision: 1 Digest: sha256:3d11dd319bc5f3a9 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:04:31Z Last changed: 2026-11-13T03:04:31Z Last verified: 2026-11-20T12:21:42Z Next check: 2026-11-21T12:21:42Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of base URL variable | ANTHROPIC_BASE_URL | [1] | 2026-11-20 bearer token credential variable | ANTHROPIC_AUTH_TOKEN | [1] | 2026-11-20 API key credential variable | ANTHROPIC_API_KEY | [1] | 2026-11-20 rotating credential option | apiKeyHelper | [1] | 2026-11-20 settings file env block | "env": { | [1] | 2026-11-20 Sources: [1] Anthropic. "Connect Claude Code to an LLM gateway". https://code.claude.com/docs/en/llm-gateway-connect.md Role: primary. Accessed: 2026-11-20T12:21:42Z Quote: "export ANTHROPIC_BASE_URL=https://llm-gateway.example.com" (Supports: base URL variable) Quote: "| `ANTHROPIC_AUTH_TOKEN` | Your gateway team said "bearer token" or "Authorization header" |" (Supports: bearer token credential variable) Quote: "| `ANTHROPIC_API_KEY` | Your gateway team said "API key" or "x-api-key" |" (Supports: API key credential variable) Quote: "| [`apiKeyHelper`](#rotate-credentials-with-apikeyhelper) | The credential rotates or comes from a vault |" (Supports: rotating credential option) Quote: ""env": { "ANTHROPIC_BASE_URL": "https://llm-gateway.example.com", "ANTHROPIC_AUTH_TOKEN": "sk-gateway-key"" (Supports: settings file env block) Published: 2026-11-20T02:55:07Z Snapshot SHA-256: 66a220c65179fe2601bf9e9fe4f1516d2a7f63ad4a0b22ff0c45b602f572ac30 (captured 2026-11-13T03:04:31Z) 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]. On this check the text of [1] was unchanged since 2026-11-13T03:04:31Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:21:42Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:21:42Z Last attempt: 2026-11-20T12:21:42Z Notes and limitations: Extracted automatically from a single official source (section "Configure Claude Code yourself"). Related: https://latestn.com/tool/claude-code/admin-and-enterprise/configure-otlp-endpoint How do I configure the OTLP endpoint and authentication for Claude Code telemetry? https://latestn.com/tool/claude-code/admin-and-enterprise/configure-proxies-gateways How do I configure a proxy or gateway for Claude Code in an enterprise deployment? https://latestn.com/tool/claude-code/admin-and-enterprise/configure-proxy-server How do I configure a proxy server for Claude Code in an enterprise environment? https://latestn.com/tool/claude-code/admin-and-enterprise/code-review-requirements What access or roles do I need to set up Code Review in Claude? https://latestn.com/tool/claude-code/admin-and-enterprise/combine-managed-sources How does Claude Code combine multiple managed settings sources, and which keys are read from every admin source? https://latestn.com/tool/claude-code/admin-and-enterprise/configure-egress-proxy-auth How do I configure a proxy authorization for egress in Claude Code self-hosted environments? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:04:31Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/admin-and-enterprise/configure-llm-gateway/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/admin-and-enterprise/configure-llm-gateway POST: https://latestn.com/dispute/tool/claude-code/admin-and-enterprise/configure-llm-gateway with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/admin-and-enterprise/configure-llm-gateway?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I configure Claude Code to use my organization's LLM gateway? Revision 1, last verified 2026-11-20T12:21:42Z. https://latestn.com/tool/claude-code/admin-and-enterprise/configure-llm-gateway (accessed 2026-11-21T10:03:21Z). @misc{LatestN_tool_claude_code_admin_and_enterprise_configure_llm_gateway_r1, title = {How do I configure Claude Code to use my organization's LLM gateway?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/admin-and-enterprise/configure-llm-gateway}}, note = {Revision 1; digest sha256:3d11dd319bc5f3a9; last verified 2026-11-20T12:21:42Z; accessed 2026-11-21T10:03:21Z} } 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/admin-and-enterprise/configure-llm-gateway