Skip to content

pi with Keln

Use Keln models in pi, a terminal coding agent, by installing the Keln package. The package reads Keln's live model list, so every Keln chat model appears in /model.

What you need to start

  • pi installed.
  • A Keln API key. Sign up at app.keln.ai, then open Keys → Create key.

Connect pi to Keln

1. Install the Keln package

pi install npm:pi-keln-provider

2. Set your Keln key

Set the KELN_API_KEY environment variable:

export KELN_API_KEY=sk-keln-…
$env:KELN_API_KEY = "sk-keln-…"

Add the line to your shell profile to keep it for new terminal windows.

Or run /login in pi, choose Keln and paste your key.

3. Pick a Keln model

Start pi in your project and open the model list:

/model

Choose a Keln model, for example keln/zai-org/glm-5.3. Press Ctrl+S on a model to save it as the default for new sessions. Run /thinking to pick a thinking level. pi offers the levels each model supports.

Before your first message, add credit under Billing → Add credit. Keln returns a 402 error if your balance is empty.

Models

pi lists all Keln chat models. See Models & pricing for the full list and pricing.

Usage

Your Keln Usage page shows your spend, tokens, latency and error rate. Keln stores metadata only (ZDR).

The Keln Usage page with sample data: spend, requests, tokens, time to first token, error rate and a spend-by-day chart

Switch back

Open /model and pick a model from another provider. To remove Keln, run:

pi remove npm:pi-keln-provider

Where to go next

Try Keln

Create a Keln account and API key to run open models in pi.

Get an API key Models & pricing ↗