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 gives pi a temporary agent folder for the run. It links in your own ~/.pi/agent entries (settings, extensions, sessions) and adds an inferam provider to a merged copy of your models.json. Your files aren’t modified. Sessions are saved to your own ~/.pi/agent/sessions, so they’re still there after the temporary folder is deleted. 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": "!printenv INFERAM_API_KEY", "models": [ { "id": "DeepSeek-V4.1-Flash-1017", "name": "DeepSeek-V4.1-Flash-1017", "reasoning": true, "contextWindow": 524288, "maxTokens": 32768 } ] } }}Then:
export INFERAM_API_KEY=ifr_...pi --model inferam/DeepSeek-V4.1-Flash-1017"!printenv INFERAM_API_KEY" tells pi to run a command for the key, so the key itself never goes in the file.