Lumoswitch Docs
Client setup

Claude Code setup

Claude Code can connect to Lumoswitch through its LLM gateway environment variables. The API configuration must enable Anthropic output, and the target model must genuinely support the Anthropic Messages streaming and Tool Use behavior that Claude Code needs.

Start directly

export ANTHROPIC_BASE_URL="https://api.lumoswitch.com" \
  ANTHROPIC_AUTH_TOKEN="your-lumoswitch-access-key" \
  ANTHROPIC_MODEL="your-client-facing-model-name" \
  ANTHROPIC_DEFAULT_OPUS_MODEL="your-client-facing-model-name" \
  ANTHROPIC_DEFAULT_SONNET_MODEL="your-client-facing-model-name" \
  ANTHROPIC_DEFAULT_HAIKU_MODEL="your-client-facing-model-name" \
  CLAUDE_CODE_SUBAGENT_MODEL="your-client-facing-model-name" \
  ANTHROPIC_CUSTOM_MODEL_OPTION="your-client-facing-model-name" && \
claude --model "your-client-facing-model-name"

Use ANTHROPIC_AUTH_TOKEN, not ANTHROPIC_API_KEY. The bearer token takes precedence for gateway authentication and bypasses Claude sign-in. The other model variables pin the main session, background work, and subagents to the same client-facing model name so they do not fall back to Claude model IDs that the gateway does not expose.

The command only affects the current shell and launch; it does not write Claude Code settings. Use the site root as the base URL without /v1 or /messages.

Protocol translation cannot supply tool capabilities that the model itself lacks. Verify streaming, file editing, and subagents before offering this setup to users.

References: Claude Code LLM gateway, model configuration, and environment variables.

On this page