1. Install pi

Shell
curl -fsSL https://pi.dev/install.sh | sh

2. Create ~/.pi/agent/models.json

JSON
{
  "providers": {
    "ghc-api": {
      "baseUrl": "http://127.0.0.1:8313/v1",
      "api": "openai-responses",
      "apiKey": "1",
      "models": [{
        "id": "YOUR_RESPONSES_MODEL_ID",
        "reasoning": true,
        "input": ["text", "image"],
        "contextWindow": 128000,
        "maxTokens": 16384,
        "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}
      }]
    }
  }
}

3. Fill fields from live metadata

  • Use openai-responses, openai-completions, or anthropic-messages according to the advertised endpoint.
  • Include image only for a vision-capable model.
  • contextWindow is total context; maxTokens is maximum output.
  • Cost values are display estimates; use zeros if you do not have reliable pricing metadata.

4. Map thinking levels

JSON fragment
"thinkingLevelMap": {
  "off": "none",
  "minimal": null,
  "low": "low",
  "medium": "medium",
  "high": "high",
  "xhigh": "xhigh",
  "max": null
}

A string is sent to the provider; null marks an unsupported level. The file reloads whenever you open pi's /model.

pi custom models ↗

Next step

Inspect the models and endpoints available to your account before copying a model ID into client configuration.

Inspect models and parameters →