{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/youtubetranscriptapi-com/json-schema/youtubetranscriptapi-com-account-schema.json",
  "title": "Account",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/youtubetranscriptapi-com-openapi.json#/components/schemas/Account",
  "type": "object",
  "required": [
    "user_id",
    "plan",
    "plan_status",
    "credits"
  ],
  "properties": {
    "user_id": {
      "type": "string",
      "description": "Account ID."
    },
    "plan": {
      "type": "string",
      "enum": [
        "free",
        "monthly",
        "annual"
      ]
    },
    "plan_status": {
      "type": [
        "string",
        "null"
      ],
      "description": "Subscription status (active, on_hold, past_due, cancelled, expired…); null without a subscription."
    },
    "credits": {
      "type": "object",
      "required": [
        "spendable",
        "plan",
        "topup"
      ],
      "properties": {
        "spendable": {
          "type": "integer",
          "description": "What the API can spend now: top-up credits, plus plan credits while the plan allows them."
        },
        "plan": {
          "type": "integer",
          "description": "Plan credits, including any paused by a failed renewal."
        },
        "topup": {
          "type": "integer",
          "description": "Free and top-up credits. They never expire."
        }
      }
    }
  }
}