Skip to content
All articles
Connections·1 min read

Connect Claude Code to ModelMesh

Set your gateway URL, credential, and selected Claude model, then verify the route.

Pick a published Claude model

Open Connections and select Claude Code. Its model selector uses the live catalog and shows models identified as Claude. Choose a model with the capabilities required by your workflow. Check its prices and your account balance before starting a longer coding task.

Configure the terminal

Use the PowerShell or macOS / Linux instructions on Connections. Set ANTHROPIC_BASE_URL to the displayed Anthropic root, ANTHROPIC_AUTH_TOKEN to your ModelMesh key, and ANTHROPIC_MODEL to the selected model ID. The root is different from the OpenAI SDK base URL: Claude Code adds /v1/messages itself.

Verify before saving the settings

Launch claude from that terminal, run /status, and check the gateway URL and credential source. Send a short prompt. A successful model response verifies the connection; merely opening the tool does not. Review the resulting request in your ModelMesh dashboard.

Keep persistent settings private

Once the first request works, merge the generated env block into your user-level Claude settings. Preserve your existing settings. Do not commit a live key in shared project configuration. If an old login or setting takes precedence, use /status and the official gateway troubleshooting guide to identify it.

Further reading

Claude Code gateway setup
Open the Claude Code setup