/v1/messages. Install it from the official guide, then add the settings below. Setup follows the Claude Code LLM gateway guide.
Configure
Put the variables in~/.claude/settings.json. Values in env of a settings file take precedence over the shell. A project .claude/settings.local.json works too, after you accept the trust prompt for that folder.
ANTHROPIC_AUTH_TOKEN sends the key as Authorization: Bearer. Set all four ANTHROPIC_DEFAULT_*_MODEL variables: Claude Code’s built-in aliases expand to ids such as claude-opus-5-5, while NagaAI ids use a dot. Any chat model from the catalog works in these slots, not only Claude models, as long as it supports tools.
With model discovery on, /model lists the Claude models from /v1/models.
Start claude and run /status to see the base URL and model in use.
Limits through NagaAI
- No prompt caching. NagaAI drops
cache_control, so Claude models get no cache hits and every turn costs full input price. Long sessions cost more than on a direct Anthropic account with caching. - No token counting.
count_tokensreturns404. Claude Code then estimates context size, so/contextshows approximate numbers. - Beta features. NagaAI ignores
anthropic-betaheaders, so features that depend on them are off.