Credits API

Credit endpoints help account owners understand remaining generation capacity.

Get credits

bash
curl https://littledemo.com/api/v1/credits \ -H "Authorization: Bearer ld_live_xxx"

Purchase credits

bash
curl -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

bash
curl https://littledemo.com/api/v1/credits/auto-topoff \ -H "Authorization: Bearer ld_live_xxx"
bash
curl -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

bash
curl https://littledemo.com/api/v1/credits/transactions \ -H "Authorization: Bearer ld_live_xxx"
Ask a question... ⌘I