Pi with Nbility
This guide covers the Pi coding agent from badlogic/pi-mono, not other chat products named Pi.
Add a model file
Create or edit models.json under ~/.pi/agent/, or your customized agent directory:
{
"providers": {
"nbility": {
"baseUrl": "https://api.nbility.ai/v1",
"api": "openai-completions",
"apiKey": "$NBILITY_API_KEY",
"models": [{ "id": "YOUR_MODEL_ID" }]
}
}
}
Set export NBILITY_API_KEY="YOUR_API_KEY", substitute an exact ID from Models, and launch Pi in that terminal. $NBILITY_API_KEY is the environment-reference syntax supported by the current official configuration.
Select and test
Run /model and choose the model under nbility. Reopening the selector also reloads the model configuration. Send a short question and check Usage logs.
For reasoning, images, or larger contexts, declare the real capabilities and limits using Pi’s model schema. An ID-only entry is useful for an initial connection check; it does not establish the correctness of all default capability settings.
Check credential overrides
Stored Pi authentication can override the key in the model file. If a replaced token still produces 401 errors, inspect the saved login for that provider before changing the base URL again.
Coding tasks require tool support. Verify ordinary chat first, then tools and output limits; a model name containing “coder” does not prove API compatibility.
References
Adapted and rewritten for Nbility from aicentos’s Pi guide, licensed under CC BY 4.0. Its account, plan, and proprietary service instructions do not apply here. See the client’s official documentation.