{
  "openapi": "3.0.1",
  "info": {
    "title": "Video to Scenes — Scene Detection, Keyframes, Transcript",
    "description": "Split videos into scenes: cut detection, one keyframe per scene, contact sheet and, optionally, what is said in each scene. Frames every N seconds or at timestamps. Markdown storyboard and RAG chunks for LLMs.",
    "version": "0.0",
    "x-build-id": "0aDBuOev6TSLOmZel"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/saliga~video-to-scenes/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-saliga-video-to-scenes",
        "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/saliga~video-to-scenes/runs": {
      "post": {
        "operationId": "runs-sync-saliga-video-to-scenes",
        "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/saliga~video-to-scenes/run-sync": {
      "post": {
        "operationId": "run-sync-saliga-video-to-scenes",
        "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 links",
            "type": "array",
            "description": "Direct links to video files (mp4, mov, webm, mkv, avi, ts, ...) or Google Drive and Dropbox share links. One result per video. YouTube, TikTok, Instagram and other platform pages are not supported: use a link to the file itself.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "What to extract",
            "enum": [
              "scenes",
              "interval",
              "count",
              "timestamps"
            ],
            "type": "string",
            "description": "Scenes: find every cut and take one keyframe from the middle of each scene. Interval: one frame every N seconds. Count: N frames spread evenly. Timestamps: frames at the times you list.",
            "default": "scenes"
          },
          "sceneThreshold": {
            "title": "Scene cut sensitivity",
            "minimum": 0.05,
            "maximum": 0.95,
            "type": "number",
            "description": "How different two moments must look (colour histogram, 0-1) to count as a cut. Lower finds more cuts, including softer ones; higher finds only hard cuts.",
            "default": 0.3
          },
          "minSceneSeconds": {
            "title": "Shortest scene (seconds)",
            "minimum": 0,
            "maximum": 60,
            "type": "number",
            "description": "Cuts closer together than this are merged into one scene (flashes, quick montages).",
            "default": 1
          },
          "fastScan": {
            "title": "Fast scan (keyframes only)",
            "type": "boolean",
            "description": "Look only at the video's keyframes. Several times faster on long videos, but a cut is placed at the next keyframe, usually within a few seconds.",
            "default": false
          },
          "intervalSeconds": {
            "title": "Every N seconds",
            "minimum": 0.5,
            "maximum": 3600,
            "type": "number",
            "description": "For the \"Every N seconds\" mode.",
            "default": 10
          },
          "frameCount": {
            "title": "Number of frames",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "For the \"N frames spread evenly\" mode.",
            "default": 12
          },
          "timestamps": {
            "title": "Timestamps",
            "type": "array",
            "description": "For the \"At given timestamps\" mode: seconds or clock times, for example 15, 1:30 or 00:02:05.5.",
            "items": {
              "type": "string"
            }
          },
          "maxFramesPerVideo": {
            "title": "Max frames per video",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Cap on the stills saved per video. In Scenes mode every cut is still listed; when there are more scenes than this, the stills are spread evenly over them.",
            "default": 50
          },
          "skipBlankFrames": {
            "title": "Skip black frames",
            "type": "boolean",
            "description": "When a planned frame is black (a fade or a cut to black), take the next frame with content instead, within the same scene. Turn off to get frames at exactly the planned times.",
            "default": true
          },
          "transcribe": {
            "title": "Add the transcript of each scene",
            "type": "boolean",
            "description": "Transcribe the audio with Whisper (base model) and attach what is said in each scene or between frames. Adds RAG chunks with the scene's time range and keyframe link. Charged per audio minute.",
            "default": false
          },
          "language": {
            "title": "Spoken language",
            "type": "string",
            "description": "Two-letter code (en, es, de, fr, tr, ...) or auto to detect it.",
            "default": "auto"
          },
          "imageFormat": {
            "title": "Image format",
            "enum": [
              "jpeg",
              "webp",
              "png"
            ],
            "type": "string",
            "description": "Format of the saved frames.",
            "default": "jpeg"
          },
          "maxWidth": {
            "title": "Max image width (px)",
            "minimum": 0,
            "maximum": 3840,
            "type": "integer",
            "description": "Frames wider than this are scaled down, keeping the aspect ratio. 0 keeps the original size.",
            "default": 1280
          },
          "quality": {
            "title": "JPEG/WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Higher is sharper and larger.",
            "default": 85
          },
          "contactSheet": {
            "title": "Contact sheet",
            "type": "boolean",
            "description": "Also save one grid image of all frames with their timecodes (free).",
            "default": true
          },
          "maxVideoMinutes": {
            "title": "Max minutes per video",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Only the first this many minutes of each video are analysed and charged.",
            "default": 120
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 4000,
            "type": "integer",
            "description": "Larger files are skipped with an error (not charged).",
            "default": 1000
          },
          "requestHeaders": {
            "title": "Request headers",
            "type": "object",
            "description": "Extra HTTP headers for downloading, for example {\"Authorization\": \"Bearer …\"}. Sent only to the host of each URL you gave, never to a redirect on another host."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}