GET
/v1/balance/historyList every balance movement
Lists every balance movement in reverse time order: charge, refund, topup, grant, and adjustment. Amounts are exact USD decimal strings, signed (a charge is negative): summing them with decimal arithmetic — not floats — reconciles the balance, and each entry carries balance_after_usd. This endpoint uses cursor pagination.
Request
bash
curl -X GET https://api.glasser.ai/v1/balance/history \
-H "Authorization: Bearer gl_..."Query parameters
limitstringoptionalcursorstringoptionalkindenumoptionalchargerefundtopupgrantadjustmentResponse
200dataobject[]requiredidstringrequiredkindenumrequiredchargerefundtopupgrantadjustmentamount_usdstringrequiredbalance_after_usdstringrequiredExact USD decimal string (min 2, max 6 decimals, one canonical spelling). Sum with decimal arithmetic or scale by 10^6 — never floats.
run_idstringrequireddescriptionstringrequiredcreated_atstring (ISO-8601)requiredISO-8601 UTC timestamp
next_cursorstringrequiredErrors
400validation_failedThe request does not satisfy the schema. details.issues lists the fields that failed, and details.location names the part of the request that carried them: Payload, Headers, Path, or Query.401unauthorizedThe API key is missing, malformed, revoked, or unknown.429rate_limitedThe rate limit is exceeded. error.retry_after_ms tells you how long to wait.500internal_errorThe server failed. The response body does not include internal details.Authentication
Requires Bearer authentication. The workspace is bound to the API key, and you cannot change it with a request header.
Authorization: Bearer gl_...Base URL: https://api.glasser.ai