Skip to main content
Claude Code speaks the Anthropic Messages API, and Nemu serves it, so pointing the CLI at Nemu is a matter of two environment variables. Every request is then billed, quota-checked and logged against your workspace, and can be answered by any provider you have connected, not only Anthropic.

1. Create a gateway key

In the console, open API keys and create one. It is scoped to the workspace you are in.

2. Point Claude Code at Nemu

Use ANTHROPIC_AUTH_TOKEN, not ANTHROPIC_API_KEY. The first sends Authorization: Bearer, which is what a Nemu gateway key expects. Nemu also accepts x-api-key, so ANTHROPIC_API_KEY works, but the bearer header is the one to reach for. To keep it out of your shell profile, put it in ~/.claude/settings.json instead. Values there win over shell exports.
The base URL ends in /anthropic. Claude Code appends /v1/messages itself. Setting it to a bare https://api.nemu.cc also works for inference, but the /anthropic prefix is what serves the Anthropic-shaped model list, so prefer it.

3. Choose a model

Claude Code’s /model picker can be filled from Nemu:
With that set, /model lists the models enabled in your workspace by their gateway name. Without it, name one directly:
GET /anthropic/v1/models reports the exact strings that are accepted:
If you want to keep Anthropic’s own model names in your config, create a mapping in the console from claude-sonnet-4-5 to whatever should actually serve it.

Verifying the connection

A 200 with a content array means Claude Code will work. A 404 saying Invalid URL means the base URL is missing the /anthropic segment. A 404 naming the model means it is not enabled in this key’s workspace.

What Claude Code asks Nemu for

Nemu serves all four. Fast-mode availability and WebFetch domain checks go to Anthropic directly and never touch the gateway.

Useful extras

Notes on compatibility

Nemu converts an Anthropic-shaped request into whatever the target provider speaks, so a model behind an OpenAI-compatible provider still answers Claude Code correctly: tool calls, streaming events, system blocks and cache breakpoints are all translated. Thinking is mapped to whatever the target model supports rather than being passed through blindly, so asking for extended thinking on a model without it does not fail the request.