Create a personal key in MeshPool chat first — see Get a key on the docs hub. Usage shares the company seat budget.
Claude Code
Claude Code talks to the Anthropic Messages API. Point it at the base URL without /v1, and use ANTHROPIC_AUTH_TOKEN — not ANTHROPIC_API_KEY, which triggers a different auth path.
- Create a personal key in chat (see Get a key) and copy the
sk-…secret. - Export the environment variables below in the shell where you run
claude. To make them permanent, add the same lines to~/.zshrcor~/.bashrc. To scope them to one project, put them in a.envrcand use direnv. - Set
ANTHROPIC_MODELto a MeshPool alias. Start withmeshpool-maxfor hard reasoning, or a named alias your workspace has enabled. - Point the small, fast background model at
meshpool-fastso summarising and similar work does not burn the expensive tier. - Optionally set
CLAUDE_CODE_MAX_CONTEXT_TOKENS. Claude Code does not recognise MeshPool alias names, so it prints anunrecognized_modelnotice and assumes a 200k-token window. Everything still works; this variable stops auto-compact from triggering earlier than it needs to when the underlying model is larger.
export ANTHROPIC_BASE_URL="https://llm.stg.meshpool.ai"
export ANTHROPIC_AUTH_TOKEN="sk-…"
export ANTHROPIC_MODEL="meshpool-max"
export ANTHROPIC_SMALL_FAST_MODEL="meshpool-fast"
export CLAUDE_CODE_MAX_CONTEXT_TOKENS=1000000
claudeVerify the connection:
claude -p "reply with exactly: connected"If that hangs or errors, run the curl check first. It isolates whether the problem is the key or the Claude Code config.
Related docs
Connection details, troubleshooting, image models, and the other editors stay on the docs hub.
