There are two separate steps: creating a fresh OpenRouter payment link and paying that link. The CLI can automate payment of an existing link, but it does not create the next OpenRouter top-up link for you.
This page explains the constraint, then covers the workarounds that actually work in practice. ROZO Checkout is an independent third-party checkout and is not affiliated with OpenRouter.

Separate payment-link creation from payment
Auto top-up works by charging a payment method that has been stored in advance. Somebody has to be able to move your money without you being present at that moment. With a card, that is exactly what the stored card is for.
A self-custody wallet can sign each payment interactively, or local software can sign with a key you have authorized it to use. Self-custody does not by itself rule out automation.
For unattended payment, a signer needs authority to spend: for example, a dedicated local hot wallet used by the optional CLI --send mode. That is different from a custodial service holding your balance or a token allowance permitting a contract to spend.
Authorizing a signer does not solve payment-link creation. Keep that step explicit rather than assuming a cron job can generate fresh OpenRouter invoices.
What actually breaks when the balance hits zero
It is worth being concrete, because the failure is not graceful.
A long-running job does not pause politely and wait for funds. Requests start failing, and depending on how your client handles errors, you may get a burst of failures, a partially completed batch, or a retry loop that burns time against an empty balance. Everything stays broken until a human notices and funds the account by hand.
The cost is rarely the top-up itself. It is the run you have to start over, and the time between the balance hitting zero and you finding out.
Workarounds that hold up
None of these are clever. They work because they reduce how often the question comes up.
- Size the buffer to your burn, not to the minimum. If a heavy day costs you a certain amount, keep several days of that on the balance. Topping up more, less often, is strictly better than topping up the minimum repeatedly.
- Top up before a long run, not during. The moment you know a batch is going to be expensive is the cheapest moment to add funds.
- Watch the balance where you already look. A number you never see is a number that surprises you. Put it somewhere you pass by anyway.
- Keep the top-up fast enough that the buffer strategy is workable. This is the part we can help with: paste the link, confirm in your wallet, and credits usually land about 2 minutes after the payment confirms on-chain. Manual is only painful when manual is slow.
Automate it with the CLI or cron
OpenRouter used to expose a crypto credits API that a script could call. As of October 2026 that endpoint (POST /api/v1/credits/coinbase) returns 410 Gone, so the payment link itself has to be created in OpenRouter's Credits page.
Once you have the link, paying it can be scripted. The ROZO Checkout CLI quotes and pays a link in one command, which an agent or a cron job can run:
- npx @rozoai/checkout quote <link>
- npx @rozoai/checkout pay <link> --with usdt-solana --yes
The default path needs no private key and no environment variables. It creates a one-time deposit order, prints the address and exact amount, and waits until the invoice settles. You still send the coin from your own wallet, so the self-custody point above holds. If you want it fully unattended, an optional --send flag signs from a local key on EVM chains or Solana. Use a dedicated low-balance hot wallet for that, because the local signer can spend its funds.
To verify payment, run npx @rozoai/checkout receipt <rozoPaymentId> --json. It exits 0 only when Coinbase reports the invoice paid; for v3 that means CAPTURE_SUCCEEDED. Exit 3 means in flight or unknown, and exit 1 means expired unpaid or needing human review. A status command exiting 0 only means the check ran: read its state, paymentOutcome and nextAction. Confirm the credits in OpenRouter separately.
See the ROZO Checkout CLI README for the current commands and both supported Coinbase payment-link and payment-session URL formats. Our AI agent guide covers the CLI, MCP server and Claude Code skill.
If you want it fully automated anyway
Choose how payments will be authorized, and separately decide how fresh payment links will be obtained.
Local signing can automate a prepared payment without a custodial balance. Limit the funds available to that signer, review the quote before granting authority, and check the receipt before retrying. If you instead use a custodial service, review its access, withdrawal and refund terms.
For most people running agents, a buffer plus a 30-second manual top-up turns out to be less operational risk than a standing balance somewhere else.