Money
Credit, pricing and billing
Add credit to a project, understand what you pay for, and keep an eye on spending before it runs out.
Each project has one prepaid balance. You (or your agent) add credit, running apps use it up by the second, and CLI warns you before it runs out. One US dollar of credit buys one dollar of hosting, whether you pay by card or in USDC.
How to do it: open a project and press Add credit, or set up automatic top-ups with a saved card. Set a monthly budget or a low-balance alert under Usage so nothing surprises you. New accounts get some free credit to start.
"Add $20 of credit to my project and alert me when it's under $5."
Credit you add is for hosting. Money your apps earn from selling an API can be withdrawn.
Each project spends from one prepaid balance. You (or your agent, or anyone else) add credit, running services draw it down by the second, and CLI warns you before it runs out. Credit is pegged to the dollar: 1 USDC buys $1 of hosting.
How the balance works
- A project and all its environments share one balance.
- Anyone can add credit to any project, so an agent can fund the project it works in, and you can fund one your agent created.
- Credit you add is for hosting. It can't be withdrawn; only earnings from selling your API can (see /docs/selling-apis).
- Earnings are withdrawable when the customer paid in USDC (x402 or a USDC deposit). A sale paid from a customer's card credit or free or promotional credit (welcome, referral, staking or goodwill credit) still adds to your balance for hosting, but can't be withdrawn. Card payments can be disputed for months, so card credit never leaves CLI as USDC. The same goes for paying APIs outside CLI: that sends real USDC, so it needs USDC that was paid in.
In the dashboard: the project header shows the balance, the burn meter and your runway. Usage and credit has everything else on this page.
Welcome credit
A CLI server can give new people free credit on their first project, so an agent can deploy something real before anyone reaches for a card. It's off unless the operator turns it on. When it applies to you, the dashboard's setup screen says so: "Your first project starts with … of free credit, so your agent can deploy before you pay for anything."
- Once per person. It goes to the first project you create while it's on, and never again.
- People, not keys. You qualify when you sign in with email or GitHub. Accounts that sign in only with a wallet qualify only if the server's operator allows it. API keys never get it.
- A daily limit. The server caps how much welcome credit it gives out each day. If the cap has been reached, your project starts without it, and you'll get it on the next project you create instead.
- It spends like any credit, and like any credit it can't be withdrawn.
With the API: GET /v1/me includes welcomeCredit: whether you'd get it on your next new project (available), the amount in micro-USDC, and grantedTo (the project and time) once it's been used. When a new project gets it, the POST /v1/projects answer includes it too:
{
"id": "prj_…",
"welcomeCredit": { "amount": 5000000, "note": "5.000000 USDC of free credit to get started. It spends like any credit." }
}Operators set the amount and limits; see Running CLI yourself.
Invite friends
Everyone has an invite link under Account → Invite friends. When someone new signs up through it and adds $5 of credit of their own, you both get $10 of credit: theirs on the project they paid into, yours on your first project. Welcome credit, play money and earnings don't count as paying. A link works for accounts in their first week, never for your own account, and earns at most 25 rewards.
With the API:
GET /v1/me/referral
POST /v1/me/referral/claim
{"code": "abc1234"}Operators set the amounts with CLI_REFERRAL_CREDIT_USDC (10; 0 turns referrals off), CLI_REFERRAL_MIN_PAID_USDC (5) and CLI_REFERRAL_MAX (25).
Add credit
In the dashboard: Credit and billing in the sidebar lists every project's balance, with Add credit for each. On a project, the Add credit button at the top opens its Usage and credit tab.
Pay in USDC with x402 (Base or Solana)
This is how agents add credit. In the dashboard, open Usage and credit, find Credit, choose USDC on Base or USDC on Solana, enter an amount and press Pay with wallet. Network fees are covered.
The flow underneath, step by step:
Ask to top up, in micro-USDC (at least 1 USDC):
APIPOST /v1/projects/:id/topup?amount=10000000CLI answers 402 with
accepts[], one payment option per network, each with the network, the USDC contract or mint, the amount andpayTo. The same is in thePAYMENT-REQUIREDheader as base64 JSON.Pay on the network your wallet holds USDC on:
- Base: sign an EIP-3009
transferWithAuthorization. The payload is{"signature", "authorization"}. - Solana: build one SPL
TransferChecked(6 decimals) topayTo's token account, withextra.feePayeras the fee payer, and sign it, leaving the fee payer's signature empty. The payload is{"transaction"}in base64.
- Base: sign an EIP-3009
Wrap it as
{"x402Version": 2, "accepted": <the option you chose>, "payload": …}, base64-encode it, and resend the same request with thePAYMENT-SIGNATUREheader.CLI settles the payment and answers 200 with the new
balance.
If the payment is refused you get PAYMENT_INVALID (re-sign against the latest 402), PAYMENT_REPLAYED (sign a new authorization) or PAYMENT_SETTLEMENT_FAILED (check the wallet's USDC and retry).
Ask your agent:
"Add $20 of credit to this project from your wallet."
With the MCP server, the agent only pays if CLI_SPEND_LIMIT_USDC allows it; otherwise it asks you to fund the project.
Pay by card
Card payments go through Stripe Checkout. The card fee is added on top, so $20 buys exactly $20 of credit.
In the dashboard: Credit, choose Card, enter an amount, then Continue to card payment.
From your terminal:
cli topup 20With the API (signed in as a person):
POST /v1/projects/:id/topup/card{ "amountUsd": 20 }Open the returned checkoutUrl. Credit appears once the payment clears. A disputed or refunded card payment takes the credit back. Stripe emails a receipt to people who sign in by email.
Automatic top-up with a saved card
So services never stop for lack of credit, the project's owner can save a card: tick Save this card and add this amount automatically when credit drops below at the card step (or send "saveCard": true, "autoThresholdUsd": 5 with the request above). After that payment, whenever the project's credit drops below the threshold, CLI charges the saved card the same amount (with the card fee on top) and adds the credit.
- At most one automatic charge every 15 minutes, and three a day per project.
- If a charge fails twice in a row (declined, or the bank wants the cardholder to confirm), automatic top-up turns off and the project's people are told. Pay by card again to save a new card.
- Change the threshold and amount, turn it off, or remove the card under Credit and billing. Removing it also tells Stripe to stop keeping it. With the API (owner only):
GET,PUT {"enabled", "thresholdUsd", "amountUsd"}andDELETE /v1/projects/:id/auto-topup.
CLI never sees the card number; Stripe keeps the card. Agents, keys and the Claude and ChatGPT connectors can't save or charge cards.
Send USDC to the project's deposit address
Each project has a USDC address of its own. Send USDC there from any wallet or exchange, and CLI credits it once the transfer is confirmed.
From your terminal:
cli depositWith the API:
GET /v1/projects/:id/deposit-addressBuy USDC with a card through Coinbase
POST /v1/projects/:id/onramp with {"usd": 50} returns a Coinbase Onramp link that delivers USDC to the project's deposit address. Agents use cli_funding_options to hand you the deposit address and this link; they never open card links themselves.
Pay with the CLI token
If your CLI server takes it, you can also pay in CLI tokens on Robinhood Chain, with bonus credit. It's optional and nothing depends on it. See The CLI token.
Prices
You pay for what your services actually use. CLI measures each one's CPU and memory every minute and charges for that, per second, not for the size of its plan. A quiet web app uses a sliver of a CPU and around 100 MB, so it usually costs a few dollars a month:
| Resource | Price |
|---|---|
| CPU | About $0.072 per vCPU-hour |
| Memory | About $0.037 per GB-hour |
| Egress, volumes, backups, GPUs | See GET /v1/pricing |
| Sandboxes | Per second of CPU and memory, plus $0.001 to start |
| Cron runs | Per second |
| Compute on your own servers | A management fee: by default 15% of the CPU and memory price above |
A service's plan (its CPU and memory size) is a ceiling, not a price. It's the most the service can use, and so the most it can cost: the plan's cost times its copies (replicas, or for highly available Postgres the primary plus its standbys and read replicas).
What the dashboard shows:
- Starters and launches show what a quiet app usually costs ("~$4/mo") and the ceiling if it's busy all month.
- App cards show the estimate until there's real usage. After that, they show what it's actually costing, from the last day's metering.
- Buttons that start something show the plan's hourly ceiling.
The API gives the same numbers: typicalHourly on templates, typicalMonthly on launches, and monthly with monthlyFrom (usage or estimate) on a project's services. Prices are public at GET /v1/pricing.
Compute on your own servers
Services on a server in your own cloud account (see /docs/own-cloud) aren't charged CLI's compute price, since you pay your cloud provider for the machine. CLI charges a management fee instead, by default 15% of the usual price for the same CPU and memory; the operator of your CLI server can set another share. The fee is used both in the one-hour check before something starts and in the per-minute metering.
Your credit: one balance for every project
Like Railway, you keep one balance topped up and every project you own draws from it. Credit and billing, Your credit shows it, with Add credit (card or USDC).
- A project uses its own credit first. Anyone, including an agent, can still add credit to one project.
- When a project needs more, it takes it from your credit: before starting something, or when it has less than an hour of what it's running left. It takes about six hours' worth at full size at a time. You're billed for actual use, so that usually lasts much longer.
- To keep a project to its own credit, untick Uses your credit next to it. Demo projects never draw from it.
- Each project's monthly spending cap still applies.
- Credit that moves from your credit into a project is for hosting; it can't be withdrawn.
GET /v1/me/credit
PUT /v1/projects/:id/shared-credit{ "shared": false }GET /v1/me/credit returns your credit's balance and its projectId, so it can be topped up like any project (POST /v1/projects/:id/topup/card, or x402). It also lists each project you own and whether it draws from your credit. API keys and connected apps don't have shared credit.
Move credit between your projects
Each project has its own balance. To move some from one project you own to another, use Credit and billing, Move credit between your projects, or the Usage and credit tab of the project that needs it. For example, your welcome credit lands in your first project, and your second starts at $0. Moved credit is for hosting: it can't be withdrawn. Demo play money stays in the demo.
POST /v1/projects/:id/transfer{ "to": "prj_…", "amount": 5000000 }Only the owner of both projects can do this; API keys and connected apps can't.
When credit runs out
Before anything starts, CLI checks that the balance covers one hour of what you're starting: every copy and every database member. If it doesn't, the request gets 402 INSUFFICIENT_FUNDS. Its body already holds an x402 payment challenge for the shortfall, so an agent can pay it and retry straight away.
When the balance reaches zero:
- Services keep running for a 15-minute grace period. The project page says so.
- After that the project is suspended and its services stop. Requests that start anything get
PROJECT_SUSPENDED. - Add credit and the services restart on their own.
See what you spend
| Where | Shows |
|---|---|
Burn meter (project header), GET /v1/projects/:id/burn | The most it can cost an hour, the last 24 hours as bars, spent in 24 hours, your measured pace and runway |
Spending, cli usage, GET /v1/projects/:id/usage | Balance, burn per hour, runway in hours, and cost per service |
Service Metrics, GET /v1/services/:id/usage?hours=24 | Hourly CPU, memory, egress and cost, with advice to downsize, upsize or keep |
Where the money goes, GET /v1/projects/:id/flows?days=30 | Money in (deposits, credit added, refunds, earnings by source) and out (compute, sandboxes, hosted agents, paid APIs you called, services you pay for, templates, withdrawals) |
GET /v1/projects/:id/forecast | This month's spend, the burn rate and the projected total |
Ask your agent:
"What is this project costing per hour, and is anything oversized?"
Budgets and low-balance alerts
Set a monthly budget
A budget covers the project and all its environments for a calendar month (UTC). At 80% you get a budget_warning. At 100% it either alerts you or stops spending, as you choose.
Every new project starts with one. On clicloud.app that's $25 a month, set to stop, so nothing runs up a bill you didn't expect. The project page shows this month's spending against the cap, with Change to raise or remove it. Projects made with an agent's project key don't get the default; the agent sets its own. Self-hosted servers choose the default with CLI_DEFAULT_BUDGET_USD (0 for none) and CLI_DEFAULT_BUDGET_ACTION.
In the dashboard: Usage and credit, Budget. Enter a monthly amount and pick Then alert me or Then stop services.
With the API:
PUT /v1/projects/:id/budget{ "monthly": 50000000, "action": "stop" }With "stop", reaching the budget raises budget_reached, stops the project's services and refuses new spending with BUDGET_EXCEEDED. Everything restarts next month, or when you raise the budget. Send "monthly": null to remove it.
Get a low-balance alert
In the dashboard: Low-credit alert under Usage and credit.
With the API:
PATCH /v1/projects/:id{ "lowBalanceAlert": 5000000 }When credit drops below it, owners and admins get an email and your alert channels get a low_balance event.
For the order in which caps, daily limits, budgets and the balance are checked, see Agent permissions and limits.
Statements
Each month has a statement: what you paid in, spent on hosting per service, earned per source after fees and splits, withdrew and were refunded.
In the dashboard: Usage and credit, Statements. Add your legal name, address and tax ID there to have them printed on invoices.
From your terminal:
cli statement 2026-10
cli statement 2026-10 --csvWith the API:
GET /v1/projects/:id/statements/2026-10
GET /v1/projects/:id/statements/2026-10.csv
GET /v1/projects/:id/statements/2026-10.htmlJSON for tools, CSV for your accountant, HTML for a printable invoice. The billing details are set with PUT /v1/projects/:id/billing-profile.