{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Thumbnail Generator - Contact Sheets & GIF Previews",
    "description": "Create video contact sheets with timestamps, pick the best thumbnails automatically (sharp, well-exposed, no black frames) and make animated GIF/WebP preview clips from any video URL. Runs ffmpeg inside the Actor, no external APIs.",
    "version": "1.0",
    "x-build-id": "FIF0k4ouYe4cbZRCa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/freecamp008~video-thumbnail-generator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-freecamp008-video-thumbnail-generator",
        "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/freecamp008~video-thumbnail-generator/runs": {
      "post": {
        "operationId": "runs-sync-freecamp008-video-thumbnail-generator",
        "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/freecamp008~video-thumbnail-generator/run-sync": {
      "post": {
        "operationId": "run-sync-freecamp008-video-thumbnail-generator",
        "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 URLs",
            "type": "array",
            "description": "Direct links to video files (MP4, MOV, MKV, WEBM, AVI, OGV, M4V, TS, ...). Each video becomes one result with its contact sheet, thumbnails and preview animations. The link must return the video file itself, not a web page with a player.",
            "items": {
              "type": "string"
            }
          },
          "contactSheet": {
            "title": "Contact sheet",
            "type": "boolean",
            "description": "Create one image with a grid of evenly spaced frames, timestamps and a header with file name, duration, resolution and codec.",
            "default": true
          },
          "sheetColumns": {
            "title": "Columns",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "Number of frames per row on the contact sheet.",
            "default": 4
          },
          "sheetRows": {
            "title": "Rows",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Number of rows on the contact sheet. Columns x rows frames are taken at equal intervals.",
            "default": 4
          },
          "sheetWidth": {
            "title": "Sheet width (px)",
            "minimum": 400,
            "maximum": 4000,
            "type": "integer",
            "description": "Width of the contact sheet image in pixels. The height follows from the video's aspect ratio and the number of rows.",
            "default": 1600
          },
          "sheetTimestamps": {
            "title": "Timestamps on frames",
            "type": "boolean",
            "description": "Print the time of each frame (m:ss or h:mm:ss) in the corner of the tile.",
            "default": true
          },
          "sheetHeader": {
            "title": "Header with video info",
            "type": "boolean",
            "description": "Add a header with the file name, duration, resolution, frame rate, codecs and file size.",
            "default": true
          },
          "sheetSkipBlack": {
            "title": "Avoid black frames",
            "type": "boolean",
            "description": "If a sampled frame is black or blank (fade, cut to black), take a frame slightly later instead.",
            "default": true
          },
          "smartThumbnails": {
            "title": "Smart thumbnails",
            "type": "boolean",
            "description": "Score frames across the whole video for sharpness, exposure, contrast, detail (entropy) and color, skip black and blank frames, and save the best, visually different ones as images.",
            "default": true
          },
          "thumbnailCount": {
            "title": "Number of thumbnails",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many of the best frames to save per video. They are chosen to show different scenes.",
            "default": 3
          },
          "thumbnailWidth": {
            "title": "Thumbnail width (px)",
            "minimum": 0,
            "maximum": 3840,
            "type": "integer",
            "description": "Width of each thumbnail in pixels (height keeps the aspect ratio). 0 = original video resolution. Videos are never upscaled.",
            "default": 1280
          },
          "imageFormat": {
            "title": "Image format",
            "enum": [
              "jpeg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "File format for thumbnails and the contact sheet.",
            "default": "jpeg"
          },
          "imageQuality": {
            "title": "Image quality",
            "minimum": 30,
            "maximum": 100,
            "type": "integer",
            "description": "JPEG / WebP quality (30-100). Ignored for PNG.",
            "default": 85
          },
          "gifPreview": {
            "title": "Animated GIF preview",
            "type": "boolean",
            "description": "Create a short looping animated GIF preview of the video.",
            "default": true
          },
          "webpPreview": {
            "title": "Animated WebP preview",
            "type": "boolean",
            "description": "Create the same preview as an animated WebP (much smaller than GIF, full color).",
            "default": true
          },
          "previewMode": {
            "title": "Preview style",
            "enum": [
              "montage",
              "clip"
            ],
            "type": "string",
            "description": "<b>Highlights montage</b>: short snippets from the best-looking, different moments of the video, in order. <b>Single clip</b>: one continuous clip that starts at <i>Clip start</i> (or around the best frame if empty).",
            "default": "montage"
          },
          "previewDurationSec": {
            "title": "Preview length (s)",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "Total length of the animated preview in seconds.",
            "default": 6
          },
          "previewSnippets": {
            "title": "Snippets in montage",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "Number of snippets in a highlights montage (each one is preview length / snippets long).",
            "default": 4
          },
          "previewStartSec": {
            "title": "Clip start (s)",
            "type": "number",
            "description": "Single clip mode only: start time of the clip in seconds. Leave empty to center the clip on the best frame."
          },
          "previewWidth": {
            "title": "Preview width (px)",
            "minimum": 120,
            "maximum": 720,
            "type": "integer",
            "description": "Width of the animated preview in pixels (height keeps the aspect ratio).",
            "default": 480
          },
          "previewFps": {
            "title": "Preview frame rate",
            "minimum": 2,
            "maximum": 24,
            "type": "integer",
            "description": "Frames per second of the animated preview. 10-12 fps keeps GIFs small; 24 fps is smoother.",
            "default": 10
          },
          "maxGifSizeMB": {
            "title": "Max GIF size (MB)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "If the GIF comes out larger (grainy or noisy footage), it is re-encoded with fewer colors, a lower frame rate and a smaller size until it fits. WebP previews are usually 5-10x smaller.",
            "default": 5
          },
          "maxDurationMinutes": {
            "title": "Max duration per video (minutes)",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Only the first N minutes of each video are analyzed (and billed). Longer videos are marked <code>truncated: true</code>.",
            "default": 180
          },
          "maxFileSizeMB": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 8192,
            "type": "integer",
            "description": "Videos larger than this are skipped (free). The file is downloaded to the Actor's disk before processing.",
            "default": 2048
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}