← Pricing & setup guides

Pi coding agent subscriptions: connect your own monthly API budget

Pi's custom model file lets you bring a provider endpoint and API credential. A chat subscription and an API subscription are different products; check what access your plan actually includes.

The buying decision

Use Pi's supported authentication for native subscriptions. For a separate compatible API account, configure models.json and verify the provider's model appears before starting a task.

API credentials are not chat login credentials

Buying a chat subscription does not automatically supply a transferable API key. Pi supports particular provider authentication flows and custom API providers; use the flow documented for your chosen provider. Do not paste a browser session token into a generic API field. If you prefer a separate monthly API budget, compare the allowance and supported model protocol rather than the word subscription alone.

Where a custom provider goes

Pi documents custom providers in ~/.pi/agent/models.json. The provider entry includes baseUrl and an API protocol, with a models array naming the model IDs. Standard Compute's Chat Completions base is https://api.stdcmpt.com/v1 and its router model ID is standardcompute. Pi names this protocol openai-completions. Merge the entry into your existing file and configure authentication locally.

Avoid the invisible-model trap

The current Pi docs explain that a model configuration can load before authentication is available, while model selection still needs a usable credential. If your provider does not appear in /model, check the config location, provider ID and credential resolution before assuming the gateway is down. Consult the value-resolution rules for environment-variable references and avoid storing real secrets in shared examples.

Measure the whole parent task

Extensions can add tool calls or child sessions. For a cost comparison, count the parent task and all child requests, compaction, retries and failures. Keep the Pi version and extension set fixed. Pi and oh-my-pi are separate projects; a Pi recipe should not be assumed to configure every fork unchanged. Test the client you actually intend to use.

Run your own comparison

Use the same task, starting revision and acceptance check. Record every retry and failed attempt so the result reflects the work you actually paid for.

Sources and setup references