Skip to content
inert
Sign up
Contents

Claude Code

Claude Code is a native Anthropic client, so it talks to Inert directly with no adapter or provider config in between. Set two environment variables. The key comes from the Inert dashboard: create an account, generate one, and fund the balance before the first run.

Base URL

bash
ANTHROPIC_BASE_URL=https://api.inert.lol
Note
Use the bare host. Don't append /v1; Claude Code appends /v1/messages itself.

Credentials

Either works:

  • ANTHROPIC_AUTH_TOKEN=<inert key> sends the key as Authorization: Bearer. Recommended: it takes precedence over an existing claude.ai login immediately.
  • ANTHROPIC_API_KEY=<inert key> sends it as x-api-key. If a claude.ai login already exists, this needs one-time approval via /config.

Persisting

Set both non-destructively per project in .claude/settings.local.json (gitignored):

.claude/settings.local.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.inert.lol",
    "ANTHROPIC_AUTH_TOKEN": "<inert key>"
  }
}

Shell export

Or a plain export, or ~/.claude/settings.json for all projects:

bash
export ANTHROPIC_BASE_URL=https://api.inert.lol
export ANTHROPIC_AUTH_TOKEN=<inert key>

VS Code extension

Warning
The VS Code Claude Code extension does not read .claude/settings.local.json. Set the same two vars in claudeCode.environmentVariables in VS Code settings.

Verify

Run /status inside Claude Code to see which credential source is active.

Next steps