Connect Claude Code to PromptUnit
Claude Code reads its address from its settings file. You add your personal PromptUnit address there, next to your own Anthropic API key.
Works with an Anthropic API key. A Claude subscription login (Pro or Max) is not supported and is refused.
Get your personal address
Sign up free at PromptUnit. There is no card to enter, and we never ask for your AI key. You answer two questions (which AI your app uses and where it runs) and your personal address appears, ready to copy. Later you find it on your dashboard under Connection.
For an app that uses Anthropic, the address looks like this:
https://www.promptunit.ai/api/proxy/anthropic/<your PromptUnit key>Treat it like a password: it is yours alone. Your Anthropic key stays in your app, exactly as it is today. PromptUnit uses it for each request and never stores it.
Paste it in Claude Code
- Open the file ~/.claude/settings.json (in VS Code: the setting "claudeCode.environmentVariables").
- Add the block below inside "env". ANTHROPIC_API_KEY is your own Anthropic API key.
- Start Claude Code again and run /status to see the address it uses.
~/.claude/settings.json
{
"env": {
"ANTHROPIC_BASE_URL": "https://www.promptunit.ai/api/proxy/anthropic/<your PromptUnit key>",
"ANTHROPIC_API_KEY": "your Anthropic API key"
}
}Use your app as usual
Each request shows on your PromptUnit dashboard within seconds, with the model that answered and what it cost. PromptUnit checks every request and uses a cheaper model only when it would answer just as well. Otherwise the request goes to the model you asked for.
If nothing shows on your dashboard
- The change has not taken effect yet: restart or redeploy the app, then send a request.
- The app sets the address in its own code, so the setting is never read. Change it there.
- The app uses a different AI company than the address you copied. Each AI company has its own address.
An error that names your key comes from Anthropic itself: PromptUnit passes its answer on unchanged. Still stuck? Write to igal@promptunit.ai.
Click path checked on November 12, 2026, in a real run against PromptUnit. Source