Use NeverMetered with Pi

The minimal, extensible terminal coding agent from pi.dev, with a custom OpenAI-compatible provider.

OpenAI Chat
Model
qwen3.8-27b
128K context on the free plan65,536 max output tokens on the free planReplace YOUR_API_KEY with your key.
  1. 1

    Create an API key

    Create a key in API keys and name it after the tool, for example “Pi”. A dedicated key per tool lets you see its usage separately and give it its own parallel-stream cap. The key is shown once; the snippets below use YOUR_API_KEY where it goes.

  2. 2

    Install Pi

    Already have Pi? Skip this step. Open a terminal first: on macOS press ⌘ Space, type Terminal and press Return; on Windows open the Start menu, type PowerShell and press Enter.

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

    Add the provider

    Save this as models.json in Pi's config folder (create the file if it doesn't exist, or add the provider to the one you have). Pi reloads it every time you open /model.

    ~/.pi/agent/models.json
    {
      "providers": {
        "nevermetered": {
          "baseUrl": "https://api.nevermetered.com/v1",
          "api": "openai-completions",
          "apiKey": "$NEVERMETERED_API_KEY",
          "models": [
            {
              "id": "qwen3.8-27b",
              "contextWindow": 131072,
              "maxTokens": 65536,
              "reasoning": true,
              "thinkingLevelMap": {
                "off": "none",
                "minimal": "low",
                "low": "low",
                "medium": "medium",
                "high": "high",
                "xhigh": "xhigh"
              }
            }
          ]
        }
      }
    }
  4. 4

    Export your key and start Pi

    The $NEVERMETERED_API_KEY in the config tells Pi to read the key from that environment variable.

    export NEVERMETERED_API_KEY="YOUR_API_KEY"
    pi --provider nevermetered --model qwen3.8-27b
  5. 5

    Keep it for new terminals (optional)

    The command above only lasts for the current terminal. Save it once so every new terminal has it.

    # zsh (the macOS default)
    echo 'export NEVERMETERED_API_KEY="YOUR_API_KEY"' >> ~/.zshrc
    # bash
    echo 'export NEVERMETERED_API_KEY="YOUR_API_KEY"' >> ~/.bashrc
  6. 6

    Verify it works

    Run a single prompt and exit. The request shows up in Requests within a few seconds, with its input, cached and output tokens.

    pi --provider nevermetered --model qwen3.8-27b -p "Reply with the word ready"
Tips
  • contextWindow and maxTokens tell Pi the model's real limits; without them it assumes 128,000 and 16,384 and can compact too late or ask for more output than your plan allows.
  • Inside Pi, open /model (or press Ctrl+L), highlight the model and press Ctrl+S to make it the startup default.
  • Thinking counts against the output limit. Pi's thinking level (Shift+Tab) controls how much the model thinks: lower it for quick edits and keep high or above for hard problems.

Troubleshooting

The model doesn't appear in /model
Pi hides models it has no credentials for. Check that NEVERMETERED_API_KEY is exported in the terminal you started pi from, and that the config value is $NEVERMETERED_API_KEY with the leading $. Reading the key from a variable this way needs Pi 0.77 (May 2026) or later, so update Pi if you're on an older version.
Pi stops partway through a task or replies with nothing
The model probably spent its whole output allowance thinking, leaving nothing for the answer. Lower Pi's thinking level (Shift+Tab) and resend, and check that maxTokens in the config isn't below your plan's output cap. Don't add a thinkingTokenBudgetField: this API rejects token-budget fields with a 400 error.
404 model_not_found
Use a model id exactly as GET /v1/models lists it, for example qwen3.8-27b. Plans can restrict which models a key may call.
400 context_length_exceeded
The conversation outgrew the 128K context window (input + output). Let the tool compact or start a fresh session, or get a larger window on your plan.
429 concurrency_limit_exceeded
All your parallel streams are busy and your queue allowance is full. Lower the tool's parallelism (subagents, batch size), or get more streams on your plan.
Answers stop mid-sentence
The response hit your plan's output cap of 65,536 tokens (finish reason length or max_tokens). Ask for shorter steps, or upgrade for a higher cap.
403 email_verification_required
Free requests need a verified email. Click the link in your verification email (you can resend it from the dashboard), or upgrade.
429 daily_quota_exceeded
You've used today's free requests; agents send one request per step, so they go quickly. The allowance resets at 00:00 UTC, and paid plans have no daily limit.
503 / 504 request_queue_timeout
The service stayed busy longer than the queue timeout and nothing was generated. Retry with backoff, and give the tool a generous request timeout.
503 service_unavailable
No GPU capacity is online at the moment. It's temporary and your setup is fine: retry in a little while, and check the status page.