Credits and Top-up
Understand how the dedicated Aibubu API credit balance works, how generation requests deduct credits, and how to top up.
Aibubu uses workspace wallets, and personal and team workspaces keep separate balances. Any active paid subscriber in either workspace type can buy permanent creator credit packs on the creator wallet page; free users must subscribe first. The server checks subscription eligibility; return_surface only selects the post-payment return site.
API calls (/v1/* with an API key) only consume the API wallet of the key's workspace. API balance and creator credits are separate and cannot be transferred; API top-ups and calls require no creator subscription. Top up from the API billing page; team purchases still require the relevant purchase permission. The API top-up flow is:
- List products and prices with
GET /api/billing/catalog?workspace_type=personal&wallet_purpose=api(useworkspace_type=teamfor a team workspace). - Create checkout with
POST /api/billing/api/checkoutusingproduct_id,price_id, andprovider; custom top-ups also requireamount_minor. Send anIdempotency-Keyheader. - Confirm payment and fulfillment separately with
GET /api/billing/orders/{id}. - Confirm the API balance with
GET /api/billing/wallet?wallet_purpose=apiandGET /api/billing/ledger?wallet_purpose=api.
Successful purchases emit credits.granted. An insufficient API-eligible balance returns HTTP 402: the code is insufficient_balance. Read balance_amount, currency, api_credits, and authorized_api_credits from GET /v1/user/balance, then replenish the API-eligible balance or wait for reservations to release before retrying.

