Skip to content

GET /api/agent/status

Exempt from daily quota counting. Call this on session start (or before a billing-sensitive op) to fetch full subscription, quota, key, and environment in one place.

Auth

  • Required scope: any authenticated key
  • Header: Authorization: Bearer cr_live_<prefix>_<secret>

Responses

200 — Context object

Body: StatusResponse

FieldTypeRequiredNotes
subscriptionobjectyes
quotaobjectyesLegacy per-org daily quota bucket (retained for backwards-compat). For the query-credit model — credits remaining AND minutes until they free up — read the usage block instead.
usageobjectnoRolling-5h query-credit window for the key's (user, billing-account-of-target-org). remaining is credits left; nextCreditInMinutes is the wait until the FIRST credit frees (0 when under cap — a credit is available now); fullResetInMinutes is the wait until EVERY credit returns (0 for an empty window); windowResetAt is the ISO instant the window fully empties. The same nextCreditInMinutes value is mirrored on the X-CashRunway-Reset-Minutes response header. null when the key has no billable seat or the target org has no owning billing account (a status probe still succeeds; usage is simply unresolvable).
keyobjectyes
environmentstring · one of dev prodyes
billingAlertBillingAlertno
xeroAlertXeroAlertno

401 — Missing / invalid bearer

Body: ErrorResponse

FieldTypeRequiredNotes
errorstringyes

Response headers

Every successful response carries X-CashRunway-Subscription, X-CashRunway-Plan, X-CashRunway-Quota-Remaining, and X-CashRunway-Quota-Reset. Trialing subscriptions also include X-CashRunway-Trial-Days-Remaining. See the overview for details.

Released under a proprietary license.