Back to guides
Coding agents·September 18, 2026·Updated September 21, 2026·7 min read

Pi coding agent pricing: the software is free, the tokens are not

Pi charges nothing for the software. Its tokens are bought through four kinds of route, and they bill differently enough that there is no single number.

Last reviewed on .

The Pi coding agent costs nothing to install: it is MIT-licensed software with no plan and no seat price. Every dollar you spend on Pi is model tokens, and they are bought through four kinds of route. Those are Earendil's own Radius gateway, an account signed in through /login — Pi's provider docs list seven, among them Claude Pro/Max, ChatGPT Plus/Pro via Codex and OpenRouter — a direct vendor API key, or any OpenAI- or Anthropic-compatible endpoint you add to ~/.pi/agent/models.json yourself. They bill differently enough that "what does Pi cost" has no single number.

This page is about the terminal coding agent published at pi.dev by Earendil Inc. It is not Pi by Inflection AI (pi.ai), not the Pi Network coin, not Raspberry Pi, and not Oh My Pi, a separate MIT-licensed coding agent by a different author. None of their prices apply here.

Pi coding agent pricing: what each layer bills

LayerPublished priceWhere the charge lands
Pi CLI (@earendil-works/pi-coding-agent)$0, MIT-licensedNowhere. The site publishes no plan or subscription.
Radius, Earendil's own gatewayPublished per-million rates, plus "the fees we have with our payment processor" on top-upsPrepaid credit in the Radius organization you authorize
Claude Pro/Max via /loginPer token, from Anthropic extra usage rather than the plan allowanceYour Anthropic account
ChatGPT Plus/Pro via /login (Codex)Requires an existing paid ChatGPT subscription; Pi publishes no per-token figureYour OpenAI account
OpenRouter via /loginBilled from your own OpenRouter creditsYour OpenRouter account
GitHub Copilot, xAI or Meta (Muse) via /loginNot checked for this pageUnverified here — read those vendors' terms
Your own key or gateway in models.jsonWhatever that provider chargesThat provider's account

Sources checked September 18 and re-checked September 21, 2026: the Pi repository (MIT, not archived), the official site, Pi's provider documentation for the seven /login routes, and the Radius FAQ. Radius also states it is "currently a closed source service".

One naming trap is worth a sentence, because it silently affects what you install. Pi moved from badlogic/pi-mono and the @mariozechner npm scope to earendil-works/pi and @earendil-works on May 7, 2026; 0.74.0 was the first release under the new scope, 0.73.1 the last under the old name, and the old packages were deprecated but not unpublished. Third-party tutorials and answer engines still hand out the dead install line. The current one is npm install -g --ignore-scripts @earendil-works/pi-coding-agent, latest 0.86.1 published September 20, 2026 on the registry when checked on September 21, 2026.

The subscription route is where budgets break

If you already pay for Claude Pro or Max, the obvious move is to sign in with it. Pi tells you what that actually does, in its own provider docs: "Third-party harness usage draws from extra usage and is billed per token, not against Claude plan limits." A user who hit Pi's terminal warning to the same effect filed it as issue #3670; a bot auto-closed it, and the maintainer replied that Anthropic does not allow the plan quota to be used this way, while noting the subscription login is still useful for extra usage. The subscription is not the budget for Pi; it is a prerequisite for a separate per-token charge.

Anthropic's side agrees on the money. Its help centre says usage credits are billed at standard API rates and are enabled at Settings > Usage on the web app. A separate usage-bundles article publishes the discounts on prepaid usage bundles:

Bundle valueDiscountYou pay
$5010%$45
$25020%$200
$1,00030%$700

The same article caps bundle purchases at $2,000 per month on individual Pro and Max plans and $3,000 per month on Team, and says price and plans are subject to change. It is dated May 18, 2026; the extra-usage article is dated August 10, 2026.

The two articles describe different balances and different surfaces, so read both rather than one. The bundles article says a usage bundle balance "applies across Claude, Claude Desktop, Claude Mobile (iOS and Android), Claude Code, Cowork, and third-party products that use your Claude account". The extra-usage article says "usage credits apply to both Claude conversations and Claude Code terminal usage" and does not address third-party harnesses either way — an absence, not an exclusion. The billing consequence both articles do state is the one that matters for a budget: per token, at standard API rates.

The policy history behind that warning string is also worth knowing, and it is second-hand: VentureBeat reported on May 13, 2026 that Anthropic had blocked third-party agent tools from Claude subscription billing on April 4, 2026, then reinstated the route behind a separate monthly Agent SDK credit pool billed at API rates, which does not roll over and cannot fall back on the general subscription allowance once spent. We have not confirmed those mechanics against an Anthropic-owned page, so treat them as reporting rather than terms, and check Settings > Usage in your own account before you route paid work this way.

Radius rates beside the same models on Kunavo

