Claude Code
Fixture onlyChecked 16 November 2026
In short
- The exact settings for this tool.
- Set the base URL and a Petrova key.
- Caps and receipts work with no extra setup.
Base URL without /v1. Claude Code sends the key as x-api-key.
# later: https://api.petrova.sh
export ANTHROPIC_BASE_URL=http://127.0.0.1:4100
export ANTHROPIC_API_KEY=ptrv_test_...
claude
Or keep it in ~/.claude/settings.json so every session uses it:
{
"env": {
"ANTHROPIC_BASE_URL": "http://127.0.0.1:4100",
"ANTHROPIC_API_KEY": "ptrv_test_..."
}
}
Petrova reads Claude Code's session and agent headers, so per-agent caps and receipts work with no extra setup. Each response carries an x-petrova-receipt header.
Last checked against the code: 16 November 2026. Something wrong? The source of this page is in the repository, so a fix is one edit.