Bring your own key to Pi
Pi has no bundled plan, no free tier, and no subscription of its own to sell you. Every session runs against a model you pay for directly - bring-your-own-key, in the fullest sense. That’s a deliberate consequence of the same minimalism from the last lesson: Pi doesn’t want to be in the business of managing your billing relationship with a model provider, any more than it wants to carry a system prompt reportedly running to many thousands of tokens you didn’t ask for.
The two ways in
Section titled “The two ways in”Inside the running prompt, /login walks you through the options:
> /loginYou’ve got two shapes of authentication, and they’re not interchangeable:
- An API key, exported as an environment variable before you launch Pi -
ANTHROPIC_API_KEY,OPENAI_API_KEY, and so on, depending on the provider. You pay that provider per token, directly, at their published rate. - OAuth into a subscription you already have -
/loginsupports signing in against a handful of subscription-based providers this way, including OpenAI’s ChatGPT plans and GitHub Copilot.
For stash, either path gets you to a working session. What matters is which provider you pick, and how.
What this means for today
Section titled “What this means for today”None of this blocks you from working on stash right now. If you’re reaching for Claude, use an API key. If you’d rather not manage a provider key of your own for this course, OAuth into a ChatGPT or GitHub Copilot subscription works cleanly and stays inside each provider’s own terms. Pi also happily points at a local model through Ollama with no billing at all - you’ll get to that trade-off properly in a later module, once you understand what you’re giving up in exchange for free.
One more thing worth knowing before you pick, purely so nothing surprises you later: routing many providers through an aggregator like OpenRouter is a popular way to get one key that reaches a wide catalog of models - convenient, but billed at full per-token API rates with no flat subscription cushion underneath it. Fine for this lesson’s fix; worth watching if you start running bigger jobs through it.
Pick whichever path gets a model responding, and confirm it landed:
> what model am I talking to right now?You’re authenticated, and Pi has a model to call. Before you hand it the actual bug, spend two minutes watching how a single request through Pi actually behaves - because the shape of that loop is the one piece of trust you need before the real fix. Next: understand one turn of the loop.