pi
pi talks to Inferam over OpenAI Chat Completions.
With the CLI
Section titled “With the CLI”inferam piArguments pass through: inferam pi -p "summarise the diff", inferam pi --continue, inferam pi --session <id>.
The CLI adds an inferam provider for the run through a temporary pi extension (pi -e), deleted when pi exits. Your ~/.pi/agent settings, extensions and sessions are used as they are, and none of your files are modified. If you don’t pass --model or --provider, the CLI selects inferam/DeepSeek-V4.1-Flash-1017.
By hand
Section titled “By hand”Add a provider to ~/.pi/agent/models.json:
{ "providers": { "inferam": { "baseUrl": "https://api.inferam.ai/v1", "api": "openai-completions", "apiKey": "$INFERAM_API_KEY", "models": [ { "id": "DeepSeek-V4.1-Flash-1017", "name": "DeepSeek-V4.1-Flash-1017", "reasoning": true, "contextWindow": 262144, "maxTokens": 32768 } ] } }}Then:
export INFERAM_API_KEY=ifr_...pi --model inferam/DeepSeek-V4.1-Flash-1017"$INFERAM_API_KEY" tells pi to read the key from that environment variable, so the key itself never goes in the file. (On Windows, set it with $env:INFERAM_API_KEY = "ifr_..." in PowerShell.)