{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pricklymails-com/json-schema/pricklymails-com-wallet-balance-response-schema.json",
  "title": "WalletBalanceResponse",
  "description": "JSON response body for `GET /api/wallet`.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pricklymails-com-wallet-api-openapi.yml#/components/schemas/WalletBalanceResponse",
  "type": "object",
  "required": [
    "available",
    "reserved",
    "total",
    "updated_at",
    "avg_daily_spend"
  ],
  "properties": {
    "available": {
      "type": "integer",
      "format": "int32",
      "description": "Tokens available for immediate use.",
      "minimum": 0
    },
    "avg_daily_spend": {
      "type": "integer",
      "format": "int32",
      "description": "Mean daily spend (committed plus debited tokens) over the last 30 days, rounded down.\nDivide `available` by it to estimate the remaining runway.",
      "minimum": 0
    },
    "reserved": {
      "type": "integer",
      "format": "int32",
      "description": "Tokens reserved by in-flight jobs.",
      "minimum": 0
    },
    "total": {
      "type": "integer",
      "format": "int32",
      "description": "Total tokens (available + reserved), capped at 4294967295.",
      "minimum": 0
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp of the last balance update."
    }
  }
}