AibubuDevelopers
Developer Docs

Credits and Top-up

Use prepaid credits for API generation requests.

Aibubu API uses workspace wallets. Personal workspaces buy subscriptions, while team workspaces buy permanent credit packs.

  1. List products and prices with GET /api/billing/catalog?workspace_type=team for the active team workspace.
  2. Create checkout with POST /api/billing/checkout using product_id, price_id, and provider.
  3. Confirm payment and fulfillment separately with GET /api/billing/orders/{id}.
  4. Confirm granted credits with GET /api/billing/wallet and GET /api/billing/ledger.

Successful purchases emit credits.granted. Insufficient generation balance returns HTTP 402, insufficient_credits, and X-Aibubu-Balance; top up before retrying.