{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/audiopod-ai/json-schema/audiopod-ai-usage-summary-schema.json",
  "title": "UsageSummary",
  "description": "Pre-aggregated usage stats for the usage-logs dashboard.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/audiopod-ai-credits-api-openapi.yml#/components/schemas/UsageSummary",
  "properties": {
    "this_month_usage": {
      "type": "integer",
      "title": "This Month Usage",
      "default": 0
    },
    "this_month_subscription_usage": {
      "type": "integer",
      "title": "This Month Subscription Usage",
      "default": 0
    },
    "this_month_payg_usage": {
      "type": "integer",
      "title": "This Month Payg Usage",
      "default": 0
    },
    "last_month_usage": {
      "type": "integer",
      "title": "Last Month Usage",
      "default": 0
    },
    "total_jobs": {
      "type": "integer",
      "title": "Total Jobs",
      "default": 0
    },
    "completed_jobs_lifetime": {
      "type": "integer",
      "title": "Completed Jobs Lifetime",
      "default": 0
    },
    "top_services": {
      "items": {
        "$ref": "#/$defs/TopService"
      },
      "type": "array",
      "title": "Top Services"
    },
    "timezone": {
      "type": "string",
      "title": "Timezone",
      "default": "UTC"
    }
  },
  "type": "object",
  "$defs": {
    "TopService": {
      "properties": {
        "service_type": {
          "type": "string",
          "title": "Service Type"
        },
        "credits_used": {
          "type": "integer",
          "title": "Credits Used"
        }
      },
      "type": "object",
      "required": [
        "service_type",
        "credits_used"
      ],
      "title": "TopService"
    }
  }
}