Skip to content
kenari.

Account quota

Read how much of your plan quota and coupon budget is left, in whole Rupiah, so an agent or script can check before it starts a long job. The endpoint is specific to kenari and has no OpenAI or Anthropic equivalent.

GET /v1/account/quota

The endpoint takes no query parameters and no body. It needs an API key in the Authorization header.

HeaderRequiredDescription
AuthorizationyesBearer kn-.... A shared API key and a restricted key are refused. See Authentication and API keys.

The response has two fields, plan and coupon. Each is an object, or null when it does not apply.

FieldTypeDescription
planobject or nullYour active plan. null when you have never subscribed, the plan has ended, or the plan is no longer offered.
plan.namestringThe plan name.
plan.windowsobjectThe quota windows that have a ceiling. Possible keys are five_hour, week and month. A window with no ceiling is left out, so the object can be empty.
plan.windows.<key>.used_rpintegerRupiah used in this window, rounded up.
plan.windows.<key>.remaining_rpintegerRupiah left in this window, rounded down and never below 0.
plan.windows.<key>.resets_atstringWhen this rolling window resets, in RFC 3339 UTC.
couponobject or nullThe active coupon. null when you have none or it has expired. It is reported separately from the plan, so you can have a coupon without a plan.
coupon.namestringThe coupon name.
coupon.used_rpintegerRupiah used from the coupon, rounded up.
coupon.remaining_rpinteger or nullRupiah left on the coupon: the budget rounded down to whole Rupiah, minus used_rp, and never below 0. null when the coupon has no spending limit.
coupon.expires_atstringWhen the coupon expires, in RFC 3339 UTC.
coupon.scope_modelsarray of stringsThe model ids the coupon covers.
{
"plan": {
"name": "Indie",
"windows": {
"week": {
"used_rp": 12000,
"remaining_rp": 63000,
"resets_at": "2026-10-13T07:12:00Z"
},
"month": {
"used_rp": 12000,
"remaining_rp": 288000,
"resets_at": "2026-10-30T07:12:00Z"
}
}
},
"coupon": null
}

For how windows, coupons and covered models work, see Subscriptions.

Terminal window
curl https://kenari.id/v1/account/quota \
-H "Authorization: Bearer $KENARI_API_KEY"
import os
import requests
response = requests.get(
"https://kenari.id/v1/account/quota",
headers={"Authorization": f"Bearer {os.environ['KENARI_API_KEY']}"},
)
response.raise_for_status()
quota = response.json()
for name, window in (quota["plan"] or {}).get("windows", {}).items():
print(name, window["remaining_rp"], window["resets_at"])
const response = await fetch("https://kenari.id/v1/account/quota", {
headers: { Authorization: `Bearer ${process.env.KENARI_API_KEY}` },
});
if (!response.ok) throw new Error(await response.text());
const quota = await response.json();
for (const [name, window] of Object.entries(quota.plan?.windows ?? {})) {
console.log(name, window.remaining_rp, window.resets_at);
}

The MCP tool kenari_quota returns the same plan and coupon data as plain text. See MCP server.

Reading your quota is free. See How billing works.

StatusCodeWhen
401NoneThe key is missing, invalid or expired. The body is a short plain-text message, not JSON.
403shared_key_not_allowedThe key is a shared API key. A shared key cannot read the owner’s quota.
403restricted_key_not_allowedThe key has a model restriction, a spend cap or a token cap. Use an unrestricted key from the account itself.
500internal_errorReading the quota failed in kenari. Retry once.

See Errors for the error format and the remaining codes.