Configure with environment variables
If the tool expects Bearer auth, use
ANTHROPIC_AUTH_TOKEN instead of ANTHROPIC_API_KEY. Do not set both to different values.
Persist in settings
You can write the same values to~/.claude/settings.json:
mdlx-xxxxxxxx with a key from the Modellix console.
Session headers
Claude Code may send its own session header (for exampleX-Claude-Code-Session-Id). Modellix also accepts X-Mdlx-Session-Id; if both are present, X-Mdlx-Session-Id wins. See Session header.
Related
- Anthropic SDK — Messages examples in Python / TypeScript
- Create message — OpenAPI reference
- LLM API guide — auth, errors, and rate limits