{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Scene Detector - Shot Cuts, Keyframes, EDL & Clips",
    "description": "Detect scene changes and shot boundaries in any video URL: hard cuts, fades, dissolves and wipes with timecodes, a keyframe image per scene, CSV and EDL export, and optional split clips. Runs on CPU with ffmpeg, no external APIs.",
    "version": "1.0",
    "x-build-id": "Ad2wWIjXX2oj0RYgY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/freecamp008~video-scene-detector/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-freecamp008-video-scene-detector",
        "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/freecamp008~video-scene-detector/runs": {
      "post": {
        "operationId": "runs-sync-freecamp008-video-scene-detector",
        "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/freecamp008~video-scene-detector/run-sync": {
      "post": {
        "operationId": "run-sync-freecamp008-video-scene-detector",
        "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 URLs",
            "type": "array",
            "description": "Direct links to video files (MP4, MOV, MKV, WEBM, AVI, OGV, TS, ...). Each video becomes one result with its scene list, keyframes and exports. The link must return the file itself, not a web page with a player.",
            "items": {
              "type": "string"
            }
          },
          "sensitivity": {
            "title": "Detection sensitivity",
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "type": "string",
            "description": "<b>Medium</b> suits most films, trailers, ads and vlogs. <b>High</b> also finds subtle cuts between similar-looking shots (may add a few false cuts on fast action). <b>Low</b> only keeps obvious changes.",
            "default": "medium"
          },
          "minSceneLengthSec": {
            "title": "Minimum scene length (seconds)",
            "minimum": 0.05,
            "maximum": 60,
            "type": "number",
            "description": "Two scene changes closer than this are merged (the stronger one is kept). Raise it (e.g. 1-2 s) to ignore very short shots and strobe effects.",
            "default": 0.4
          },
          "detectFades": {
            "title": "Detect fades through black / white",
            "type": "boolean",
            "description": "Treat a fade-out to black (or white) followed by a new shot as a scene change. The new scene starts where the fade-in begins.",
            "default": true
          },
          "detectDissolves": {
            "title": "Detect dissolves and wipes",
            "type": "boolean",
            "description": "Detect gradual transitions (cross-dissolves, wipes, slides) in addition to hard cuts.",
            "default": true
          },
          "keyframes": {
            "title": "Save a keyframe image per scene",
            "type": "boolean",
            "description": "Save the sharpest representative frame of each scene to the key-value store and add <code>keyframeUrl</code> to every scene.",
            "default": true
          },
          "keyframeFormat": {
            "title": "Keyframe image format",
            "enum": [
              "jpg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "Image format of the keyframes.",
            "default": "jpg"
          },
          "keyframeWidth": {
            "title": "Keyframe width (px)",
            "minimum": 0,
            "maximum": 3840,
            "type": "integer",
            "description": "Keyframes are scaled down to this width (aspect ratio kept). 0 = original resolution.",
            "default": 640
          },
          "maxKeyframes": {
            "title": "Max keyframes per video",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Keyframes are saved for the first N scenes only (the scene list itself is always complete).",
            "default": 1000
          },
          "exportCsv": {
            "title": "Export CSV scene list",
            "type": "boolean",
            "description": "Save a CSV with scene number, start/end frame, timecode, seconds, length and transition type (<code>csvUrl</code>).",
            "default": true
          },
          "exportEdl": {
            "title": "Export EDL (CMX3600)",
            "type": "boolean",
            "description": "Save a CMX3600 edit decision list that Premiere Pro, DaVinci Resolve, Final Cut (via conversion) and Avid can import (<code>edlUrl</code>).",
            "default": true
          },
          "splitClips": {
            "title": "Split video into scene clips",
            "type": "boolean",
            "description": "Cut the video into one file per scene and save the clips to the key-value store (<code>clipUrl</code> per scene). Uses extra storage.",
            "default": false
          },
          "splitMode": {
            "title": "Clip cutting mode",
            "enum": [
              "auto",
              "copy",
              "reencode"
            ],
            "type": "string",
            "description": "<b>Auto</b> (recommended): frame-accurate clips; uses lossless stream copy when the scene starts on a keyframe (common at real cuts) and re-encodes to H.264/AAC MP4 otherwise. <b>Stream copy</b>: fastest, original quality, but a clip can only start on a keyframe, so it may begin with up to a few seconds of the previous shot (<code>clipStartSec</code> shows where). <b>Re-encode</b>: every clip as frame-accurate H.264/AAC MP4.",
            "default": "auto"
          },
          "maxClips": {
            "title": "Max clips per video",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Only the first N scenes are cut into clips.",
            "default": 100
          },
          "maxDurationMinutes": {
            "title": "Max duration per video (minutes)",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Only the first N minutes of each video are analyzed (and billed). Longer videos are marked <code>truncated: true</code>.",
            "default": 180
          },
          "analysisMaxFps": {
            "title": "Max analysis frame rate",
            "minimum": 0,
            "maximum": 240,
            "type": "integer",
            "description": "Videos with a higher frame rate (e.g. 50/60 fps) are analyzed at this rate, which is about 2x faster with the same cut accuracy for normal footage. 0 = analyze every frame.",
            "default": 30
          },
          "maxFileSizeMB": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Larger downloads are rejected (free error item). Use more memory/disk for very large files.",
            "default": 4000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}