{
  "openapi": "3.0.1",
  "info": {
    "title": "Video to LLM Context – Scenes, Keyframes & Transcript for AI",
    "description": "Turn any video file into AI-ready context: scene cuts, one keyframe per scene, a Whisper transcript aligned to each scene, a keyframe grid and a ready-to-paste Markdown block for GPT, Claude or Gemini. MP4, MOV, WebM links, Dropbox, Drive or Apify storage. Failed files free.",
    "version": "0.1",
    "x-build-id": "jwOvE51z566JIfxIR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gazidev~video-to-llm-context/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gazidev-video-to-llm-context",
        "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/gazidev~video-to-llm-context/runs": {
      "post": {
        "operationId": "runs-sync-gazidev-video-to-llm-context",
        "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/gazidev~video-to-llm-context/run-sync": {
      "post": {
        "operationId": "run-sync-gazidev-video-to-llm-context",
        "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",
        "properties": {
          "videoUrls": {
            "title": "Video file URLs",
            "type": "array",
            "description": "Direct links to video files: MP4, MOV, WebM, MKV, AVI, M4V, TS and more (your CDN, S3/R2/GCS bucket, Dropbox or Google Drive file shared as 'Anyone with the link', OneDrive). **YouTube, TikTok, Instagram, Facebook, X, Vimeo, Twitch and other platform page links are rejected** (free error row): their terms of service forbid downloading. Only submit videos you have the right to process.",
            "default": [
              "https://upload.wikimedia.org/wikipedia/commons/2/2c/Abbott_and_Costello_Go_to_Mars_Official_Trailer_%281953%29.webm"
            ],
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Read video URLs from an Apify dataset",
            "type": "string",
            "description": "Optional. Chain after another Actor: every value of the field below (string or array of strings) is processed like a video URL."
          },
          "datasetField": {
            "title": "Dataset field with the video URL",
            "type": "string",
            "description": "Name of the dataset field that holds the video file URL, e.g. `url`, `videoUrl` or `fileUrl`.",
            "default": "url"
          },
          "keyValueStoreId": {
            "title": "Videos stored in an Apify key-value store",
            "type": "string",
            "description": "Optional. Every record in this store is analyzed as a video file, e.g. files you uploaded with the Apify API or another Actor's output. JSON/text records become free error rows."
          },
          "keyValueStorePrefix": {
            "title": "Only keys starting with",
            "type": "string",
            "description": "Optional key prefix filter for the key-value store (e.g. `video-`)."
          },
          "maxVideos": {
            "title": "Max videos per run",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many inputs (0 = no limit). Useful when reading a large dataset or store.",
            "default": 0
          },
          "sceneThreshold": {
            "title": "Scene-cut sensitivity",
            "minimum": 0.05,
            "maximum": 0.95,
            "type": "number",
            "description": "ffmpeg scene-change score (0.05–0.95) above which a new scene starts. Lower = more scenes (0.2 for subtle cuts), higher = only hard cuts (0.4–0.5).",
            "default": 0.3
          },
          "minSceneSeconds": {
            "title": "Minimum scene length (seconds)",
            "minimum": 0,
            "maximum": 600,
            "type": "number",
            "description": "Cuts closer than this to the previous one are merged, so flashes and fast montages do not produce dozens of near-identical keyframes.",
            "default": 2
          },
          "maxSceneSeconds": {
            "title": "Maximum scene length (seconds)",
            "minimum": 0,
            "maximum": 3600,
            "type": "number",
            "description": "Longer scenes (talking heads, screen recordings, lectures) are split evenly so the context still gets a keyframe at least this often. 0 = never split.",
            "default": 60
          },
          "maxKeyframesPerVideo": {
            "title": "Max keyframes (scenes) per video",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Upper limit on scenes/keyframes per video (one keyframe per scene, each charged). If more cuts are found, evenly spread cut points are kept.",
            "default": 40
          },
          "accurateScenes": {
            "title": "Accurate scene detection (slower)",
            "type": "boolean",
            "description": "Off (default): fast scan that compares the video's own keyframes - cut times can be off by a second or two on files with sparse keyframes. On: every frame is decoded for frame-exact cuts (several times slower on HD video, same price).",
            "default": false
          },
          "keyframeWidth": {
            "title": "Keyframe width (px)",
            "minimum": 160,
            "maximum": 1920,
            "type": "integer",
            "description": "Keyframes are scaled down to this width (never up). 768 px is a good size for vision LLMs (GPT-4o, Claude, Gemini) and keeps image tokens low.",
            "default": 768
          },
          "keyframeQuality": {
            "title": "JPEG quality",
            "minimum": 30,
            "maximum": 100,
            "type": "integer",
            "description": "JPEG quality of the keyframes (30–100).",
            "default": 80
          },
          "includeKeyframeBase64": {
            "title": "Include keyframes as base64",
            "type": "boolean",
            "description": "Add `keyframeBase64` (JPEG, base64) to every scene so you can send images to a vision model without downloading the links. Makes rows much larger; dropped automatically if a row would exceed 8 MB.",
            "default": false
          },
          "keyframeGrid": {
            "title": "Keyframe grid image",
            "type": "boolean",
            "description": "Save one contact-sheet JPEG with up to 48 keyframes, labelled with scene number and timecode (`gridImageUrl`). One image = one vision-model call for the whole video. Free.",
            "default": true
          },
          "transcribe": {
            "title": "Transcribe speech (Whisper)",
            "type": "boolean",
            "description": "Transcribe the audio track with Whisper (on-CPU, no API key) and align the text to the scenes. Charged per started audio minute. Turn off for keyframes only.",
            "default": true
          },
          "whisperModel": {
            "title": "Whisper model",
            "enum": [
              "base",
              "tiny"
            ],
            "type": "string",
            "description": "`base`: good accuracy for clear speech in 99 languages. `tiny`: about 2× faster, fine for clean single-speaker English. Same price.",
            "default": "base"
          },
          "language": {
            "title": "Spoken language",
            "type": "string",
            "description": "`auto` detects the language from the first 30 seconds of speech. Or force a Whisper code (`en`, `es`, `de`, `fr`, `pt`, `it`, `nl`, `tr`, `ru`, `ja`, `zh`, `ar`, `hi`…) for short or noisy clips.",
            "default": "auto"
          },
          "vocabularyHint": {
            "title": "Vocabulary hint",
            "type": "string",
            "description": "Optional names and jargon that help Whisper spell them right, e.g. `Apify, Kubernetes, Dr. Nguyen`."
          },
          "includeSegments": {
            "title": "Include timestamped segments",
            "type": "boolean",
            "description": "Add the raw Whisper `segments` (start, end, text) to each row. The per-scene transcript and the Markdown already contain the text.",
            "default": false
          },
          "imageLinksInContext": {
            "title": "Keyframe links in the Markdown",
            "type": "boolean",
            "description": "Put a Markdown image link for every keyframe (and the grid) into `llmContext`. Turn off for a text-only context block.",
            "default": true
          },
          "maxDurationMinutes": {
            "title": "Max minutes analyzed per video",
            "minimum": 0.5,
            "maximum": 240,
            "type": "number",
            "description": "Only the first N minutes of each video are analyzed (scenes and transcript, `truncated: true`). You pay only for what is analyzed.",
            "default": 30
          },
          "maxFileSizeMB": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Larger downloads are stopped (free error row). 1 hour of 720p MP4 is about 500–1500 MB.",
            "default": 2000
          },
          "downloadTimeoutSecs": {
            "title": "Download timeout (seconds)",
            "minimum": 30,
            "maximum": 3600,
            "type": "integer",
            "description": "Maximum time to download one file. Downloads are retried on network errors and HTTP 429/5xx.",
            "default": 900
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}