{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cliponit-app/json-schema/cliponit-app-video-schema.json",
  "title": "Video",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cliponit-app-openapi.yml#/components/schemas/Video",
  "type": "object",
  "required": [
    "id",
    "title",
    "size_bytes",
    "status",
    "state",
    "is_demo",
    "created_at",
    "clips_count",
    "url"
  ],
  "properties": {
    "id": {
      "$ref": "#/$defs/Uuid"
    },
    "title": {
      "type": "string"
    },
    "path": {
      "type": "string",
      "description": "Server-side file path (informational)"
    },
    "url": {
      "type": "string",
      "description": "Source file, relative to the server, e.g. `/files/uploads/<id>.mp4`"
    },
    "thumbnail_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "thumbnail_path": {
      "type": [
        "string",
        "null"
      ]
    },
    "size_bytes": {
      "type": "integer"
    },
    "duration_s": {
      "type": [
        "number",
        "null"
      ],
      "description": "Seconds, null until probed"
    },
    "width": {
      "type": [
        "integer",
        "null"
      ]
    },
    "height": {
      "type": [
        "integer",
        "null"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "processing",
        "ready",
        "failed"
      ]
    },
    "state": {
      "type": "string",
      "enum": [
        "queued",
        "running",
        "ready",
        "failed"
      ],
      "description": "`processing` split by the job queue: `queued` (waiting behind other videos) or `running`; otherwise = `status`"
    },
    "queue_position": {
      "type": [
        "integer",
        "null"
      ],
      "description": "1-based position in the processing queue while `state` is `queued`"
    },
    "eta_s": {
      "type": [
        "number",
        "null"
      ],
      "description": "Estimated seconds until `ready` (0.25 × (duration + durations of the videos ahead)); null when not processing"
    },
    "progress": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "downloading",
        "probing",
        "transcribing",
        "detecting",
        "demo",
        null
      ],
      "description": "Current step while processing; null when ready/failed. `demo` = demo copy waiting for the master"
    },
    "error": {
      "type": [
        "string",
        "null"
      ],
      "description": "Why it failed"
    },
    "is_demo": {
      "type": "integer",
      "enum": [
        0,
        1
      ],
      "description": "1 = the sample video seeded at signup (cannot be exported on the free plan)"
    },
    "created_at": {
      "type": "string"
    },
    "clips_count": {
      "type": "integer"
    }
  },
  "$defs": {
    "Uuid": {
      "type": "string",
      "format": "uuid"
    }
  }
}