{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Frame Extractor: Keyframes, Scenes & Thumbnails for AI",
    "description": "Video frame extractor API: extract frames from video URLs as JPG, PNG or WebP. Get keyframes, scene detection cuts, evenly spaced frames, every-N-seconds frames or smart thumbnails, plus contact sheets and base64 for AI vision pipelines.",
    "version": "0.1",
    "x-build-id": "V34EyjkM1fzfg9fhD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data-done-right~video-frame-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data-done-right-video-frame-extractor",
        "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/data-done-right~video-frame-extractor/runs": {
      "post": {
        "operationId": "runs-sync-data-done-right-video-frame-extractor",
        "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/data-done-right~video-frame-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-data-done-right-video-frame-extractor",
        "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 URLs",
            "type": "array",
            "description": "Direct links to video files (mp4, webm, mov, mkv, avi...). Example: https://example.com/clip.mp4. Page URLs of YouTube, Vimeo, TikTok, Instagram and other streaming sites are rejected: use files you have the rights to.",
            "items": {
              "type": "string"
            }
          },
          "videoKeys": {
            "title": "Or video files in a key-value store",
            "type": "array",
            "description": "Keys of video files already stored in a key-value store (this run's default store, or the one named below). Example: my-clip.mp4.",
            "items": {
              "type": "string"
            }
          },
          "videoStore": {
            "title": "Key-value store of those files",
            "type": "string",
            "description": "Name or ID of the key-value store that holds the keys above. Leave empty for this run's default store."
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "everyNSeconds",
              "evenlySpaced",
              "keyframes",
              "sceneChanges",
              "thumbnail"
            ],
            "type": "string",
            "description": "How frames are chosen: every N seconds, N evenly spaced frames, keyframes (I-frames), scene changes, or one thumbnail.",
            "default": "everyNSeconds"
          },
          "intervalSeconds": {
            "title": "Interval (seconds)",
            "minimum": 0.04,
            "maximum": 86400,
            "type": "number",
            "description": "Mode 'Every N seconds': one frame every N seconds, starting at 0. Example: 2.",
            "default": 5
          },
          "frameCount": {
            "title": "Number of frames",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Mode 'N evenly spaced frames': how many frames to take, spread across the video. Limited by Max frames per video.",
            "default": 10
          },
          "sceneThreshold": {
            "title": "Scene change threshold",
            "minimum": 0.01,
            "maximum": 0.99,
            "type": "number",
            "description": "Mode 'Scene changes': 0.1 is very sensitive, 0.3 is a good default for cuts, 0.5 or more finds only hard cuts.",
            "default": 0.3
          },
          "includeFirstFrame": {
            "title": "Include the first frame in scene mode",
            "type": "boolean",
            "description": "Mode 'Scene changes': also return the opening frame so every scene, including the first, has an image.",
            "default": true
          },
          "thumbnailTimestamp": {
            "title": "Thumbnail time (seconds)",
            "minimum": 0,
            "type": "number",
            "description": "Mode 'Single thumbnail': the time of the frame, for example 12.5. Leave empty to let ffmpeg pick the most representative frame of the first seconds."
          },
          "thumbnailWindowSeconds": {
            "title": "Best-thumbnail search window (seconds)",
            "minimum": 1,
            "maximum": 60,
            "type": "number",
            "description": "Mode 'Single thumbnail' without a time: the best frame is chosen from the first N seconds.",
            "default": 10
          },
          "maxFrames": {
            "title": "Max frames per video",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on frames returned for each video (and on what you are charged for it).",
            "default": 50
          },
          "imageFormat": {
            "title": "Image format",
            "enum": [
              "jpg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "File format of the saved frames: JPG is smallest, PNG is lossless, WebP is a good middle ground.",
            "default": "jpg"
          },
          "imageQuality": {
            "title": "JPG / WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1 to 100. 85 is a good balance; ignored for PNG.",
            "default": 85
          },
          "width": {
            "title": "Max width (px)",
            "minimum": 0,
            "maximum": 7680,
            "type": "integer",
            "description": "Shrink frames to fit this width, keeping the aspect ratio. 0 = original size. Never upscales. Example: 1280.",
            "default": 0
          },
          "height": {
            "title": "Max height (px)",
            "minimum": 0,
            "maximum": 4320,
            "type": "integer",
            "description": "Shrink frames to fit this height, keeping the aspect ratio. 0 = original size. Use together with width to fit a box.",
            "default": 0
          },
          "contactSheet": {
            "title": "Make a contact sheet per video",
            "type": "boolean",
            "description": "Also save one grid image per video with a timecode on every tile (up to 48 frames). Not charged.",
            "default": false
          },
          "contactSheetColumns": {
            "title": "Contact sheet columns",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "Tiles per row in the contact sheet.",
            "default": 4
          },
          "includeBase64": {
            "title": "Add base64 image data to each row",
            "type": "boolean",
            "description": "Adds an imageBase64 field with the frame bytes, ready for vision-model APIs. Off by default because it makes rows large.",
            "default": false
          },
          "base64MaxKb": {
            "title": "Max base64 frame size (KB)",
            "minimum": 1,
            "maximum": 4096,
            "type": "integer",
            "description": "Frames larger than this are not inlined (imageBase64 stays empty). Lower the size or quality to fit.",
            "default": 512
          },
          "maxVideoSizeMb": {
            "title": "Max video file size (MB)",
            "minimum": 1,
            "maximum": 2048,
            "type": "integer",
            "description": "Downloads above this size are rejected before they finish.",
            "default": 500
          },
          "maxDurationMinutes": {
            "title": "Max video duration (minutes)",
            "minimum": 0.1,
            "type": "number",
            "description": "Longer videos are rejected without charge.",
            "default": 120
          },
          "videoTimeoutSecs": {
            "title": "Timeout per video (seconds)",
            "minimum": 10,
            "maximum": 7200,
            "type": "integer",
            "description": "Applies to the download and, separately, to the frame extraction of each video.",
            "default": 600
          },
          "outputStoreName": {
            "title": "Save frames in a named store",
            "type": "string",
            "description": "Optional key-value store name. Named stores are kept until you delete them, while a run's own store expires after your plan's retention period."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}