{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/buildworkpro-com/json-schema/buildworkpro-com-usage-response-schema.json",
  "title": "UsageResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/buildworkpro-com-observability-api-openapi.yml#/components/schemas/UsageResponse",
  "type": "object",
  "properties": {
    "tenant": {
      "type": "object",
      "properties": {
        "limit": {
          "type": "integer"
        },
        "used": {
          "type": "integer"
        },
        "remaining": {
          "type": "integer"
        },
        "resetSeconds": {
          "type": "integer"
        },
        "windowSeconds": {
          "type": "integer"
        }
      },
      "required": [
        "limit",
        "used",
        "remaining",
        "resetSeconds",
        "windowSeconds"
      ],
      "description": "Tenant-wide cost-weighted budget (sliding hour window)"
    },
    "apiKey": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "limit": {
          "type": "integer"
        },
        "used": {
          "type": "integer"
        },
        "remaining": {
          "type": "integer"
        },
        "resetSeconds": {
          "type": "integer"
        },
        "windowSeconds": {
          "type": "integer"
        }
      },
      "required": [
        "limit",
        "used",
        "remaining",
        "resetSeconds",
        "windowSeconds"
      ],
      "description": "Per-API-key request limit (sliding minute window). Null when the caller is OAuth/refresh-token authenticated (not an API key)."
    }
  },
  "required": [
    "tenant",
    "apiKey"
  ]
}