Credits API
Read credit balances, purchase packs, configure auto top-off, and inspect transactions.
Credits API
Credit endpoints help account owners understand remaining generation capacity.
Get credits
bashcurl https://littledemo.com/api/v1/credits \ -H "Authorization: Bearer ld_live_xxx"
Purchase credits
bashcurl -X POST https://littledemo.com/api/v1/credits/purchase \ -H "Authorization: Bearer ld_live_xxx" \ -H "Content-Type: application/json" \ -d '{"packId":"20"}'
Auto top-off
bashcurl https://littledemo.com/api/v1/credits/auto-topoff \ -H "Authorization: Bearer ld_live_xxx"
bashcurl -X PUT https://littledemo.com/api/v1/credits/auto-topoff \ -H "Authorization: Bearer ld_live_xxx" \ -H "Content-Type: application/json" \ -d '{"enabled":true,"packId":"20","threshold":3}'
Transactions
bashcurl https://littledemo.com/api/v1/credits/transactions \ -H "Authorization: Bearer ld_live_xxx"