{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentik-cc/json-schema/agentik-cc-wallet-balance-schema.json",
  "title": "WalletBalance",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentik-cc-openapi.yml#/components/schemas/WalletBalance",
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string"
    },
    "balance_usd": {
      "type": "number",
      "description": "Available paid credit in USD."
    },
    "amount_owed_usd": {
      "type": "number",
      "minimum": 0,
      "description": "Unpaid actual usage after settlement; present only for a negative paid balance. No automatic card charge."
    },
    "available_usd": {
      "type": "number",
      "description": "Spendable credit including eligible promotional credit, or zero while a paid amount is owed; actual-cost tools require paid credit."
    },
    "promo_balance": {
      "$ref": "#/$defs/PromoBalance"
    },
    "lifetime_topup_usd": {
      "type": "number"
    },
    "auto_recharge": {
      "type": "object",
      "additionalProperties": true
    },
    "free_tier": {
      "type": "object",
      "properties": {
        "used_today": {
          "type": "integer"
        },
        "limit_per_day": {
          "type": "integer"
        }
      }
    }
  },
  "$defs": {
    "PromoBalance": {
      "type": "object",
      "description": "Promotional credit is used first on eligible non-video calls up to max_call_usd. expires_at is the next lot expiry.",
      "properties": {
        "available_usd": {
          "type": "string"
        },
        "expires_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "max_call_usd": {
          "type": "string"
        }
      }
    }
  }
}