CLAUDE_BASE

Updated by

CLAUDE_BASE is a Claude Code environment variable: Likely overrides the base URL or base configuration path for Claude Code. This is a compact alternative to the more specific CLAUDE_CODE_API_BASE_URL — potentially used internally or as a shorthand for environments where a single base path controls both API routing and local configuration resolution. Added in v2.1.92 and still present in v2.1.294. It is not in the official reference.

StatusPresent in v2.1.294
AddedAdded in v2.1.92
CategoryOther
Official docsNot listed

How to set it

For one session, export it in the shell that starts Claude Code:

export CLAUDE_BASE=<value>
claude

To apply it to every session, add it to the env object of a settings file:

// ~/.claude/settings.json
{
  "env": {
    "CLAUDE_BASE": "<value>"
  }
}

Release notes that mention it

Related variables

Frequently asked questions

What does CLAUDE_BASE do?

Likely overrides the base URL or base configuration path for Claude Code. This is a compact alternative to the more specific CLAUDE_CODE_API_BASE_URL — potentially used internally or as a shorthand for environments where a single base path controls both API routing and local configuration resolution.

Which Claude Code version has CLAUDE_BASE?

Added in v2.1.92 and still present in v2.1.294.

How do I set CLAUDE_BASE?

Export it before starting Claude Code (export CLAUDE_BASE=value), or add it to the "env" object in ~/.claude/settings.json to apply it to every session.

All variables, searchable: Claude Code environment variables.