{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/svgai-org/json-schema/svgai-org-credit-balance-schema.json",
  "title": "CreditBalance",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/svgai-org-openapi.json#/components/schemas/CreditBalance",
  "type": "object",
  "required": [
    "object",
    "credits_remaining",
    "subscription_active",
    "api_access",
    "costs",
    "topup_url"
  ],
  "properties": {
    "object": {
      "type": "string",
      "const": "credit.balance"
    },
    "credits_remaining": {
      "type": "number",
      "description": "Available account balance."
    },
    "subscription_active": {
      "type": "boolean"
    },
    "api_access": {
      "type": "boolean",
      "description": "Whether the account has paid access for API/MCP generation and vectorization."
    },
    "api_access_message": {
      "type": "string",
      "description": "Explanation supplied when paid API access is unavailable."
    },
    "costs": {
      "type": "object",
      "required": [
        "generate_classic",
        "generate_ultra",
        "vectorize"
      ],
      "properties": {
        "generate_classic": {
          "type": "number",
          "description": "Classic generation cost per variation."
        },
        "generate_ultra": {
          "type": "number",
          "description": "Ultra generation cost per variation."
        },
        "vectorize": {
          "type": "number",
          "description": "Vectorization cost."
        }
      }
    },
    "topup_url": {
      "type": "string",
      "format": "uri"
    }
  }
}