Skip to main content
All clients

Pi

Terminal agent that speaks the Anthropic Messages format.

Base URL
https://api.bf16.ai
Protocol
anthropic-messages

Who this is for
Pi users who want a 1M-context model behind it.

Commands show $BF16_API_KEY. Sign in to fill in your own key automatically.

  1. 1

    Export your key

    Pi reads BF16_API_KEY from your shell environment.

    export BF16_API_KEY=sk-bf16-v1-...
  2. 2

    Add the provider

    ~/.pi/agent/models.json
    {
      "providers": {
        "bf16": {
          "name": "bf16.ai",
          "baseUrl": "https://api.bf16.ai",
          "api": "anthropic-messages",
          "apiKey": "!printenv BF16_API_KEY",
          "models": [
            { "id": "zai-org/glm-5.3-uncensored", "name": "Uncensored GLM-5.3", "reasoning": true, "contextWindow": 1048576 }
          ]
        }
      }
    }
  3. 3

    Run it

    pi --model bf16/zai-org/glm-5.3-uncensored

How to know it worked

  • Pi lists the bf16 provider on startup.
  • The request appears in your console logs.
  • curl https://api.bf16.ai/v1/models -H "Authorization: Bearer $BF16_API_KEY"

Common errors

Symptom
404 on every call.
Cause
The baseUrl includes /v1; the Anthropic format does not take it.
Fix
Use https://api.bf16.ai.

Do not have it yet?

npm install -g @earendil-works/pi-coding-agent