Skip to main content
estudjo uses a prepaid credit wallet. You load credits in advance, and they are deducted automatically when you queue generations. There are no subscriptions or per-seat charges — you only spend credits when you generate.

How Credits Work

Credit accounting happens in three stages tied to the lifecycle of each generation:
  1. Reserve — When you submit a generation via POST /generate, estudjo immediately reserves the required credits from your balance. The credits are held but not yet fully spent.
  2. Spend — When the generation completes successfully, the reserved amount is confirmed as a spend charge. The reservation converts to a permanent deduction.
  3. Release — If the generation fails for any reason, the reserved credits are released back to your balance in full. You are never charged for a failed generation.
This reserve-then-settle model ensures your balance accurately reflects in-flight work and that failures never result in unexpected charges.

Credits Ledger

Every generation object returned by GET /generations includes a credits_logs array. This array gives you a full audit trail of every credit movement associated with that generation. Each log entry has three log types:

Example: Completed Generation

A successfully completed generation will have both a reserve and a spend entry:

Reading the Logs

Use the combination of log entries to determine the current state of a generation’s billing:
  • reserve only → The generation is still pending; credits are held but not yet settled.
  • reserve + spend → The generation completed successfully; the credit charge is kept.
  • reserve + release → The generation failed; your credits were fully refunded.

Checking Your Balance

You can retrieve your current credit balance at any time via GET /wallet/balance:
The balance field is returned as a string to preserve decimal precision. Parse it with your language’s decimal or arbitrary-precision numeric type if you need to do arithmetic.
If your balance is too low to cover the cost of a generation, POST /generate returns a 402 response with the error code insufficient_credits. Top up your wallet via the estudjo dashboard before retrying.

Wallet Balance

Retrieve your current prepaid credit balance via the API.