Pro API: balance, caps and trained characters
Two read routes, always allowed whatever the key's permissions, plus the activity log kept in the app.
Balance and caps
GET /credits
{ "balance": 1830, "licenseId": "lic_...", "key": "k_1a2b3c4d",
"limits": { "concurrent": 2, "perMinute": 60, "perDay": 0 }, "running": 1 }
| Field | Meaning |
|---|---|
balance | Credits left. null when the balance is unknown (test environment). |
licenseId | The licence this key belongs to. |
key | The key's public identifier, safe to log. Never the secret. |
limits.concurrent | Renders running at once, 2 by default. |
limits.perMinute | Submissions per minute, 60 by default. |
limits.perDay | Daily credit cap you set on the key. 0 means no cap. |
running | Renders from this key still waiting to be collected. |
This is the cheapest call in the API and the right one to check a key works.
Trained characters
GET /loras
{ "image": [ { "name": "megan_krea2", "trigger": "megan", "base": "krea2", "size": 0 } ],
"video": [ { "name": "megan_ltx", "trigger": "megan", "size": 0 } ] }
Pass name as lora, taking it from the image list for images and the video list for
videos, and put its trigger in the prompt, otherwise the character will not appear. A
character that does not belong to the account answers 403 lora_inconnu.
Training a character is not exposed by the API yet. It happens in the app, and the result shows up here.
Activity
The app keeps the log of every render your keys have made (date, key, type, cost, status) and the consumption per key, under Settings > API > Activity.
That is also where you revoke a key that has been leaking, without touching the others.