{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/studio99-app/json-schema/studio99-app-usage-schema.json",
  "title": "Usage",
  "description": "Monthly allowance meter, returned on metered calls. Consumers of this API are billed in credits: 1 credit per variant returned by /generate, 1 credit per output from /render, 1 credit per library download.",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/studio99-app-openapi.json#/components/schemas/Usage",
  "type": "object",
  "properties": {
    "monthlyUsed": {
      "type": "integer",
      "description": "Credits used so far this billing month."
    },
    "monthlyLimit": {
      "type": "integer",
      "description": "Monthly credit allowance. -1 means uncapped (Enterprise contract or internal channel)."
    },
    "remaining": {
      "type": "integer",
      "description": "Credits left this month. -1 means uncapped."
    },
    "unit": {
      "type": "string",
      "enum": [
        "credits"
      ],
      "description": "Present when the credits model is enforced."
    },
    "creditsCharged": {
      "type": "integer",
      "description": "Credits debited by this call (credits model only)."
    },
    "license": {
      "type": "string",
      "enum": [
        "commercial",
        "preview-non-commercial"
      ],
      "description": "Licence that applies to the returned assets. Free-plan output is a watermarked preview with no commercial licence."
    }
  },
  "required": [
    "monthlyUsed",
    "monthlyLimit",
    "remaining"
  ]
}