{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Frame Extractor - Keyframes, Scenes, Thumbnails for AI",
    "description": "Extract still frames from any video file: scene-change keyframes, evenly spaced thumbnails or one frame every N seconds, plus a contact sheet and metadata. Image links ready for AI vision. $2 per 1,000 frames.",
    "version": "1.2",
    "x-build-id": "jyddrAMLvnnGa90x7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kantolabs~video-frame-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kantolabs-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/kantolabs~video-frame-extractor/runs": {
      "post": {
        "operationId": "runs-sync-kantolabs-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/kantolabs~video-frame-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-kantolabs-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",
        "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. Links from your own storage, S3/R2/GCS buckets, CDNs or an Apify key-value store all work. Pages of video platforms (YouTube, TikTok...) are not supported.",
            "default": [
              "https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/360/Big_Buck_Bunny_360_10s_1MB.mp4",
              "https://media.w3.org/2010/05/sintel/trailer.mp4"
            ],
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Which frames",
            "enum": [
              "auto",
              "scenes",
              "count",
              "interval",
              "bestThumbnails"
            ],
            "type": "string",
            "description": "`auto`: first frame + the strongest scene changes, topped up with evenly spaced frames to reach the frame count (best storyboard). `scenes`: only real scene changes (up to the max per video). `count`: exactly N evenly spaced frames. `interval`: one frame every N seconds. `bestThumbnails`: scores ~40 candidate frames (sharpness, exposure, colour, faces, open eyes, composition) and returns only the best few as thumbnails, with face-centred crops.",
            "default": "auto"
          },
          "frameCount": {
            "title": "Frames per video (auto / count)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many frames `auto` and `count` modes return per video.",
            "default": 12
          },
          "intervalSeconds": {
            "title": "Seconds between frames (interval)",
            "minimum": 1,
            "maximum": 3600,
            "type": "integer",
            "description": "Used by `interval` mode.",
            "default": 10
          },
          "thumbnailCount": {
            "title": "Thumbnails per video (bestThumbnails)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Used by `bestThumbnails` mode: how many of the best frames to return per video, best first. Each returned thumbnail is one charged frame; the candidates that were scored and dropped are free.",
            "default": 3
          },
          "thumbnailCrops": {
            "title": "Thumbnail crops (bestThumbnails)",
            "type": "array",
            "description": "Used by `bestThumbnails` mode: extra free crops of each thumbnail, centred on the faces (or the main subject). 16:9 = YouTube, 9:16 = Shorts/Reels/TikTok, 1:1 = square posts, 4:5 = Instagram portrait. A crop that matches the video's own shape is not repeated. Empty list = no crops.",
            "items": {
              "type": "string",
              "enum": [
                "16:9",
                "9:16",
                "1:1",
                "4:5"
              ],
              "enumTitles": [
                "16:9 landscape",
                "9:16 vertical",
                "1:1 square",
                "4:5 portrait"
              ]
            },
            "default": [
              "16:9",
              "9:16",
              "1:1"
            ]
          },
          "sceneThreshold": {
            "title": "Scene change sensitivity",
            "enum": [
              "0.15",
              "0.2",
              "0.3",
              "0.4",
              "0.5"
            ],
            "type": "string",
            "description": "Minimum ffmpeg scene score (0-1) that counts as a cut. Lower finds more, subtler changes.",
            "default": "0.3"
          },
          "maxFramesPerVideo": {
            "title": "Max frames per video (scenes / interval)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Upper limit for `scenes` and `interval` modes, so a long video cannot produce thousands of frames.",
            "default": 50
          },
          "skipBlankFrames": {
            "title": "Skip black / blank frames",
            "type": "boolean",
            "description": "When a chosen frame is black (fade-to-black at a cut, a black intro) or one flat colour, step forward up to 2 seconds to the first frame with content; if there is none, drop it. Dropped frames are not charged. Turn off to keep frames exactly at the planned timestamps.",
            "default": true
          },
          "imageFormat": {
            "title": "Image format",
            "enum": [
              "jpg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "Format of the saved frames.",
            "default": "jpg"
          },
          "maxWidth": {
            "title": "Max frame width (px)",
            "minimum": 0,
            "maximum": 7680,
            "type": "integer",
            "description": "Frames wider than this are scaled down (aspect ratio kept). 0 keeps the original resolution. 1280 is plenty for AI vision models.",
            "default": 1280
          },
          "imageQuality": {
            "title": "JPEG/WEBP quality",
            "minimum": 30,
            "maximum": 100,
            "type": "integer",
            "description": "Compression quality for JPEG and WEBP frames.",
            "default": 85
          },
          "contactSheet": {
            "title": "Create a contact sheet",
            "type": "boolean",
            "description": "Also save one grid image with all frames and their timecodes (free).",
            "default": true
          },
          "contactSheetColumns": {
            "title": "Contact sheet columns",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Thumbnails per row on the contact sheet.",
            "default": 4
          },
          "maxVideoSizeMb": {
            "title": "Max video size (MB)",
            "minimum": 1,
            "maximum": 4000,
            "type": "integer",
            "description": "Larger videos are skipped (free).",
            "default": 500
          },
          "downloadTimeoutSecs": {
            "title": "Download timeout (seconds)",
            "minimum": 10,
            "maximum": 3600,
            "type": "integer",
            "description": "Give up on a video that does not download within this time.",
            "default": 300
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}