Pi
The Pi coding agent (npm @earendil-works/pi-coding-agent) reads custom providers from its models.json. Ours uses Pi's openai-completions API against https://api.abliteratedllm.dev/v1.
Placeholders:
$API_BASEishttps://api.abliteratedllm.dev/v1,$API_ORIGINishttps://api.abliteratedllm.dev, and$YOUR_KEYis your API key.
Signed in? The API keys page has this file ready-made for every model we currently serve, with live prices, a highlighted provider block and a download button.
1. Add the provider to models.json
The file is ~/.pi/agent/models.json on macOS and Linux, and %USERPROFILE%\.pi\agent\models.json on Windows. If you set PI_CODING_AGENT_DIR, it's models.json in that directory.
{
"$schema": "https://pi.dev/schemas/models.schema.json",
"providers": {
"abliteratedllm": {
"name": "AbliteratedLLM",
"baseUrl": "$API_BASE",
"api": "openai-completions",
"apiKey": "$ABLITERATEDLLM_API_KEY",
"compat": {
"supportsDeveloperRole": false,
"supportsStore": false,
"supportsReasoningEffort": true,
"maxTokensField": "max_tokens",
"thinkingFormat": "openai"
},
"models": [
{
"id": "glm-5.3-flash-abliterated",
"name": "GLM-5.3 Flash Abliterated",
"reasoning": true,
"thinkingLevelMap": {
"minimal": null
},
"input": [
"text"
],
"contextWindow": 262144,
"maxTokens": 65536,
"cost": {
"input": 0.0977,
"output": 0.3421,
"cacheRead": 0.0098,
"cacheWrite": 0
}
}
]
}
}
}
- New file: save it as shown. Existing file: copy only the
"abliteratedllm"entry into your"providers"object, with a comma between it and the provider before it, and keep your other providers. api: "openai-completions"makes Pi call/v1/chat/completions.baseUrlincludes/v1.compatasks for the plain chat-completions forms: the system prompt as asystemmessage, nostorefield, the budget inmax_tokens, and reasoning set withreasoning_effort.modelsneeds one entry per id from GET /v1/models, andidmust match exactly; the file on the dashboard already lists them all.contextWindowandmaxTokensare the model'scontext_lengthandmax_output_tokens. On a trial account, output is capped at 4096 tokens regardless.thinkingLevelMaphides Pi'sminimalthinking level, which has no matchingreasoning_effortvalue.low,mediumandhighare sent as they are.costis in USD per 1M tokens (input, output and cached input), so Pi's cost display matches what we bill. We don't charge for cache writes.- Pi rereads the file each time you open
/model, so edits need no restart.
2. Connect your key
"apiKey": "$ABLITERATEDLLM_API_KEY" makes Pi read your key from that environment variable, so the key never goes in the file.
Bash or Zsh (add the line to ~/.zshrc or ~/.bashrc to keep it):
export ABLITERATEDLLM_API_KEY="$YOUR_KEY"
Windows (applies to terminals you open afterwards):
setx ABLITERATEDLLM_API_KEY "$YOUR_KEY"
For a single run, add --api-key "$YOUR_KEY" to the pi --model … command in step 3; it overrides the file. Our models appear in /model only once a key resolves.
3. Pick the model and say hi
pi --model abliteratedllm/glm-5.3-flash-abliterated
pi --provider abliteratedllm --model glm-5.3-flash-abliterated does the same. Inside Pi, /model switches models and Ctrl+S there saves your pick as the default. pi --list-models lists every model Pi can use.
Good to know
- Text only. Image input fails with 400
unsupported_content. - Trial accounts allow 1 concurrent request, which is tight for agent work. See Rate limits and trial.
Verified against Pi's docs on 2026-11-03: Custom models, CLI and the models.json schema.