Get credit balance
get_creditsCurrent credit balance, and optionally the recent ledger. Every ledger entry carries apiKeyId/apiKeyName so you can see exactly what THIS key spent. Check the balance before proposing any paid generation. When the balance will not cover what the user wants, say what IS affordable rather than only that they are short — "1200 for all three animations, you have 900, so two now or top up for all three" is the useful answer. Two different walls exist and they need OPPOSITE advice: running out of BALANCE is fixed by buying credits (the 402 carries a topUpUrl — send that link, never quote prices, they change), while a free account may instead have wallet balance but no rolling allowance — get_credits reports its freeCreditLimit. If needed <= limit, wait for the non-null resetsAt; if needed > limit, resetsAt is null because waiting can never make that unchanged request fit. Report that and never reduce or split work without fresh user approval. freeCreditLimit.firstAnimationAllowance reports whether the one activation exception is still available: exactly one fresh playable character animation plus required setup, at most 1000 credits, before two recent net-paid generation jobs and before any successful playable animation. Explicit turn/turn_* rotations, reuse, edit, mirror, and multi-animation requests do not qualify; a failed fully-refunded claim is reusable only if no playable animation was produced. Never split or reshape work to manufacture eligibility. An eligible reset, or completing any plan/pack purchase, clears that wall. hitting the key's DAILY SPEND CAP is not a money problem at all — the credits are already in the account, and the fixes are raising the cap or waiting for resetsAt. Never suggest a purchase for a cap trip. If the user asks HOW to raise the cap: the 403 carries capSettingsUrl — give them that link and tell them to edit the key there. YOU cannot change it, by design: the cap edit needs a logged-in session and is unreachable with an API key, because a key that could raise its own cap would not be a cap. Do not retry hoping it passes, and do not ask them to paste credentials.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max items to return (default 100, max 500). | |
| apiKeyId | No | Filter ledger entries to one key (UUID). | |
| includeLedger | No | Also return recent ledger entries. |