Radius is the only route here that Earendil prices itself. Its model table publishes per-million-token rates and states plainly that "model availability and prices can change". Its FAQ says top-ups are charged at list prices plus the payment-processor fees, with no percentage published, so a Radius total cannot be computed from the outside. The table below compares its published rates with Kunavo's live catalog rates for the same three Claude models, and with the model vendor's own list price.

ModelRadius: input / output per 1MKunavo: input / output per 1MVendor list: input / output
Claude Haiku 4.5$1.00 / $5.00$0.40 / $2.00$1.00 / $5.00
Claude Sonnet 5$2.00 / $10.00$2.00 / $10.00$2.00 / $10.00
Claude Opus 5$5.00 / $25.00$2.00 / $10.00$5.00 / $25.00

Radius figures read from its own documentation on September 18 and unchanged on September 21, 2026; Kunavo figures are rendered from the live catalog. Note one Radius mechanic that changes a bill more than a rate card does: for its tiered models, "the tier is selected from the request's total input tokens and applies to the entire request" — its gpt-5.4 row moves from $2.50 / $15.00 to $5.00 / $22.50 once a request crosses 272,000 input tokens. A long agent conversation therefore reprices in one step rather than gradually.

A worked month, as arithmetic

Assume one month, one model, 6,000,000 uncached input tokens and 600,000 output tokens, with no cache reads, no cache writes and no image or tool charges. That is roughly the shape of steady daily agent work on a repository, not a measured task.

ModelAt Radius's published ratesAt Kunavo's catalog rates
Claude Haiku 4.5$9.00$3.60
Claude Sonnet 5$18.00$18.00
Claude Opus 5$45.00$18.00

These are illustrative token estimates under the assumptions above, not measured task costs and not a ceiling on a bill. The Radius column also excludes its unpublished payment-processor fee on top-ups. Read the two columns row by row rather than as a verdict: where they land on the same number, the choice turns on something other than price, and where they diverge, the gap is the argument for pricing the specific model you intend to run instead of picking a route and assuming the rest.

Two Kunavo-side caveats belong in the same estimate. The catalog amount is a billing floor, not a cap: when the upstream reports its charge, the bill is the greater of catalog cost and upstream cost times the applicable markup, as the billing guide explains. And the minimum top-up is $10 of prepaid credit, which is the cash needed to open a funded account, not a task fee or a subscription. Cache charges are separate and documented at caching.

Cheapest listed rate is not cheapest finished task

Those are two different claims and conflating them is how a cheap route gets expensive. A smaller model at a third of the per-million price still costs more overall if it needs three attempts at the change a stronger model lands once. Decide by route first, then by model:

  • Radius when you want the path Pi builds in: OAuth through /login, a published rate table, and cost metadata Pi already knows how to display. Its FAQ says BYOK is available for business customers.
  • A direct vendor key when you want the vendor's own features, support and terms, and you only need one model family.
  • An existing subscription only after reading the section above. It is a prerequisite for per-token extra usage, not a bundled allowance for Pi.
  • A compatible gateway such as Kunavo when the per-token rate for your chosen model is the deciding factor and you are willing to configure a custom provider by hand.
  • Local inference when the hardware is already yours and the model genuinely handles your tool workflow. Pi documents Ollama, vLLM and LM Studio as custom providers.

Then measure. Pi's usage documentation describes a TUI footer carrying token/cache usage, cost, context usage and the current model, and /session as printing the session file, ID, messages, tokens and cost — provided cost is configured, which is the catch in the next section. Run the same bounded task on two candidates before migrating scheduled work.

Pointing Pi at your own endpoint

Pi documents no generic base-URL environment variable. There is no ANTHROPIC_BASE_URL or OPENAI_BASE_URL in its documented variables — the only endpoint entries are AZURE_OPENAI_BASE_URL and AWS_ENDPOINT_URL_BEDROCK_RUNTIME — so a custom endpoint goes in ~/.pi/agent/models.json. That file reloads each time you open /model, so you can edit it mid-session. Pi accepts exactly four wire protocols: openai-completions, openai-responses, anthropic-messages and google-generative-ai. Kunavo serves the first three; it has no Google Generative AI route, so that fourth type has no Kunavo counterpart.

The configuration below is written from Pi's published custom-provider schema and Kunavo's documented endpoints. It has not been run against Kunavo here, and no Pi integration guide is published on this site. Treat it as a starting point to verify, keep your working route available, and expect to adjust it.

~/.pi/agent/models.json
{
  "providers": {
    "kunavo": {
      "baseUrl": "https://api.kunavo.com",
      "api": "anthropic-messages",
      "apiKey": "$KUNAVO_API_KEY",
      "models": [
        {
          "id": "claude-sonnet-5",
          "name": "Claude Sonnet 5",
          "reasoning": true,
          "input": [
            "text",
            "image"
          ],
          "cost": {
            "input": 2,
            "output": 10,
            "cacheRead": 0.2,
            "cacheWrite": 2.5
          }
        }
      ]
    }
  }
}

