Aibubu
Visit Aibubu ↗
Account and usage

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:

  1. List products and prices with GET /api/billing/catalog?workspace_type=personal&wallet_purpose=api (use workspace_type=team for a team workspace).
  2. Create checkout with POST /api/billing/api/checkout using product_id, price_id, and provider; custom top-ups also require amount_minor. Send an Idempotency-Key header.
  3. Confirm payment and fulfillment separately with GET /api/billing/orders/{id}.
  4. Confirm the API balance with GET /api/billing/wallet?wallet_purpose=api and GET /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.