{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sendmux-ai/json-schema/sendmux-ai-balance-response-schema.json",
  "title": "BalanceResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sendmux-ai-billing-api-openapi.yml#/components/schemas/BalanceResponse",
  "allOf": [
    {
      "$ref": "#/$defs/SuccessEnvelope"
    },
    {
      "properties": {
        "data": {
          "$ref": "#/$defs/Balance"
        },
        "meta": {
          "$ref": "#/$defs/ResponseMeta"
        }
      },
      "required": [
        "data"
      ],
      "type": "object"
    }
  ],
  "unevaluatedProperties": false,
  "$defs": {
    "Balance": {
      "additionalProperties": false,
      "properties": {
        "auto_topup": {
          "additionalProperties": false,
          "properties": {
            "amount": {
              "type": [
                "string",
                "null"
              ]
            },
            "enabled": {
              "type": "boolean"
            },
            "monthly_limit": {
              "type": [
                "string",
                "null"
              ]
            },
            "monthly_used": {
              "type": "string"
            },
            "threshold": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "enabled",
            "threshold",
            "amount",
            "monthly_limit",
            "monthly_used"
          ],
          "type": "object"
        },
        "balance": {
          "description": "Current spendable balance",
          "type": "string"
        },
        "balance_consumed": {
          "type": "string"
        },
        "balance_purchased": {
          "type": "string"
        },
        "currency": {
          "enum": [
            "USD"
          ],
          "type": "string"
        }
      },
      "required": [
        "balance",
        "balance_purchased",
        "balance_consumed",
        "currency",
        "auto_topup"
      ],
      "type": "object"
    },
    "ResponseMeta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        }
      },
      "required": [
        "request_id"
      ],
      "type": "object"
    },
    "SuccessEnvelope": {
      "properties": {
        "meta": {
          "additionalProperties": {},
          "properties": {},
          "type": "object"
        },
        "ok": {
          "enum": [
            true
          ],
          "type": "boolean"
        }
      },
      "required": [
        "ok",
        "meta"
      ],
      "type": "object"
    }
  }
}