{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Keyframe Extractor: Scene Frames for AI Vision",
    "description": "Extract keyframes and scene-change frames from video files with timestamps, sized for GPT, Claude or Gemini vision. Near-duplicates dropped free, max-frames cap, or frames by interval, count or exact time. JPEG/WebP/PNG links, optional ZIP. $0.0015 per frame, no start or per-minute fee.",
    "version": "0.1",
    "x-build-id": "2UNBBBQ5RRhObnljb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/open-data-tools~video-keyframe-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-open-data-tools-video-keyframe-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/open-data-tools~video-keyframe-extractor/runs": {
      "post": {
        "operationId": "runs-sync-open-data-tools-video-keyframe-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/open-data-tools~video-keyframe-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-open-data-tools-video-keyframe-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 links",
            "type": "array",
            "description": "Direct links to video files (MP4, MOV, WEBM, MKV, AVI, M4V...). Dropbox and Google Drive share links are converted. YouTube, social media and streaming sites are refused.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Or: dataset with video links",
            "type": "string",
            "description": "Take links from another Actor's dataset (e.g. a downloader or scraper). The link field is found automatically, or set it below."
          },
          "urlField": {
            "title": "Link field in the dataset",
            "type": "string",
            "description": "Field name(s) with the video link, comma-separated, dot paths allowed. Empty = auto-detect (videoUrl, url, fileUrl, ...)."
          },
          "mode": {
            "title": "Which frames",
            "enum": [
              "scenes",
              "interval",
              "count",
              "timestamps"
            ],
            "type": "string",
            "description": "Scene changes uses the video's keyframes (encoders usually place one at every cut) plus a frame wherever the video goes longer than 'Max gap' without one, then drops near-duplicates.",
            "default": "scenes"
          },
          "maxFramesPerVideo": {
            "title": "Max frames per video",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap per video. If more frames qualify, an evenly spread subset is kept, so the whole video is still covered.",
            "default": 30
          },
          "maxGapSec": {
            "title": "Max gap (scenes mode, seconds)",
            "minimum": 1,
            "type": "number",
            "description": "Add a frame wherever the video has no keyframe for this long, so slow talks and screen recordings are covered too.",
            "default": 10
          },
          "intervalSec": {
            "title": "Interval (seconds)",
            "minimum": 0.1,
            "type": "number",
            "description": "For 'one frame every N seconds'.",
            "default": 10
          },
          "frameCount": {
            "title": "Number of frames",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "For 'N frames spread evenly'.",
            "default": 10
          },
          "timestamps": {
            "title": "Timestamps",
            "type": "string",
            "description": "For 'exact timestamps': seconds or mm:ss / hh:mm:ss, comma-separated, e.g. 5, 1:30, 01:02:03.5"
          },
          "startTime": {
            "title": "Start at",
            "type": "string",
            "description": "Optional, e.g. 30 or 1:30. Frames before it are ignored."
          },
          "endTime": {
            "title": "End at",
            "type": "string",
            "description": "Optional, e.g. 600 or 10:00."
          },
          "dedupe": {
            "title": "Drop near-duplicate frames",
            "enum": [
              "off",
              "light",
              "normal",
              "strong"
            ],
            "type": "string",
            "description": "Frames that look like the previous kept frame (perceptual hash) are dropped and not charged. Not used in 'exact timestamps' mode.",
            "default": "normal"
          },
          "maxSide": {
            "title": "Max image side (px)",
            "minimum": 0,
            "maximum": 7680,
            "type": "integer",
            "description": "Longest side of each frame. 1280 suits GPT-4o/Claude/Gemini vision input. 0 = original size.",
            "default": 1280
          },
          "imageFormat": {
            "title": "Image format",
            "enum": [
              "jpeg",
              "webp",
              "png"
            ],
            "type": "string",
            "description": "JPEG works everywhere; WebP files are about 30% smaller; PNG is lossless and large.",
            "default": "jpeg"
          },
          "quality": {
            "title": "JPEG/WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Image quality for JPEG and WebP (80 is a good balance for AI vision).",
            "default": 80
          },
          "zip": {
            "title": "Also make a ZIP per video",
            "type": "boolean",
            "description": "One ZIP with all frames of each video, linked in every row.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}