{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/transcribe-so/json-schema/transcribe-so-clip-schema.json",
  "title": "Clip",
  "description": "A captioned clip render. `file_url` is a presigned download URL\nof the rendered file (valid 1 hour) present only when `status` is\n`completed`; every GET presigns a fresh one. `mp4_url` is the same\nlink for MP4 outputs (`video`, `audiogram`) and null for `audio`.\n",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/transcribe-so-openapi.yml#/components/schemas/Clip",
  "type": "object",
  "required": [
    "id",
    "transcription_id",
    "status",
    "start_seconds",
    "end_seconds",
    "duration_seconds",
    "aspect",
    "style",
    "title",
    "charge_usd",
    "output",
    "caption_position",
    "words_per_line",
    "framing",
    "highlight_color",
    "file_url",
    "file_content_type",
    "srt_url",
    "mp4_url",
    "mp4_url_expires_at",
    "error",
    "created_at",
    "completed_at"
  ],
  "properties": {
    "id": {
      "type": "integer"
    },
    "transcription_id": {
      "type": "integer"
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "rendering",
        "completed",
        "failed"
      ]
    },
    "start_seconds": {
      "type": "number"
    },
    "end_seconds": {
      "type": "number"
    },
    "duration_seconds": {
      "type": [
        "number",
        "null"
      ],
      "description": "Rendered length in seconds once completed."
    },
    "aspect": {
      "type": "string",
      "enum": [
        "9:16",
        "1:1",
        "16:9"
      ]
    },
    "style": {
      "type": "string",
      "enum": [
        "captions",
        "karaoke",
        "minimal",
        "highlight",
        "boxed",
        "none"
      ]
    },
    "title": {
      "type": [
        "string",
        "null"
      ]
    },
    "charge_usd": {
      "type": "number",
      "description": "Flat charge, $0.05 per started 60 s of clip."
    },
    "output": {
      "type": "string",
      "enum": [
        "video",
        "audiogram",
        "audio"
      ]
    },
    "caption_position": {
      "type": "string",
      "enum": [
        "upper",
        "middle",
        "lower"
      ]
    },
    "words_per_line": {
      "type": "integer",
      "minimum": 1,
      "maximum": 6
    },
    "framing": {
      "type": "string",
      "enum": [
        "blur",
        "crop"
      ]
    },
    "highlight_color": {
      "type": [
        "string",
        "null"
      ],
      "description": "`#RRGGBB`, or null for the style's own colour."
    },
    "file_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Presigned download URL of the rendered file; null unless completed."
    },
    "file_content_type": {
      "type": "string",
      "enum": [
        "video/mp4",
        "audio/mp4"
      ],
      "description": "`video/mp4` for video and audiogram, `audio/mp4` (M4A) for audio."
    },
    "srt_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Presigned URL of the SRT caption file; null unless completed with one."
    },
    "mp4_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Same as `file_url` for MP4 outputs; null for `output: audio`. Kept for existing callers."
    },
    "mp4_url_expires_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Expiry of `file_url` / `mp4_url` for MP4 outputs; null for `output: audio`."
    },
    "error": {
      "type": [
        "string",
        "null"
      ],
      "description": "Failure reason when `status` is `failed`."
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "completed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  }
}