Four notes on that block, each one a real gotcha:

  1. The base URL is the origin, with no /v1. Anthropic-style clients append /v1/messages themselves, so https://api.kunavo.com/v1 produces requests to /v1/v1/messages and a 404 — see the base-URL page. Pi's own docs are inconsistent here: one anthropic-messages example uses an origin-only https://proxy.example.com and another uses https://proxy.example.com/v1. If your first call 404s, this is the line to change. An OpenAI-compatible provider takes the opposite convention, https://api.kunavo.com/v1 with api set to openai-completions.
  2. The cost block is not optional in practice. Pi documents its default as all zeros, so a provider you add yourself reports $0 in the footer and in /session until you type the rates in. Built-in providers and Radius get theirs from a catalogue; yours does not. The numbers above are rendered from the current Kunavo catalog, with the cache-read rate from the caching table and Claude cache writes at 1.25× input.
  3. Set the context and output limits. Pi defaults a custom model to a 128,000-token context window and 16,384 maximum output tokens. Add contextWindow and maxTokens matching the model you chose, or Pi will manage a conversation by a limit the endpoint never imposed.
  4. Leave the Anthropic compatibility flags alone at first. They do not all point the same way. supportsEagerToolInputStreaming and supportsLongCacheRetention default to true — Pi sends per-tool eager_input_streaming unless you set the first to false because a backend rejects the field — while supportsStrictTools, allowEmptySignature and supportsMidConvoEffort default to false. Pi's own warning on the last of these is to set it only on a faithful Anthropic Messages transport and not for APIs that merely imitate the shape. Which of these Kunavo accepts has not been tested, so the block above sets none of them.

One more mechanic worth knowing: apiKey accepts $ENV_VAR, a !shell-command whose stdout is used, or a literal. It is not required to load the file, and the provider docs publish the order credentials resolve in: the CLI --api-key flag, then an auth.json entry (API key or OAuth token), then an environment variable, then a custom provider key from models.json. Until some credential is configured, the models load but stay unavailable in /model and --list-models.

If you want to try a gateway route on a client that already has a published setup guide before taking on Pi's hand-written configuration, Pi vs OpenCode compares the two agents, and the integrations index lists the clients that do. When you are ready to price a real task, create a Kunavo account and run one bounded change against the model you shortlisted.

FAQ

How much does the Pi coding agent cost?

The Pi coding agent is free software. Its repository at earendil-works/pi is MIT-licensed, and its official site at pi.dev publishes no pricing page, plan or subscription (checked September 21, 2026). What you pay is the model usage behind it, billed by whichever route you sign in with — among them Earendil's Radius gateway, an existing Claude or ChatGPT subscription, a direct vendor API key, or any compatible endpoint you add to ~/.pi/agent/models.json yourself.

Does a Claude Pro or Max subscription cover Pi?

Not as plan allowance. Pi's own provider documentation states that third-party harness usage draws from extra usage and is billed per token, not against Claude plan limits. Anthropic's help centre says usage credits are billed at standard API rates and must be enabled at Settings > Usage. So signing in with a Claude subscription inside Pi produces a per-token charge on top of the subscription, not free requests. Confirm the current terms in your own Anthropic account before relying on this route.

What is the best API for the Pi coding agent?

There is no single answer, because the routes differ in what they can reach, not only in price. Radius is Earendil's own gateway, reached by OAuth through Pi's own /login, and its per-million rates are published in Radius's own documentation. A direct vendor key gives you the vendor's own features and support. A compatible gateway such as Kunavo is added as a custom provider in models.json and is worth comparing when the per-token rate for your chosen model is the deciding factor. Local inference wins only if you already run the hardware and the model handles your tool workflow.

What is the cheapest API for the Pi coding agent?

The cheapest listed rate and the cheapest finished task are different things. A smaller model with a lower per-million price can still cost more overall if it needs several attempts on the same change. Pick the least expensive model that completes your work with acceptable review effort, then check Pi's footer and /session cost readout on a real task. Note that Pi defaults a custom model's cost block to all zeros, so a self-added provider reports $0 until you type the rates in.

Which npm package is the current Pi coding agent?

@earendil-works/pi-coding-agent. The project moved from badlogic/pi-mono and the @mariozechner npm scope to earendil-works/pi and @earendil-works on May 7, 2026; version 0.74.0 was the first release under the new scope and 0.73.1 the last under the old name. The old packages were deprecated but not unpublished, so stale tutorials still install something that appears to work. On the npm registry the latest version was 0.86.1, published September 20, 2026 (registry checked September 21, 2026).

Pi, Radius and Anthropic documentation checked September 18 and re-checked September 21, 2026. Kunavo rates and every total on this page are rendered from the live catalog and are illustrative token arithmetic, not measured task costs. No Pi-to-Kunavo runtime test has been performed.