API referenceUsage
List credit history
GET
Needs a key withusage:read
The credit ledger, newest first: grants (with their source), each workflow run (its estimate and what it actually cost, refunds of failed or cancelled results taken off), each generation made outside a run, and credits that expired (expire), were clawed back (reversal) or adjusted by staff (adjustment). Each line says which API key spent it (apiKey, null for the app); apiKeyId shows only one key's.
Requires scope usage:read.
apiKeyheader
x-api-key<token>An API key of your workspace (rmg_…), created in the web app. It acts for that workspace, not for a person, and keeps working when its creator leaves.
apiKeyId?stringOnly what this API key spent (its id).
Length
1 <= lengthlimit?integerRange
1 <= value <= 100Default
25offset?integerRange
0 <= valueDefault
0A page of the history.
application/json- response
entries*array<>hasMore*booleancurl -X GET 'https://api.remagica.com/api/v1/credits/history'Example Response
{ "entries": [ { "amount": 12, "apiKey": { "id": "a5614527-5b3d-4f60-8e2a-1d9c6b4f7e05", "name": "Autumn campaign" }, "createdAt": "2026-10-21T12:00:00.000Z", "estimated": 12, "expiresAt": "2026-10-21T12:00:00.000Z", "id": "a5614527-5b3d-4f60-8e2a-1d9c6b4f7e05", "kind": "grant", "model": "google/nano-banana-pro", "note": "string", "project": { "id": "a5614527-5b3d-4f60-8e2a-1d9c6b4f7e05", "name": "Autumn campaign" }, "refunded": 1, "runStatus": "string", "source": "starting", "user": { "id": "a5614527-5b3d-4f60-8e2a-1d9c6b4f7e05", "name": "Autumn campaign" } } ], "hasMore": true}