Pi
Use Cortecs models with the Pi coding agent
Pi is a terminal-based coding agent that supports custom OpenAI-compatible providers. Cortecs can be added directly through Pi's model configuration.
1. Install Pi
Install Pi with Node.js and npm:
npm install -g --ignore-scripts @earendil-works/pi-coding-agent2. Add Cortecs
Create or update ~/.pi/agent/models.json:
{
"providers": {
"cortecs": {
"baseUrl": "https://api.cortecs.ai/v1",
"api": "openai-responses",
"apiKey": "$CORTECS_API_KEY",
"models": [
{ "id": "<MODEL_ID>" }
]
}
}
}Replace <MODEL_ID> with the exact ID from the model catalog. Add more entries to models if you want to use several models.
3. Start Pi
Set your API key and launch Pi:
Run /model inside Pi and select the model listed under cortecs.
For additional model options, see Pi's custom model documentation.
Last updated