{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/openshorts-app/json-schema/openshorts-app-subtitle-request-schema.json",
  "title": "SubtitleRequest",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/openshorts-app-openapi.json#/components/schemas/SubtitleRequest",
  "properties": {
    "job_id": {
      "type": "string",
      "title": "Job Id"
    },
    "clip_index": {
      "type": "integer",
      "title": "Clip Index"
    },
    "position": {
      "type": "string",
      "title": "Position",
      "default": "bottom"
    },
    "font_size": {
      "type": "integer",
      "title": "Font Size",
      "default": 16
    },
    "font_name": {
      "type": "string",
      "title": "Font Name",
      "default": "Verdana"
    },
    "font_color": {
      "type": "string",
      "title": "Font Color",
      "default": "#FFFFFF"
    },
    "border_color": {
      "type": "string",
      "title": "Border Color",
      "default": "#000000"
    },
    "border_width": {
      "type": "integer",
      "title": "Border Width",
      "default": 2
    },
    "bg_color": {
      "type": "string",
      "title": "Bg Color",
      "default": "#000000"
    },
    "bg_opacity": {
      "type": "number",
      "title": "Bg Opacity",
      "default": 0.0
    },
    "style": {
      "type": "string",
      "title": "Style",
      "default": "classic"
    },
    "highlight_color": {
      "type": "string",
      "title": "Highlight Color",
      "default": "#FFD700"
    },
    "effect": {
      "type": "string",
      "title": "Effect",
      "default": "none"
    },
    "base_opacity": {
      "type": "number",
      "title": "Base Opacity",
      "default": 1.0
    },
    "uppercase": {
      "type": "boolean",
      "title": "Uppercase",
      "default": false
    },
    "reveal": {
      "type": "boolean",
      "title": "Reveal",
      "default": false
    },
    "shadow": {
      "type": "integer",
      "title": "Shadow",
      "default": 0
    },
    "max_chars": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Chars"
    },
    "max_duration": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Duration"
    },
    "preset": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Preset"
    },
    "input_filename": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Input Filename"
    },
    "words": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/CaptionWordIn"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Words"
    }
  },
  "type": "object",
  "required": [
    "job_id",
    "clip_index"
  ],
  "$defs": {
    "CaptionWordIn": {
      "properties": {
        "text": {
          "type": "string",
          "title": "Text"
        },
        "startMs": {
          "type": "integer",
          "title": "Startms"
        },
        "endMs": {
          "type": "integer",
          "title": "Endms"
        }
      },
      "type": "object",
      "required": [
        "text",
        "startMs",
        "endMs"
      ],
      "title": "CaptionWordIn",
      "description": "One user-edited caption word, clip-relative ms — the same shape the\n/transcript endpoint hands the subtitle modal."
    }
  }
}