Skip to main content

Overview

Returns subscription status and current daily/monthly usage for the active billing period.

Request

  • Method: GET
  • Path: /api/subscription/v1/usage
  • Auth: Authorization: Bearer <api_key> or x-api-key: <api_key>

Response

200 application/json. Timestamps are UNIX epoch milliseconds.
{
  "active": true,
  "limits": { "daily": 2000, "monthly": 60000 },
  "enforceDailyLimit": false,
  "daily": {
    "used": 5,
    "remaining": 1995,
    "percentUsed": 0.0025,
    "resetAt": 1738540800000
  },
  "monthly": {
    "used": 45,
    "remaining": 59955,
    "percentUsed": 0.00075,
    "resetAt": 1739404800000
  },
  "period": {
    "currentPeriodEnd": "2025-02-13T23:59:59.000Z"
  },
  "state": "active",
  "graceUntil": null
}
Fields
  • active — Whether the account is currently active for subscription usage.
  • limits.daily, limits.monthly — Configured daily/monthly allowance.
  • enforceDailyLimit — If true, access requires both daily AND monthly remaining > 0; if false, only monthly remaining is required.
  • daily.used, monthly.used — Usage units consumed in the current day/month window.
  • daily.remaining, monthly.remaining — Remaining allowance for each window.
  • daily.percentUsed, monthly.percentUsed — Decimal fraction in [0,1].
  • daily.resetAt, monthly.resetAt — Millisecond epoch when the window resets.
  • period.currentPeriodEnd — ISO timestamp for the end of the current billing period, if known.
  • state — One of active, grace, inactive.
  • graceUntil — ISO timestamp when grace access ends (if applicable).

Usage semantics

  • Usage units represent successful subscription‑covered operations (e.g., a completed generation). They are not tokens or dollar cost.
  • Daily window resets at the next UTC day start; monthly usage aligns to the subscription billing cycle when available.

Examples

curl -s \
  -H "Authorization: Bearer $NANOGPT_API_KEY" \
  https://nano-gpt.com/api/subscription/v1/usage | jq
I