{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Frames & Thumbnails Extractor (Scenes, Keyframes)",
    "description": "Extract still frames from your videos: every N seconds, N evenly spaced, exact timestamps, keyframes or scene changes, plus a best-thumbnail pick and contact sheets. JPEG/PNG/WebP with timestamps and ffprobe metadata. URLs or key-value stores. Priced per frame.",
    "version": "1.0",
    "x-build-id": "l5d2XTrzob9um4TBh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tinplatelabs~video-frames/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tinplatelabs-video-frames",
        "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/tinplatelabs~video-frames/runs": {
      "post": {
        "operationId": "runs-sync-tinplatelabs-video-frames",
        "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/tinplatelabs~video-frames/run-sync": {
      "post": {
        "operationId": "run-sync-tinplatelabs-video-frames",
        "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": [
          "videos"
        ],
        "properties": {
          "videos": {
            "title": "Video files",
            "type": "array",
            "description": "Videos to extract frames from, one per line: direct <b>http(s) URLs</b> of video files, files in a key-value store as <code>kvs://KEY</code> (the store picked below, or this run's store) or <code>kvs://STORE_ID_OR_NAME/KEY</code>, or signed Apify record URLs (with <code>?signature=</code>). MP4, MOV, WebM, MKV, AVI, MPEG-TS, animated GIF and more. Links to YouTube, TikTok, Instagram, Vimeo and other platform pages are <b>not supported</b>. Up to 100 videos per run, 2 GB each.",
            "items": {
              "type": "string"
            }
          },
          "keyValueStoreId": {
            "title": "Key-value store",
            "type": "string",
            "description": "Your key-value store that holds the video files. Pick it (or paste its ID) and list its records as <code>kvs://KEY</code>. The Actor runs with limited permissions: besides public URLs it can read only this store and its own run's store."
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "count",
              "interval",
              "timestamps",
              "keyframes",
              "scenes",
              "thumbnail"
            ],
            "type": "string",
            "description": "Which frames to take. <b>count</b>: N evenly spaced frames. <b>interval</b>: one frame every N seconds. <b>timestamps</b>: the exact times you list. <b>keyframes</b>: every I-frame (fast). <b>scenes</b>: the first frame and each scene change (cut). <b>thumbnail</b>: the single best frame (sharpest, well exposed) among several candidates.",
            "default": "count"
          },
          "frameCount": {
            "title": "Number of frames (count mode)",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many evenly spaced frames to take in <code>count</code> mode (1-5000). Each frame is the middle of an equal slice of the video, so black first and last frames are avoided.",
            "default": 10
          },
          "interval": {
            "title": "Interval (interval mode)",
            "type": "string",
            "description": "Seconds between frames in <code>interval</code> mode, e.g. <code>10</code>, <code>0.5</code> or <code>1:00</code>. The first frame is at the start.",
            "default": "10"
          },
          "timestamps": {
            "title": "Timestamps (timestamps mode)",
            "type": "array",
            "description": "Times to take frames at in <code>timestamps</code> mode: seconds (<code>12.5</code>), timecodes (<code>1:02:03.5</code>, <code>02:03</code>) or percentages of the duration (<code>50%</code>). Up to 1000. Times after the end are skipped with a warning.",
            "items": {
              "type": "string"
            }
          },
          "sceneThreshold": {
            "title": "Scene sensitivity (scenes mode)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Scene-change threshold in percent (1-100) for <code>scenes</code> mode. Lower finds more cuts (and gradual changes); higher finds only hard cuts. 30 suits most edited video; try 10-20 for slow fades, 40-50 for noisy footage.",
            "default": 30
          },
          "minSceneGapSeconds": {
            "title": "Minimum scene length (seconds)",
            "minimum": 0,
            "maximum": 3600,
            "type": "integer",
            "description": "In <code>scenes</code> mode, ignore a scene change closer than this to the previous one (avoids bursts during flashes and fast motion). 0 keeps all.",
            "default": 1
          },
          "thumbnailCandidates": {
            "title": "Thumbnail candidates (thumbnail mode)",
            "minimum": 2,
            "maximum": 60,
            "type": "integer",
            "description": "How many evenly spaced frames <code>thumbnail</code> mode scores (2-60, skipping the first and last 5%). The sharpest, best-exposed, most detailed one is returned; all candidate scores are listed in the summary. Charged as one best-thumbnail event per started 10 candidates.",
            "default": 10
          },
          "startTime": {
            "title": "Start time",
            "type": "string",
            "description": "Only use the video from this time on: seconds, a timecode or a percentage (e.g. <code>30</code>, <code>1:30</code>, <code>10%</code>). Empty: from the start."
          },
          "endTime": {
            "title": "End time",
            "type": "string",
            "description": "Only use the video up to this time: seconds, a timecode or a percentage. Empty: to the end."
          },
          "format": {
            "title": "Image format",
            "enum": [
              "jpeg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "Format of the saved frames and contact sheet.",
            "default": "jpeg"
          },
          "quality": {
            "title": "Quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "JPEG and WebP quality (1-100). Ignored for PNG.",
            "default": 85
          },
          "maxWidth": {
            "title": "Maximum width (px)",
            "minimum": 0,
            "maximum": 7680,
            "type": "integer",
            "description": "Frames wider than this are scaled down, keeping the aspect ratio (rotation and pixel aspect are applied). 0 keeps the original size. Frames are never scaled up.",
            "default": 1280
          },
          "contactSheet": {
            "title": "Contact sheet",
            "type": "boolean",
            "description": "Also save one grid image of the extracted frames (up to 100 tiles, each labelled with its timecode), charged as one contact sheet. Not used in thumbnail mode.",
            "default": false
          },
          "contactSheetColumns": {
            "title": "Contact sheet columns",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "Tiles per row in the contact sheet (1-12). The sheet is at most 2400 px wide.",
            "default": 4
          },
          "maxFramesPerVideo": {
            "title": "Maximum frames per video",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Upper limit of frames saved (and charged) per video, in any mode (1-5000). Extra frames are dropped with a warning and the summary is marked <code>truncated</code>.",
            "default": 300
          },
          "maxDurationMinutes": {
            "title": "Maximum video length (minutes)",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Longer videos get a TOO_LONG error item and are not charged (1-600).",
            "default": 240
          },
          "videoTimeoutSecs": {
            "title": "Timeout per video (seconds)",
            "minimum": 60,
            "maximum": 7200,
            "type": "integer",
            "description": "A video whose frames take longer to extract gets a TIMEOUT error item and is not charged (60-7200). Scene detection decodes every frame, so long high-resolution videos need more time or memory.",
            "default": 1800
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}