{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nowgetitdone-com/json-schema/nowgetitdone-com-usage-schema.json",
  "title": "Usage",
  "description": "The organization's consumption against its plan for the current billing period, plus the burst policy.",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nowgetitdone-com-openapi.yml#/components/schemas/Usage",
  "type": "object",
  "properties": {
    "plan": {
      "type": "string",
      "enum": [
        "FREE",
        "PRO",
        "TEAM"
      ],
      "description": "The organization's current plan tier."
    },
    "period_start": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
      "description": "Start of the current billing period, ISO-8601 UTC. Paid plans anchor at their subscription renewal; free plans at the first of the calendar month."
    },
    "period_end": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
      "description": "End of the current billing period, ISO-8601 UTC — when period meters reset."
    },
    "meters": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/UsageMeter"
      },
      "description": "Per-meter consumption for the current period."
    },
    "burst": {
      "type": "object",
      "properties": {
        "per_minute_limit": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "Requests each individual credential may make per minute before 429 rate_limited."
        }
      },
      "required": [
        "per_minute_limit"
      ],
      "additionalProperties": false,
      "description": "The per-credential burst policy (separate from period quotas; every key/token gets its own window)."
    }
  },
  "required": [
    "plan",
    "period_start",
    "period_end",
    "meters",
    "burst"
  ],
  "additionalProperties": false,
  "$defs": {
    "UsageMeter": {
      "type": "object",
      "properties": {
        "meter": {
          "type": "string",
          "enum": [
            "api_calls"
          ],
          "description": "Which allowance this entry reports."
        },
        "used": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991,
          "description": "Units consumed so far in the current period."
        },
        "limit": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "The plan's allowance for this meter per period."
        },
        "remaining": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991,
          "description": "Units left before requests answer 429 quota_exhausted."
        }
      },
      "required": [
        "meter",
        "used",
        "limit",
        "remaining"
      ],
      "additionalProperties": false,
      "description": "Consumption against one plan allowance."
    }
  }
}