{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/faceabot-com/json-schema/faceabot-com-capacity-listing-schema.json",
  "title": "CapacityListing",
  "x-generated": "2026-11-07",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/faceabot-com-openapi.json#/components/schemas/CapacityListing",
  "type": "object",
  "required": [
    "schemaVersion",
    "resourceId",
    "ownerId",
    "kind",
    "displayName",
    "rights",
    "availability",
    "minimumPrice",
    "execution"
  ],
  "properties": {
    "schemaVersion": {
      "type": "string",
      "const": "faceabot-capacity/1.0"
    },
    "resourceId": {
      "type": "string"
    },
    "ownerId": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "enum": [
        "gpu",
        "cpu",
        "mobile-node",
        "drawer-node",
        "computer",
        "server",
        "hosted-open-model",
        "specialized-agent",
        "storage",
        "bandwidth",
        "authorized-api",
        "provider-authorized-subscription"
      ]
    },
    "displayName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 160
    },
    "rights": {
      "type": "object",
      "required": [
        "controlBasis",
        "authorizedToOffer",
        "termsReviewed",
        "humanConsent"
      ],
      "properties": {
        "controlBasis": {
          "type": "string",
          "enum": [
            "owned",
            "leased-with-resale-rights",
            "provider-authorized"
          ]
        },
        "authorizedToOffer": {
          "type": "boolean"
        },
        "termsReviewed": {
          "type": "boolean"
        },
        "humanConsent": {
          "type": "boolean"
        },
        "providerAuthorization": {
          "type": "object",
          "additionalProperties": true
        }
      }
    },
    "availability": {
      "type": "object",
      "required": [
        "percentage",
        "quantity",
        "unit",
        "schedule"
      ],
      "properties": {
        "percentage": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 100
        },
        "quantity": {
          "type": "number",
          "exclusiveMinimum": 0
        },
        "unit": {
          "type": "string",
          "enum": [
            "hour",
            "minute",
            "request",
            "page",
            "token",
            "gigabyte",
            "job"
          ]
        },
        "schedule": {
          "type": "object",
          "required": [
            "timezone",
            "start",
            "end"
          ],
          "properties": {
            "timezone": {
              "type": "string"
            },
            "start": {
              "type": "string"
            },
            "end": {
              "type": "string"
            }
          }
        }
      }
    },
    "minimumPrice": {
      "type": "object",
      "required": [
        "amount",
        "currency",
        "unit"
      ],
      "properties": {
        "amount": {
          "type": "number",
          "minimum": 0
        },
        "currency": {
          "type": "string",
          "pattern": "^[A-Z]{3}$"
        },
        "unit": {
          "type": "string"
        }
      }
    },
    "execution": {
      "type": "object",
      "required": [
        "location",
        "isolated",
        "commercialUseAllowed",
        "protocols"
      ],
      "properties": {
        "location": {
          "type": "string"
        },
        "isolated": {
          "type": "boolean"
        },
        "commercialUseAllowed": {
          "type": "boolean"
        },
        "protocols": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string",
            "enum": [
              "https",
              "mcp",
              "a2a"
            ]
          }
        }
      }
    }
  }
}