Search the documentation
35 pages for anthropic_base_url.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
On a remote host without a browser:
Claude Developer Platform · in the page
cli-sdks-libraries/cli/authentication
…invocation, pass `--api-key`. To point at a different API host, set `ANTHROPIC_BASE_URL` or pass `--base-url`. If you are using an API key scoped to multiple workspaces, such as a [personal or servi…
csharp
Claude Developer Platform · in the page
cli-sdks-libraries/sdks/csharp
…// Configured using the ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL environment variables AnthropicClient client = new(); ``` Or manually: ```csharp using Anthropic; AnthropicC…
java
Claude Developer Platform · in the page
cli-sdks-libraries/sdks/java
…configures using the `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN` and `ANTHROPIC_BASE_URL` environment variables AnthropicClient client = AnthropicOkHttpClient.fromEnv(); MessageCreateParams params =…
For Amazon Bedrock support
Claude Developer Platform · in the page
cli-sdks-libraries/sdks/python
…Anthropic, DefaultHttpxClient client = Anthropic( # Or use the `ANTHROPIC_BASE_URL` env var base_url="http://my.test.server.example.com:8083", http_client=DefaultHttpxClient( pro…
cmek
Claude Developer Platform · in the page
manage-claude/cmek
…When Claude Code connects through an LLM gateway or proxy (a custom `ANTHROPIC_BASE_URL`), CMEK does not apply to Claude Code's operational telemetry. To turn this telemetry off, set the `DISABLE_TEL…
spawn.sh: called once per claimed work item
Claude Developer Platform · in the page
managed-agents/self-hosted-sandboxes
…ding the work item's per-session `secret` when Anthropic issued one. `ANTHROPIC_BASE_URL` is optional and is passed through only if it was set on the poller host; it overrides the default API endpoint…
Escalate hard decisions with the advisor tool
Claude Code CLI · in the page
advisor
…ndry. Through an [LLM gateway](/docs/en/llm-gateway) configured with `ANTHROPIC_BASE_URL`, availability depends on whether the gateway forwards the request intact to the Anthropic API. * **Supported m…
Hosting the Agent SDK
Claude Code CLI · in the page
agent-sdk/hosting
…EY` from its environment. Supply it from your secret manager, or set `ANTHROPIC_BASE_URL` to route model calls through a proxy that injects the key outside the container. See [Credential management](/…
Securely deploying AI agents
Claude Code CLI · in the page
agent-sdk/secure-deployment
…le but only for sampling API requests)** ```bash theme={null} export ANTHROPIC_BASE_URL="http://localhost:8080" ``` This tells Claude Code and the Agent SDK to send sampling requests to your proxy i…
Scale to many tools with tool search
Claude Code CLI · in the page
agent-sdk/tool-search
…ou set `ENABLE_TOOL_SEARCH`. The SDK also disables tool search when `ANTHROPIC_BASE_URL` points to a non-first-party host, since most proxies don't forward `tool_reference` blocks. You can override t…
Manage multiple agents with agent view
Claude Code CLI · in the page
agent-view
…erride in that shell, it reaches the session the same way. A gateway `ANTHROPIC_BASE_URL` exported in that shell can reach the session too; see [the supervisor process](#the-supervisor-process) for th…
Authentication
Claude Code CLI · in the page
authentication
…`/logout`. To route requests through a custom API endpoint, set the [`ANTHROPIC_BASE_URL`](/docs/en/env-vars) environment variable instead. * **Supported authentication types**: Claude.ai credentials,…
Claude Code changelog
Claude Code CLI · in the page
changelog
…hy they weren't fetched (Bedrock/Vertex/third-party provider, custom `ANTHROPIC_BASE_URL`) * Added a warning in `/web-setup` when the GitHub CLI token lacks the `workflow` scope, since pushes to ver…
Claude apps gateway deployment and operations
Claude Code CLI · in the page
claude-apps-gateway-deploy
…r credentials, to `/api/hello` on `https://api.anthropic.com`, or on `ANTHROPIC_BASE_URL` when the environment set it, unless the environment also set a proxy variable such as `HTTPS_PROXY` or an mTLS…
Use Claude Code on the web
Claude Code CLI · in the page
claude-code-on-the-web
…ider. An [LLM gateway](/docs/en/llm-gateway) configured only through `ANTHROPIC_BASE_URL` doesn't count as a third-party provider for this check, but you still need to sign in with `claude auth login`…
Environment variables
Claude Code CLI · in the page
env-vars
…| | `ANTHROPIC_BASE_URL` | Override the API endpoint to route requests through a proxy or gateway. W…
Error reference
Claude Code CLI · in the page
errors
…Foundry configurations name that provider's service status. A custom `ANTHROPIC_BASE_URL` names the gateway host. This indicates an unexpected failure inside the API. It is not caused by your prompt,…
Speed up responses with fast mode
Claude Code CLI · in the page
fast-mode
…a request directly to `api.anthropic.com`. The check doesn't follow [`ANTHROPIC_BASE_URL`](/docs/en/llm-gateway-connect#set-the-base-url-and-credential), so on a network that routes Claude traffic thr…
Feature availability
Claude Code CLI · in the page
feature-availability
…l search](/docs/en/mcp#configure-tool-search) is off by default when `ANTHROPIC_BASE_URL` points to a non-first-party host, and isn't supported on Google Cloud's Agent Platform models earlier than the…
Run Claude Code through a gateway
Claude Code CLI · in the page
gateways
…nd the gateway's provider credential. The exception is setting only `ANTHROPIC_BASE_URL`, with no gateway credential. Requests still route through the gateway, but a saved claude.ai login stays the a…
Other LLM gateways
Claude Code CLI · in the page
llm-gateway
…tform, or Microsoft Foundry account when the gateway routes there. [`ANTHROPIC_BASE_URL`](/docs/en/llm-gateway-connect#set-the-base-url-and-credential) is the variable that points Claude Code at the…
Connect Claude Code to an LLM gateway
Claude Code CLI · in the page
llm-gateway-connect
…Tabs> <Tab title="Bash or Zsh"> ```bash theme={null} export ANTHROPIC_BASE_URL=https://llm-gateway.example.com export ANTHROPIC_AUTH_TOKEN=sk-gateway-key ``` </Tab> <Tab title="…
Gateway protocol reference
Claude Code CLI · in the page
llm-gateway-protocol
…--------------------- | | Anthropic Messages | `ANTHROPIC_BASE_URL` | `/v1/messages`, `/v1/messages/count_tokens` (optional)…
Roll out an LLM gateway for your organization
Claude Code CLI · in the page
llm-gateway-rollout
…Tabs> <Tab title="Bash or Zsh"> ```bash theme={null} export ANTHROPIC_BASE_URL=https://llm-gateway.example.com export ANTHROPIC_AUTH_TOKEN="<developer-key>" ``` </Tab> <Tab titl…
Deploy managed settings
Claude Code CLI · in the page
managed-settings
…or signs in to a gateway with `/login`. On other providers, or when `ANTHROPIC_BASE_URL` points somewhere other than Anthropic's API, it starts at the next source 2. MDM or OS-level policies: the mac…
Connect Claude Code to tools via MCP
Claude Code CLI · in the page
mcp
…s` tool instead. Configurations without tool search include a custom `ANTHROPIC_BASE_URL`, `ENABLE_TOOL_SEARCH=false`, and a model earlier than the Claude 4.5 generation on Google Cloud's Agent Platfo…
Model configuration
Claude Code CLI · in the page
model-config
…claude-model-and-effort-level-in-claude-code) on the blog. <Note> `ANTHROPIC_BASE_URL` changes where requests are sent, not which model answers them. To route Claude through an LLM gateway, see [LL…
Monitoring
Claude Code CLI · in the page
monitoring-usage
…traceparent` header on model and HTTP MCP requests is sent only when `ANTHROPIC_BASE_URL` is unset or points at the Anthropic API, since some proxies reject unrecognized headers. The subprocess `TRACE…
Enterprise network configuration
Claude Code CLI · in the page
network-config
…s), and [gateway](/docs/en/gateways) connections, including a custom `ANTHROPIC_BASE_URL`. Opt-in on Amazon Bedrock `vnd.amazon.eventstream` responses with `CLAUDE_ENABLE_BYTE_WATCHDOG_BEDROCK=1`; doe…
How Claude Code uses prompt caching
Claude Code CLI · in the page
prompt-caching
…opic deployments are served on Anthropic's infrastructure * **Custom `ANTHROPIC_BASE_URL` or [LLM gateway](/docs/en/llm-gateway)**: the cache lives wherever your requests are forwarded, and whether ca…
Continue local sessions from any device with Remote Control
Claude Code CLI · in the page
remote-control
…Google Cloud's Agent Platform, or Microsoft Foundry. * You point [`ANTHROPIC_BASE_URL`](/docs/en/env-vars) at a host other than `api.anthropic.com`, such as an [LLM gateway](/docs/en/llm-gateway) o…
Customize sessions in self-hosted environments
Claude Code CLI · in the page
self-hosted-environments-configuration
…| | `ANTHROPIC_BASE_URL` | The API base URL the child will use, delivered by the control plane per session and normally…
Configure server-managed settings
Claude Code CLI · in the page
server-managed-settings
…UDE_CODE_CLIENT_KEY` * API routing and provider selection, including `ANTHROPIC_BASE_URL`, the provider selection variables such as `CLAUDE_CODE_USE_BEDROCK` and `CLAUDE_CODE_USE_VERTEX`, and the prov…
Claude Code settings reference
Claude Code CLI · in the page
settings-reference
….json theme={null} { "env": { "DISABLE_AUTO_COMPACT": "1", "ANTHROPIC_BASE_URL": "https://proxy.example.com" } } ``` #### How `env` values interact with your shell * A value here overwri…
Enterprise deployment overview
Claude Code CLI · in the page
third-party-integrations
…udgets, or centralized authentication management. Configure with the `ANTHROPIC_BASE_URL`, `ANTHROPIC_BEDROCK_BASE_URL`, `ANTHROPIC_AWS_BASE_URL`, `ANTHROPIC_VERTEX_BASE_URL`, or `ANTHROPIC_FOUNDRY_BA…