{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pzero-studio/json-schema/pzero-studio-capacity-schema.json",
  "title": "Capacity",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pzero-studio-openapi.json#/components/schemas/Capacity",
  "type": "object",
  "properties": {
    "generatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "routableDiem": {
      "type": "string",
      "description": "Total routable DIEM across the eligible ladder"
    },
    "usdcToBuyAll": {
      "type": "string",
      "description": "USDC needed to clear that whole ladder at posted asks"
    },
    "cheapestPostedCents": {
      "type": [
        "integer",
        "null"
      ]
    },
    "prices": {
      "type": "array",
      "description": "Cheapest posted ask first",
      "items": {
        "type": "object",
        "properties": {
          "priceCentsPerDollar": {
            "type": "integer"
          },
          "routableDiem": {
            "type": "string"
          },
          "usdcToBuyAll": {
            "type": "string"
          }
        }
      }
    },
    "modalities": {
      "type": "object",
      "description": "DIEM is model-agnostic, so a modality gates on the catalog being priced for it, not on separate depth.",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "available": {
            "type": "boolean"
          },
          "liveModels": {
            "type": "integer"
          }
        }
      }
    }
  }
}