Skip to content

Money

Test mode is free. Calls, messages and AI replies in test cost nothing and never touch your balance.

Live runs on credit. Everything you use is charged at the price list below, first from free credit and then from your wallet. There is no approval step to go live. When there is not enough credit, live requests fail with HTTP 402 and code insufficient_credit. Top up in the console and retry. A test key is never charged and never returns it.

Keys need the billing:* scope. The API is read only. Top-ups are made in the console.

Terminal window
curl https://app.airfone.app/v1/billing/balance \
-H "Authorization: Bearer $AIRFONE_KEY"
{"currency": "NPR", "wallet_minor": 125000, "free_credit_minor": 20000}

Amounts are in minor units, so 125000 is Rs 1,250.

Terminal window
curl https://app.airfone.app/v1/billing/prices \
-H "Authorization: Bearer $AIRFONE_KEY"

Each price has a unit and price_micros, millionths of the currency unit. This is what your workspace pays, so a deal or reseller price shows as it will be charged. AI chat is charged by tokens and listed as three prices per 1M tokens: words read, words written and words read again.

Terminal window
curl https://app.airfone.app/v1/billing/credits \
-H "Authorization: Bearer $AIRFONE_KEY"

active lists running grants with what is left and when the earliest one ends. expired lists credit that ran out by date in the last 30 days, with how much was never used. Free credit is spent before the wallet and does not carry past its end date.

Terminal window
curl https://app.airfone.app/v1/billing/invoices \
-H "Authorization: Bearer $AIRFONE_KEY"
curl https://app.airfone.app/v1/billing/invoices/$INVOICE_ID \
-H "Authorization: Bearer $AIRFONE_KEY"
curl "https://app.airfone.app/v1/billing/topups?limit=25" \
-H "Authorization: Bearer $AIRFONE_KEY"

An invoice shows lines, tax and status (open, overdue, paid, void). Top-up history lists payments that actually went through, newest first. Pages use next_cursor, see Pagination.

For what you have used this month, see GET /v1/usage.