{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mediacaption-api/json-schema/mediacaption-api-balance-response-schema.json",
  "title": "BalanceResponse",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mediacaption-api-balance-api-openapi.yml#/components/schemas/BalanceResponse",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "balance"
  ],
  "properties": {
    "balance": {
      "$ref": "#/$defs/CreditBalance"
    }
  },
  "$defs": {
    "CreditBalance": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "credits",
        "subscriptionCredits",
        "bundleCredits",
        "monthlyCreditLimit",
        "monthlyCreditsRenewAt"
      ],
      "properties": {
        "credits": {
          "type": "integer",
          "description": "Total spendable credits across subscription and bundle pools."
        },
        "subscriptionCredits": {
          "type": "integer",
          "description": "Credits from the active subscription grant."
        },
        "bundleCredits": {
          "type": "integer",
          "description": "Purchased or granted credits that do not expire through subscription renewal."
        },
        "monthlyCreditLimit": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Included monthly subscription credits, or null when no active subscription limit is available."
        },
        "monthlyCreditsRenewAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "Subscription credit renewal timestamp, or null when renewal details are unavailable."
        }
      }
    }
  }
}