Every Plune AI credit grant of the project’s plan owner, with what each draft spent
const url = 'https://beta-api.plune.ai/v1/settings/ai/credits/history';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://beta-api.plune.ai/v1/settings/ai/credits/history \ --header 'Authorization: Bearer <token>'#1427 (frame 05, Settings → AI). Each grant with its amount, used, left, valid-until and whether it has expired; and the drafts paid from them, a failed or aborted one shown as refunded. A company’s credits are pooled over its projects: a draft of another project shows its credits and state, never its case. An owner or a member reads it; a reader gets 403.
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”The history
#1427 (frame 05): every grant of the plan’s owner, newest first (up to 100), and the drafts that spent them (up to 1 000, newest first).
object
object
object
The credits of its drafts in any state but failed or aborted (one still running holds its credit).
amount less used.
Past its end (a month’s: no longer usable), so what is left of it cannot be spent.
pack: the provider it was paid through; else null.
month: the plan that paid for it; else null.
month: the paid seats it was granted for (Free and Personal: 1); else null.
manual: the operator’s words on it; else null. Who granted it is not shown here.
object
failed or aborted: its credits came back.
Only for a draft of this project; a draft of another project of the plan shows null.
The draft’s project, for this project and for another of the plan the caller is a member of; else null.
As projectId.
Example
{ "subject": { "kind": "user", "id": "u-owner1" }, "grants": [ { "id": "g-1", "reason": "pack", "amount": 1000, "used": 2, "left": 998, "validFrom": "2026-09-16T09:12:04.151Z", "validUntil": "2027-09-16T09:12:04.151Z", "expired": false } ], "calls": [ { "id": "call-2", "grantId": "g-1", "at": "2026-09-16T09:12:04.151Z", "credits": 1, "state": "failed", "refunded": true, "projectId": "p-1", "testCaseId": "tc-1" }, { "id": "call-1", "grantId": "g-1", "at": "2026-09-16T09:12:04.151Z", "credits": 2, "state": "accepted", "refunded": false, "projectId": null, "testCaseId": null } ]}No / invalid token or session
A reader asked
object
Example
{ "error": "AI settings are not visible to a reader"}Rate-limited: the per-route throttle, or the per-minute request limit of the plan an API token counts by (#1442; the body names the plan, #2092). Retry-After carries the seconds until the window rolls over.
object
Example generated
{ "error": "example"}Headers
Section titled “Headers ”Seconds until the window rolls over
This server keeps no credits ledger
object
Example
{ "error": "AI platform not configured — contact your operator"}