Skip to main content
Point Claude Code at the Modellix LLM gateway using the Anthropic-compatible Messages API. Auth and base URL match the Anthropic SDK pattern.

Set Up Claude Code

1

Get a Modellix API Key

Create a key in the Modellix console. Claude Code maps ANTHROPIC_API_KEY to the Anthropic-style x-api-key header.
2

Set Environment Variables

Do not append /v1 to ANTHROPIC_BASE_URL. Claude Code / the Anthropic SDK append /v1/messages themselves.
If the tool expects Bearer auth, use ANTHROPIC_AUTH_TOKEN instead of ANTHROPIC_API_KEY. Do not set both to different values.
3

Persist in Settings

Write the same values to ~/.claude/settings.json:
Replace mdlx-xxxxxxxx with your Modellix API key.

Session Headers

Claude Code may send its own session header (for example X-Claude-Code-Session-Id). Modellix also accepts X-Mdlx-Session-Id; if both are present, X-Mdlx-Session-Id wins. See Session header.