{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/transcribe-so/json-schema/transcribe-so-create-clip-request-schema.json",
  "title": "CreateClipRequest",
  "description": "Body of POST /transcriptions/{id}/clips. The transcription must be\n`completed` with word timestamps and the range must contain speech.\n",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/transcribe-so-openapi.yml#/components/schemas/CreateClipRequest",
  "type": "object",
  "required": [
    "start_seconds",
    "end_seconds"
  ],
  "properties": {
    "start_seconds": {
      "type": "number",
      "minimum": 0,
      "description": "Clip start within the transcription, seconds."
    },
    "end_seconds": {
      "type": "number",
      "description": "Clip end, seconds. Length (end - start) must be 1-60 s (1-180 s\nwhere enabled) and end must not exceed the transcription\nduration (+1 s tolerance).\n"
    },
    "aspect": {
      "type": "string",
      "enum": [
        "9:16",
        "1:1",
        "16:9"
      ],
      "default": "9:16",
      "description": "Output aspect ratio (1080x1920, 1080x1080, 1920x1080)."
    },
    "style": {
      "type": "string",
      "enum": [
        "captions",
        "karaoke",
        "minimal",
        "highlight",
        "boxed",
        "none"
      ],
      "default": "captions",
      "description": "Caption style: `captions` (text on a translucent box),\n`karaoke` (the spoken word gets a coloured box), `minimal`\n(plain text), `highlight` (upper-case, the spoken word\ncoloured), `boxed` (opaque box, the spoken word coloured),\n`none` (no captions). Where a style is not offered yet the\nrequest is refused with `invalid_request` and `error.reason:\nfeature_unavailable`.\n"
    },
    "output": {
      "type": "string",
      "enum": [
        "video",
        "audiogram",
        "audio"
      ],
      "default": "audiogram",
      "description": "`audiogram`: the audio segment over a generated background with\nthe captions (MP4). `video`: the source video with the captions\nburned in (MP4). It needs the source video: a YouTube or other\nlink source needs `rights_affirmed: true` and may be\nunavailable; an upload needs its original video added in the\nweb app first; otherwise 400 `video_unavailable` with\n`error.reason`. `audio`: M4A, no captions. Every output also\ngets an SRT caption file (`srt_url`).\n"
    },
    "caption_position": {
      "type": "string",
      "enum": [
        "upper",
        "middle",
        "lower"
      ],
      "default": "lower",
      "description": "Vertical caption position (kept inside the 9:16 platform safe zone)."
    },
    "words_per_line": {
      "type": "integer",
      "minimum": 1,
      "maximum": 6,
      "default": 3,
      "description": "Most words shown at once."
    },
    "framing": {
      "type": "string",
      "enum": [
        "blur",
        "crop"
      ],
      "default": "blur",
      "description": "How `output: video` fits the aspect: `blur` (the whole frame\nover a blurred fill) or `crop` (centre crop).\n"
    },
    "highlight_color": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^#[0-9A-Fa-f]{6}$",
      "description": "Colour of the spoken word, `#RRGGBB` (karaoke, highlight and\nboxed). Default: the style's own colour.\n"
    },
    "rights_affirmed": {
      "type": "boolean",
      "default": false,
      "description": "Required `true` for `output: video` from a YouTube or other\nlink source: the user owns the video or has permission to\nreuse it. Without it the request is refused with\n`invalid_request` and `error.reason: rights_required`.\n"
    },
    "client_nonce": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "Optional client idempotency nonce. A repeat request with the\nsame nonce returns the first clip instead of a second render\nand hold.\n"
    },
    "title": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 120,
      "description": "Optional title rendered at the top of the clip."
    },
    "callback_url": {
      "type": "string",
      "format": "uri",
      "maxLength": 2048,
      "description": "Optional public http(s) URL that receives this clip's signed\n`clip.completed` / `clip.failed` webhook. Same rules as\nCreateTranscriptionRequest.callback_url.\n"
    },
    "max_charge_usd": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0,
      "description": "Ceiling in USD for this render. The clip charge is computed\nfirst; if it is above the ceiling the request is refused with\n402 `max_charge_exceeded` BEFORE any wallet hold: nothing is\nheld, charged or queued, and the error block carries\n`charge_usd` and `max_charge_usd`. Read the amount first with\nGET /transcriptions/{id}/clips/quote. Clips are wallet-only on\nevery plan, so a ceiling of 0 always refuses.\n"
    }
  }
}