# Pi

Source: https://browsercode.io/docs/agents/pi

Index of every BrowserCode page: https://browsercode.io/llms.txt

Install Pi and sign in to a provider with /login.

Pi is installed from the npm registry the first time you open it, so the first launch takes longer than later ones.

## Signing in

Pi signs in with its `/login` command and supports Anthropic, OpenAI, Gemini and OpenRouter. You can also use an API key for any of them.

To sign in with an Anthropic account, select **Copy code login (headless)**, not **Browser login (default)**. Browser login redirects to a localhost address on the machine running Pi, which is the MicroVM in your tab, so your browser cannot complete it. BrowserCode shows a tip about this when Pi starts.

## Other providers

Only these four providers are reachable from the sandbox. If `/login` or a model request to another provider fails to resolve, the provider's host is not on the allowlist, and your key is not the cause. Use one of the four supported providers.

## Updates

BrowserCode pins Pi to a specific version. `pi update` cannot replace a copy it did not install, so Pi's update check is turned off.

- [Next Linking to BrowserCode](https://browsercode.io/docs/linking)
