{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aidemos-com/json-schema/aidemos-com-video-script-request-schema.json",
  "title": "VideoScriptRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aidemos-com-content-api-openapi.yml#/components/schemas/VideoScriptRequest",
  "properties": {
    "topic": {
      "$ref": "#/$defs/TopicIn"
    },
    "mode": {
      "type": "string",
      "enum": [
        "short",
        "long"
      ],
      "title": "Mode",
      "default": "short"
    },
    "target_duration_sec": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 1800.0,
          "minimum": 10.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Target Duration Sec",
      "description": "Requested length in seconds. Duration is independent of frame format; defaults to 28 for 9:16 and 120 for 16:9."
    },
    "page_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Page Url",
      "description": "Deprecated caller hint. The canonical public CTA is resolved server-side and is emitted only when the matching sip page is published."
    },
    "instructions": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Instructions"
    },
    "hook_style": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "auto",
            "result_number",
            "paradox",
            "myth_break",
            "head_to_head",
            "call_out",
            "stakes_first",
            "curiosity_artifact"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Hook Style",
      "description": "Researched hook pattern the chosen cold-open must use; auto/absent = writer's pick."
    },
    "angle": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "auto",
            "winner-with-caveat",
            "surprising-loser",
            "head-to-head-on-one-criterion",
            "the-gap-nobody-passed",
            "what-to-use-when",
            "one-input-two-results",
            "the-receipt"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Angle",
      "description": "Narrative angle for the script's spine; auto/absent = writer's pick."
    }
  },
  "type": "object",
  "required": [
    "topic"
  ],
  "$defs": {
    "TopicIn": {
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "tool",
            "ranking"
          ],
          "title": "Kind",
          "description": "'tool' (ref=tool slug) or 'ranking' (ref=research_task id)"
        },
        "ref": {
          "type": "string",
          "title": "Ref",
          "description": "Tool slug (kind=tool) or research_task id (kind=ranking)"
        }
      },
      "type": "object",
      "required": [
        "kind",
        "ref"
      ],
      "title": "TopicIn"
    }
  }
}