{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/beatra-ai/json-schema/beatra-ai-video-capability-detail-schema.json",
  "title": "VideoCapabilityDetail",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/beatra-ai-catalog-api-openapi.yml#/components/schemas/VideoCapabilityDetail",
  "properties": {
    "capability": {
      "type": "string",
      "enum": [
        "text_to_video",
        "image_to_video",
        "reference_to_video",
        "frames_to_video",
        "video_edit",
        "video_extend"
      ],
      "title": "Capability"
    },
    "endpoint": {
      "type": "string",
      "title": "Endpoint"
    },
    "input_modality": {
      "type": "string",
      "title": "Input Modality"
    },
    "output_modality": {
      "type": "string",
      "const": "video",
      "title": "Output Modality",
      "default": "video"
    },
    "execution_mode": {
      "type": "string",
      "const": "async",
      "title": "Execution Mode",
      "default": "async"
    },
    "description": {
      "type": "string",
      "title": "Description"
    },
    "status": {
      "type": "string",
      "enum": [
        "available",
        "unavailable"
      ],
      "title": "Status"
    },
    "auto": {
      "$ref": "#/$defs/VideoAutoSelectionCard"
    },
    "models": {
      "items": {
        "$ref": "#/$defs/VideoModelCard"
      },
      "type": "array",
      "title": "Models"
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "capability",
    "endpoint",
    "input_modality",
    "description",
    "status",
    "auto",
    "models"
  ],
  "$defs": {
    "VideoAspectCard": {
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "explicit_control",
            "source_derived",
            "upstream_fixed",
            "unsupported"
          ],
          "title": "Mode"
        },
        "accepts_explicit_value": {
          "type": "boolean",
          "title": "Accepts Explicit Value"
        },
        "supported_values": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Supported Values"
        },
        "default": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Default"
        },
        "source_role": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source Role"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "mode",
        "accepts_explicit_value",
        "supported_values",
        "default",
        "source_role"
      ],
      "title": "VideoAspectCard"
    },
    "VideoAutoSelectionCard": {
      "properties": {
        "request_dependent": {
          "type": "boolean",
          "const": true,
          "title": "Request Dependent",
          "description": "Auto selection evaluates the complete request rather than resolving to one fixed model.",
          "default": true
        },
        "default_for_omitted_request": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Default For Omitted Request",
          "description": "First live candidate for a request that omits all optional selection controls."
        },
        "candidate_order": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Candidate Order",
          "description": "Ordered live public candidates; auto selects the first candidate eligible for the request."
        },
        "persisted_selection_field": {
          "type": "string",
          "const": "resolved_model",
          "title": "Persisted Selection Field",
          "description": "Task field that records the concrete model selected during admission.",
          "default": "resolved_model"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "default_for_omitted_request",
        "candidate_order"
      ],
      "title": "VideoAutoSelectionCard"
    },
    "VideoBillableQuantityCard": {
      "properties": {
        "basis": {
          "type": "string",
          "enum": [
            "admitted_output_duration_seconds",
            "final_output_duration_seconds",
            "reference_video_seconds",
            "capped_reference_video_seconds",
            "source_video_seconds",
            "source_and_reference_video_seconds"
          ],
          "title": "Basis"
        },
        "counted_inputs": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Counted Inputs"
        },
        "aggregate_max_seconds": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
            },
            {
              "type": "null"
            }
          ],
          "title": "Aggregate Max Seconds"
        },
        "per_video_cap_seconds_by_video_count": {
          "anyOf": [
            {
              "additionalProperties": {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Per Video Cap Seconds By Video Count"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "basis",
        "counted_inputs"
      ],
      "title": "VideoBillableQuantityCard"
    },
    "VideoDefaultsCard": {
      "properties": {
        "resolution": {
          "type": "string",
          "title": "Resolution"
        },
        "duration": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Duration"
        },
        "aspect_ratio": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Aspect Ratio"
        },
        "generate_audio": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Generate Audio"
        },
        "watermark": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Watermark"
        },
        "web_search": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Web Search"
        },
        "return_last_frame": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Return Last Frame"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "resolution",
        "duration"
      ],
      "title": "VideoDefaultsCard"
    },
    "VideoDurationCard": {
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "explicit_control",
            "source_derived",
            "final_duration",
            "upstream_fixed"
          ],
          "title": "Mode"
        },
        "required": {
          "type": "boolean",
          "title": "Required"
        },
        "explicit_override": {
          "type": "boolean",
          "title": "Explicit Override"
        },
        "supports_auto": {
          "type": "boolean",
          "title": "Supports Auto",
          "default": false
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "mode",
        "required",
        "explicit_override"
      ],
      "title": "VideoDurationCard"
    },
    "VideoModelCard": {
      "properties": {
        "schema_version": {
          "type": "string",
          "const": "video-interface.v1",
          "title": "Schema Version",
          "default": "video-interface.v1"
        },
        "model": {
          "type": "string",
          "title": "Model"
        },
        "display_name": {
          "type": "string",
          "title": "Display Name"
        },
        "owned_by": {
          "type": "string",
          "const": "beatra",
          "title": "Owned By",
          "default": "beatra"
        },
        "capability": {
          "type": "string",
          "enum": [
            "text_to_video",
            "image_to_video",
            "reference_to_video",
            "frames_to_video",
            "video_edit",
            "video_extend"
          ],
          "title": "Capability"
        },
        "status": {
          "type": "string",
          "const": "available",
          "title": "Status",
          "default": "available"
        },
        "controls": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Controls"
        },
        "output_formats": {
          "items": {
            "type": "string",
            "enum": [
              "mp4",
              "mov"
            ]
          },
          "type": "array",
          "minItems": 1,
          "title": "Output Formats"
        },
        "skus": {
          "items": {
            "$ref": "#/$defs/VideoSKUCard"
          },
          "type": "array",
          "minItems": 1,
          "title": "Skus"
        },
        "defaults": {
          "$ref": "#/$defs/VideoDefaultsCard"
        },
        "aspect": {
          "$ref": "#/$defs/VideoAspectCard"
        },
        "duration": {
          "$ref": "#/$defs/VideoDurationCard"
        },
        "prompt_required": {
          "type": "boolean",
          "title": "Prompt Required"
        },
        "prompt_max_units": {
          "type": "integer",
          "exclusiveMinimum": 0.0,
          "title": "Prompt Max Units"
        },
        "prompt_unit": {
          "type": "string",
          "enum": [
            "characters",
            "happyhorse_weighted"
          ],
          "title": "Prompt Unit"
        },
        "reference_kinds": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Reference Kinds"
        },
        "reference_roles": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Reference Roles"
        },
        "max_references": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Max References"
        },
        "reference_limits": {
          "anyOf": [
            {
              "$ref": "#/$defs/VideoReferenceLimitsCard"
            },
            {
              "type": "null"
            }
          ]
        },
        "input_combinations": {
          "items": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "type": "array",
          "title": "Input Combinations"
        },
        "output_audio": {
          "anyOf": [
            {
              "$ref": "#/$defs/VideoOutputAudioCard"
            },
            {
              "type": "null"
            }
          ]
        },
        "media": {
          "additionalProperties": true,
          "type": "object",
          "title": "Media"
        },
        "pricing": {
          "items": {
            "$ref": "#/$defs/VideoPricingOption"
          },
          "type": "array",
          "minItems": 1,
          "title": "Pricing"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "model",
        "display_name",
        "capability",
        "controls",
        "output_formats",
        "skus",
        "defaults",
        "aspect",
        "duration",
        "prompt_required",
        "prompt_max_units",
        "prompt_unit",
        "reference_kinds",
        "reference_roles",
        "max_references",
        "media",
        "pricing"
      ],
      "title": "VideoModelCard"
    },
    "VideoOutputAudioCard": {
      "properties": {
        "included": {
          "type": "boolean",
          "title": "Included"
        },
        "channel_layout": {
          "anyOf": [
            {
              "type": "string",
              "const": "stereo"
            },
            {
              "type": "null"
            }
          ],
          "title": "Channel Layout"
        },
        "source": {
          "anyOf": [
            {
              "type": "string",
              "const": "model_generated"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "included"
      ],
      "title": "VideoOutputAudioCard"
    },
    "VideoPricingOption": {
      "properties": {
        "meter": {
          "type": "string",
          "enum": [
            "input_video_second",
            "output_video_second"
          ],
          "title": "Meter"
        },
        "unit": {
          "type": "string",
          "const": "second",
          "title": "Unit",
          "default": "second"
        },
        "unit_price_credits": {
          "type": "string",
          "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
          "title": "Unit Price Credits"
        },
        "scale": {
          "type": "string",
          "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
          "title": "Scale"
        },
        "resolution": {
          "type": "string",
          "title": "Resolution"
        },
        "duration_seconds": {
          "items": {
            "type": "integer"
          },
          "type": "array",
          "minItems": 1,
          "title": "Duration Seconds"
        },
        "applicability": {
          "type": "string",
          "enum": [
            "video_input_present",
            "always"
          ],
          "title": "Applicability"
        },
        "billable_quantity": {
          "$ref": "#/$defs/VideoBillableQuantityCard"
        },
        "estimate_formula": {
          "type": "string",
          "const": "(unit_price_credits * billable_quantity) / scale",
          "title": "Estimate Formula",
          "default": "(unit_price_credits * billable_quantity) / scale"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "meter",
        "unit_price_credits",
        "scale",
        "resolution",
        "duration_seconds",
        "applicability",
        "billable_quantity"
      ],
      "title": "VideoPricingOption"
    },
    "VideoReferenceLimitsCard": {
      "properties": {
        "image": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Image"
        },
        "video": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Video"
        },
        "audio": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Audio"
        },
        "video_total_seconds": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
            },
            {
              "type": "null"
            }
          ],
          "title": "Video Total Seconds"
        },
        "audio_total_seconds": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
            },
            {
              "type": "null"
            }
          ],
          "title": "Audio Total Seconds"
        },
        "audio_requires_image_or_video": {
          "type": "boolean",
          "title": "Audio Requires Image Or Video",
          "default": false
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "image",
        "video",
        "audio"
      ],
      "title": "VideoReferenceLimitsCard"
    },
    "VideoSKUCard": {
      "properties": {
        "resolution": {
          "type": "string",
          "title": "Resolution"
        },
        "duration_seconds": {
          "type": "integer",
          "title": "Duration Seconds"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "resolution",
        "duration_seconds"
      ],
      "title": "VideoSKUCard"
    }
  }
}