API reference
Balance and key spend
Read available USD credit and reconcile the calling key’s charges.
Polling limits
Each key can read credits 60 times per minute. On 429 wait for the seconds in Retry-After. For automatic low-balance notifications use webhooks.
GET /v1/credits
cURL
curl "https://kavren.dev/v1/credits" \
-H "Authorization: Bearer $KAVREN_API_KEY"Example response · selected fields
{
"object": "credits",
"unit": "usd",
"balance": 10,
"reserved": 0.4,
"available": 9.6,
"key_limit": null,
"key_spent": 1.25,
"key_spent_since": null,
"unlimited": false
}The account balance includes open reservations. Available credit excludes them and respects the remaining daily key budget. For an unlimited account without a key budget, available is null. A valid key can read its balance at zero. The lookup places no hold.
Spend since a date
cURL
curl "https://kavren.dev/v1/credits?since=1793836800" \
-H "Authorization: Bearer $KAVREN_API_KEY"Send Unix seconds. The cutoff applies to the calling key’s settled usage by request start time. Balance and reserved credit remain account-wide. IP restrictions, revocation and expiration still apply.