GET
/api/v1/balanceBalance
See what's left, and what you've spent.
Read your balance from your own server, so your team hears about a low balance before your users do.
- Read it from your serverWarn your team before it runs out
- Or set an alertIn the console, under Usage & Billing
- Or top up automaticallyAuto top-up, also in the console
curl https://api.kreatorsfactory.com/api/v1/balance \ -H "Authorization: Bearer $KREATORSFACTORY_API_KEY"How it works
Read your balance from your own server, so your team hears about a low balance before your users do.
Response fields
| Field | Type | Required | Description |
|---|---|---|---|
balance_usd | number | No | What's available now. |
total_spent_usd | number | No | Everything spent on this account. |
total_topped_up_usd | number | No | Everything added to it. |
spent_this_week_usd | number | No | Spent since Monday, 00:00 UTC. |
spent_this_month_usd | number | No | Spent since the 1st of this month, UTC. |
spent_this_year_usd | number | No | Spent since 1 January, UTC. |
Response
Response200
{ "balance_usd": 84.20, "total_spent_usd": 15.80, "total_topped_up_usd": 100.00, "spent_this_week_usd": 4.10, "spent_this_month_usd": 15.80, "spent_this_year_usd": 15.80}Money is in US dollars. Times are ISO 8601, in UTC.
Errors
Every error arrives as {"error": {"code", "message"}}. Branch on code; the message may change. All errors.
| HTTP | Code | What it means |
|---|---|---|
| 401 | unauthorized | Missing, unknown or revoked key. |