Use Claude Pro/Max in Pi with browser OAuth.
- Claude Pro/Max login from
/login anthropic - Automatic token refresh
- Claude Code-compatible OAuth headers and prompt shaping
- No API key or extra usage needed.
- Uses Pi's Anthropic model registry
- Adds Claude Opus 4.7 by default
- Auto-creates
~/.Claude Code→~/.pisymlink when missing
pi install npm:pi-anthropic-oauthStart Pi, then run:
/login anthropic
Choose:
Claude Pro/Max
Warning
Use at your own risk. This may go against Anthropic's terms.
Note
Anthropic auth changes are closely monitored for quick compatibility updates.
To add another Anthropic model, create ~/.pi/agent/models.json:
{
"providers": {
"anthropic": {
"baseUrl": "https://api.anthropic.com",
"apiKey": "REQUIRED_BY_PI_FOR_CUSTOM_MODELS",
"api": "anthropic-messages",
"models": [
{
"id": "your-model-id",
"name": "Your Model Name"
}
]
}
}
}Note
Pi requires baseUrl, apiKey, and api when defining custom models in models.json. With this extension, requests normally authenticate through Claude Pro/Max OAuth after /login anthropic, so apiKey is present to satisfy Pi's config requirements and does not need to be a valid Anthropic API key.
- Re-run
/login anthropicif auth looks stale - If local callback login does not complete, paste the final callback URL or
code#statewhen prompted - If something breaks, please open an issue with your Pi version, extension version, and error output
MIT