Back to guides
Coding agents·September 18, 2026·Updated October 1, 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 listed seven until a September 22, 2026 refresh, 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. Pi's September 22, 2026 docs refresh removed that list of seven; the provider page now says "Use /login [provider] to see the methods supported by a provider" (re-read October 1, 2026). 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. Until its September 22, 2026 docs refresh, its own provider docs said: "Third-party harness usage draws from extra usage and is billed per token, not against Claude plan limits." The refresh removed that sentence and left only a setting, warnings.anthropicExtraUsage, to "Warn when Anthropic subscription authentication may use paid extra usage"; the warning itself, in Pi's source at v0.99.2, still reads that third-party harness usage "draws from extra usage and is billed per token, not your 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. Take Pi at its word and the subscription is not the budget for Pi but a prerequisite for a separate per-token charge. Anthropic's own Agent SDK article currently reads the other way for third-party apps — since a June 15, 2026 update it says their usage "still draw[s] from your subscription's usage limits" — so check Settings > Usage after a short session rather than trusting either sentence alone.

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. Anthropic's own Agent SDK article overtakes that report: it announced a monthly Agent SDK credit for June 15, 2026, then opened with an update the same day pausing the change — the credit is not available, and Agent SDK, claude -p and third-party app usage still count against the plan's usage limits. Read the VentureBeat mechanics as history, not current 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.70 / $3.50$1.00 / $5.00
Claude Sonnet 5$2.00 / $10.00$1.40 / $7.00$2.00 / $10.00
Claude Opus 5$5.00 / $25.00$3.50 / $17.50$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$6.30
Claude Sonnet 5$18.00$12.60
Claude Opus 5$45.00$31.50

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 — since its September 22, 2026 docs refresh the only endpoint entry is AZURE_OPENAI_BASE_URL, on the provider page; the refresh dropped AWS_ENDPOINT_URL_BEDROCK_RUNTIME, which the docs had shown as a standard AWS SDK variable for a Bedrock proxy — 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. Until the same refresh, Pi documented exactly four wire protocols for it: openai-completions, openai-responses, anthropic-messages and google-generative-ai. The refreshed models page lists none — it shows openai-completions in one example and describes the case as "An OpenAI-, Anthropic-, or Google-compatible endpoint" — and Pi's source at v0.99.2 types the field as a free string and dispatches it to whichever of ten built-in implementations matches, the four plus mistral-conversations, azure-openai-responses, openai-codex-responses, bedrock-converse-stream, google-vertex and pi-messages. Only the four were ever documented for a custom provider, and none of the other six was tested here. Kunavo serves the first three of the four; it has no Google Generative AI route, so that fourth type has no Kunavo counterpart.

The configuration below is written from Pi's models documentation — and, where its September 22, 2026 docs refresh dropped a detail, from Pi's source at v0.99.2 — and Kunavo's documented endpoints. It has not been run against Kunavo here. Kunavo's Pi integration guide is the published configuration reference for this client; it uses the OpenAI-compatible route, does not put this anthropic-messages route in a block you would paste, and has not been runtime-tested either. Treat the block below 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": 1.4,
            "output": 7,
            "cacheRead": 0.14,
            "cacheWrite": 1.75
          }
        }
      ]
    }
  }
}

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 never settled this: until its docs refresh of September 22, 2026, one anthropic-messages example used an origin-only https://proxy.example.com and another used https://proxy.example.com/v1, and the refresh removed both without settling it. 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's source (v0.99.2) defaults it to all zeros — the refreshed docs no longer say so — 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. The same source 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. Their defaults now sit in Pi's source (v0.99.2) rather than its docs, and 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. Until its September 22, 2026 docs refresh, Pi warned that the last of these belongs only on a faithful Anthropic Messages transport, not on APIs that merely imitate the shape; the refreshed models page replaces that with one rule for all of them: compatibility settings "should describe verified differences in the endpoint's request or response behavior. Do not enable them based only on an endpoint advertising OpenAI or Anthropic compatibility." 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 since its September 22, 2026 docs refresh Pi's models page publishes the order credentials resolve in: "a runtime --api-key first, then a stored auth.json credential, an apiKey from models.json, and finally the provider's environment variables or ambient cloud credentials". Until Pi can resolve some credential, the same page says custom models load from models.json but "remain unavailable in /model".

If you would rather follow a published setup page than adapt this block, start with the Pi integration guide; if you are still choosing a client, Pi vs OpenCode compares the two agents, and the integrations index lists every client with a Kunavo setup guide. When you are ready to price a real task, create a Kunavo account and run one bounded change against the model you shortlisted.

Frequently asked questions

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?

The two sides currently say different things. Until a September 22, 2026 docs refresh removed the sentence, Pi's own provider documentation stated that third-party harness usage draws from extra usage and is billed per token, not against Claude plan limits; Pi still prints that warning when an Anthropic model runs on subscription auth, and its source at v0.99.2 words it as billed per token, not your Claude plan limits. Anthropic's Agent SDK help article, updated June 15, 2026, says Agent SDK, claude -p and third-party app usage still draw from your subscription's usage limits, and that the separate monthly credit it had announced is not available. Extra usage, where it applies, is billed at standard API rates and must be enabled at Settings > Usage. Run a short Pi session and check Settings > Usage in your Anthropic account to see which balance moved before you budget 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. After Pi's September 22, 2026 docs refresh, its credential order and anthropic-messages base-URL examples were re-checked on its models page on October 1, 2026, and the custom-model defaults in its source at v0.99.2. The same day, the extra-usage line was re-checked against Pi's settings page and the terminal warning in its source at v0.99.2; the list of /login routes and the endpoint variables on its provider page; the api list and the compatibility-flag guidance on its models page, with the api dispatch and the flag defaults in the source; and this site's own integrations index. 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.