- Docs
- API reference
- Balance & usage
Balance and usage
GET
https://api.airoutly.com/v1/dashboard/billing/subscriptionCheck a key's limit and spend from code, in the format older OpenAI clients and dashboards expect. For your account balance and per-request detail, use the console.
Balance
curl
curl https://api.airoutly.com/v1/dashboard/billing/subscription \
-H "Authorization: Bearer $AIROUTLY_API_KEY"200 OK
{
"object": "billing_subscription",
"has_payment_method": true,
"soft_limit_usd": 20,
"hard_limit_usd": 20,
"system_hard_limit_usd": 20,
"access_until": 0
}hard_limit_usd is the key’s total limit in USD (spent plus remaining), not your account balance. A key with no spend limit returns 100000000. access_until is the key’s expiry as a Unix timestamp, or 0 if it never expires.
Usage
curl
curl "https://api.airoutly.com/v1/dashboard/billing/usage" \
-H "Authorization: Bearer $AIROUTLY_API_KEY"200 OK
{ "object": "list", "total_usage": 231.5 }total_usage is what the key has spent so far, in US cents (231.5 = $2.315).
Date rangesThe
start_date and end_date parameters are accepted for compatibility but don’t filter the result. For daily spend, use Usage logs in the console.The same endpoints also answer at /dashboard/billing/subscription and /dashboard/billing/usage, without /v1.