{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Thumbnail Generator – Best Frames, YouTube Size & VTT",
    "description": "Generate thumbnails from your video files: candidate frames are scored for sharpness, exposure and variety, black and blurry ones are skipped, and the best N come back as JPG, WebP or PNG in YouTube 1280×720, square or 9:16 size, with optional title text. VTT sprites for players. $3 per 1,000.",
    "version": "0.1",
    "x-build-id": "2Vulk6IgrcuGNkk2l"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gazidev~video-thumbnail-generator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gazidev-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/gazidev~video-thumbnail-generator/runs": {
      "post": {
        "operationId": "runs-sync-gazidev-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/gazidev~video-thumbnail-generator/run-sync": {
      "post": {
        "operationId": "run-sync-gazidev-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",
        "properties": {
          "videoUrls": {
            "title": "Video URLs (direct file links)",
            "type": "array",
            "description": "Direct links to video files: MP4, MOV, WebM, MKV, AVI, M4V, TS or HLS `.m3u8` (your CDN, S3/R2 bucket, Dropbox direct link...). Pages of YouTube, TikTok, Instagram, Vimeo etc. are not supported.",
            "items": {
              "type": "string"
            }
          },
          "bulkText": {
            "title": "Bulk list (paste text or CSV)",
            "type": "string",
            "description": "One URL per line or a CSV with a `url` column."
          },
          "datasetId": {
            "title": "Read URLs from an Apify dataset",
            "type": "string",
            "description": "Chain after another Actor: video URLs are read from this dataset."
          },
          "datasetField": {
            "title": "Dataset field with the video URL",
            "type": "string",
            "description": "Field name in that dataset.",
            "default": "url"
          },
          "thumbnailCount": {
            "title": "Thumbnails per video",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many of the best-scoring, visually different frames to return (ranked by score).",
            "default": 3
          },
          "candidates": {
            "title": "Candidate frames to score",
            "minimum": 8,
            "maximum": 100,
            "type": "integer",
            "description": "Evenly spaced frames between 5% and 95% of the video that are scored. More = better choice, slower. Not charged.",
            "default": 24
          },
          "preset": {
            "title": "Size preset",
            "enum": [
              "youtube-1280x720",
              "square-1080",
              "vertical-1080x1920",
              "original",
              "custom"
            ],
            "type": "string",
            "description": "Output size of each thumbnail.",
            "default": "youtube-1280x720"
          },
          "width": {
            "title": "Custom width (px)",
            "minimum": 64,
            "maximum": 3840,
            "type": "integer",
            "description": "Only for preset `custom`.",
            "default": 1280
          },
          "height": {
            "title": "Custom height (px)",
            "minimum": 64,
            "maximum": 3840,
            "type": "integer",
            "description": "Only for preset `custom`.",
            "default": 720
          },
          "fit": {
            "title": "Fit",
            "enum": [
              "cover",
              "contain"
            ],
            "type": "string",
            "description": "How a frame with a different aspect ratio is fitted into the preset.",
            "default": "cover"
          },
          "imageFormat": {
            "title": "Image format",
            "enum": [
              "jpg",
              "webp",
              "png"
            ],
            "type": "string",
            "description": "File format of the thumbnails.",
            "default": "jpg"
          },
          "quality": {
            "title": "Quality (JPEG/WebP)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Higher = sharper and bigger files.",
            "default": 88
          },
          "titleText": {
            "title": "Title text overlay",
            "type": "string",
            "description": "Optional text drawn on every thumbnail (bold white with a dark outline and gradient band). Leave empty for clean frames."
          },
          "titlePosition": {
            "title": "Title position",
            "enum": [
              "bottom",
              "top",
              "center"
            ],
            "type": "string",
            "description": "Where the title goes.",
            "default": "bottom"
          },
          "spriteSheet": {
            "title": "WebVTT sprite storyboard",
            "type": "boolean",
            "description": "Also build one tiled JPG sprite + `thumbnails.vtt` per video for player seek-bar previews (Video.js, Plyr, JW Player, hls.js...). Charged per video.",
            "default": false
          },
          "spriteIntervalSec": {
            "title": "Sprite: one tile every N seconds",
            "minimum": 1,
            "maximum": 600,
            "type": "number",
            "description": "Tile interval. At 5 s or more only keyframes are decoded (fast).",
            "default": 10
          },
          "spriteTileWidth": {
            "title": "Sprite tile width (px)",
            "minimum": 64,
            "maximum": 480,
            "type": "integer",
            "description": "Width of each tile; height follows the aspect ratio.",
            "default": 160
          },
          "maxSpriteMinutes": {
            "title": "Sprite: max minutes covered",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "The storyboard covers at most this many minutes from the start time.",
            "default": 60
          },
          "startTime": {
            "title": "Search from",
            "type": "string",
            "description": "Optional, e.g. `00:00:30` - skip intros."
          },
          "endTime": {
            "title": "Search until",
            "type": "string",
            "description": "Optional, e.g. `00:09:00` - skip end credits."
          },
          "maxDurationMinutes": {
            "title": "Max minutes per video",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Only this many minutes from the start time are considered. 0 = no limit.",
            "default": 240
          },
          "maxConcurrency": {
            "title": "Videos in parallel",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Each video also uses up to 4 parallel seeks.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Only for hosts that block datacenter IPs (HTTP 403).",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}