{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Scene Detection & Shot List - Cut Timecodes, CSV, EDL",
    "description": "Detect every shot in a video file: cut, dissolve and fade timecodes, one keyframe per shot, a shot sheet image, pacing stats, and CSV, JSON and CMX3600 EDL files. Optional clip splitting without re-encoding. $0.018 per video minute.",
    "version": "1.0",
    "x-build-id": "v1hfjFUljtWLbb2Zv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kantolabs~video-scene-detection/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kantolabs-video-scene-detection",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/kantolabs~video-scene-detection/runs": {
      "post": {
        "operationId": "runs-sync-kantolabs-video-scene-detection",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/kantolabs~video-scene-detection/run-sync": {
      "post": {
        "operationId": "run-sync-kantolabs-video-scene-detection",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "videoUrls"
        ],
        "properties": {
          "videoUrls": {
            "title": "Video file URLs",
            "type": "array",
            "description": "Direct links to video files (MP4, MOV, WEBM, MKV, AVI, M4V, MPEG-TS...), one per line. Your own storage, S3/R2/GCS (public or pre-signed URLs), CDNs, an Apify key-value store, Dropbox and Google Drive share links ('anyone with the link') all work. Pages of platforms such as YouTube, TikTok or Instagram are refused.",
            "default": [
              "https://api.apify.com/v2/key-value-stores/aXcXwfChlioPWAUJv/records/sample-vertical-talk.mp4?signature=105QVevs72w3z5gMQzgIJ"
            ],
            "items": {
              "type": "string"
            }
          },
          "threshold": {
            "title": "Cut threshold (0.03-0.9)",
            "minimum": 0.03,
            "maximum": 0.9,
            "type": "number",
            "description": "How big a picture change must be to count as a cut. Lower = more sensitive (finds cuts between similar-looking shots, dark footage); higher = only obvious cuts. A change must also stand out from the motion around it, so camera moves are not cuts. 0.12 suits most videos; try 0.2-0.3 if you get too many shots.",
            "default": 0.12
          },
          "minShotSeconds": {
            "title": "Min shot length (seconds)",
            "minimum": 0.1,
            "maximum": 60,
            "type": "number",
            "description": "Cuts closer together than this are merged (the stronger one wins), so flashes and very fast montages do not produce slivers. 0.5 keeps the quick cuts of trailers and ads.",
            "default": 0.5
          },
          "detectDissolves": {
            "title": "Detect dissolves and fades",
            "type": "boolean",
            "description": "Also find gradual transitions: cross-fades (dissolves) and fades through black. The boundary is placed at the middle of the transition. Turn off to report hard cuts only.",
            "default": true
          },
          "keyframes": {
            "title": "Keyframe image per shot",
            "type": "boolean",
            "description": "Save one image from the middle of every shot (public link in each shot row). Included in the price.",
            "default": true
          },
          "shotSheetImage": {
            "title": "Shot sheet image",
            "type": "boolean",
            "description": "Save ONE image with every shot's keyframe tiled in order and labelled (shot number + start time) - a storyboard of the video for ad teardowns and shot-by-shot remakes. Included in the price.",
            "default": true
          },
          "maxKeyframes": {
            "title": "Max keyframes per video",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Keyframes are made for the first N shots (all shots are still listed with timecodes).",
            "default": 500
          },
          "keyframeMaxWidth": {
            "title": "Max keyframe width (px)",
            "minimum": 0,
            "maximum": 4096,
            "type": "integer",
            "description": "Keyframes wider than this are scaled down (aspect kept). 0 = original size.",
            "default": 640
          },
          "imageFormat": {
            "title": "Image format",
            "enum": [
              "jpg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "Format of the keyframe images.",
            "default": "jpg"
          },
          "imageQuality": {
            "title": "JPEG / WEBP quality",
            "minimum": 30,
            "maximum": 100,
            "type": "integer",
            "description": "30-100.",
            "default": 85
          },
          "skipBlankFrames": {
            "title": "Skip black keyframes",
            "type": "boolean",
            "description": "When a shot's middle frame is black or one flat colour, step forward up to 2 seconds inside the shot to a frame with content; a shot that is black throughout gets no image.",
            "default": true
          },
          "splitClips": {
            "title": "Split into clips (one file per shot)",
            "type": "boolean",
            "description": "Also cut the video into one file per shot WITHOUT re-encoding (fast, original quality, $0.002 per clip). Stream copy can only start a clip on a video keyframe, so a clip may start a few frames after the cut; the exact clip start/end is reported per shot.",
            "default": false
          },
          "maxClips": {
            "title": "Max clips per video",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Clips are cut for the first N shots only.",
            "default": 200
          },
          "maxDurationMinutes": {
            "title": "Max video duration (minutes)",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Longer videos are skipped (free). Up to 300. Videos over ~60 minutes may need a longer run timeout (Run options).",
            "default": 180
          },
          "maxVideoSizeMb": {
            "title": "Max video size (MB)",
            "minimum": 1,
            "maximum": 4000,
            "type": "integer",
            "description": "Larger files are skipped (free).",
            "default": 2000
          },
          "downloadTimeoutSecs": {
            "title": "Download timeout (seconds)",
            "minimum": 10,
            "maximum": 3600,
            "type": "integer",
            "description": "Give up on a video that does not download within this time (free).",
            "default": 600
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}