{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/scriptivox-com/json-schema/scriptivox-com-balance-schema.json",
  "title": "Balance",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scriptivox-com-openapi.json#/components/schemas/Balance",
  "type": "object",
  "required": [
    "balance_cents",
    "reserved_cents",
    "available_cents",
    "price_per_hour_cents",
    "auto_topup"
  ],
  "properties": {
    "balance_cents": {
      "type": "number",
      "description": "Total balance, in cents. Can be below zero after a refunded deposit."
    },
    "reserved_cents": {
      "type": "number",
      "description": "Held against in-progress transcriptions, in cents."
    },
    "available_cents": {
      "type": "number",
      "description": "balance_cents minus reserved_cents. Must be above zero to start a job."
    },
    "price_per_hour_cents": {
      "type": "number",
      "description": "Current price per hour of audio, in cents."
    },
    "estimated_hours_available": {
      "type": "number",
      "description": "available_cents divided by price_per_hour_cents."
    },
    "deposit_url": {
      "type": "string",
      "format": "uri",
      "description": "Where a human can add funds. Send a user here on a 402."
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "When the balance last changed. RFC 3339, UTC."
    },
    "auto_topup": {
      "type": "object",
      "title": "AutoTopup",
      "description": "Auto top-up, set in Add Funds or on the Billing page of the API dashboard. When on, each time available_cents falls below threshold_cents the saved card is charged amount_cents, one charge at a time. A top-up shows on a later call, not this one.",
      "required": [
        "enabled",
        "threshold_cents",
        "amount_cents"
      ],
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Whether auto top-up is on."
        },
        "threshold_cents": {
          "type": "integer",
          "description": "Top up when available_cents falls below this, in cents."
        },
        "amount_cents": {
          "type": "integer",
          "description": "How much each top-up adds, in cents."
        }
      }
    }
  }
}