{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Frame Extractor: Thumbnails & Frames from Video URLs",
    "description": "Thumbnails and frames from direct video URLs or uploads: evenly spaced, every N seconds or at scene changes. JPEG/WebP, timestamps. $1.20 per 1,000 frames.",
    "version": "0.1",
    "x-build-id": "DSeG8Rk9XZ4fPul28"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ataism~video-frames/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ataism-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/ataism~video-frames/runs": {
      "post": {
        "operationId": "runs-sync-ataism-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/ataism~video-frames/run-sync": {
      "post": {
        "operationId": "run-sync-ataism-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",
        "properties": {
          "videoUrls": {
            "title": "Video file URLs",
            "type": "array",
            "description": "Direct http(s) links to video files (mp4, webm, mov, mkv, avi, ogv and more), one per line. Private and local addresses are blocked, and robots.txt is respected. To use a file from your computer, upload it with the next field.",
            "items": {
              "type": "string"
            }
          },
          "videoFiles": {
            "title": "Uploaded files",
            "type": "array",
            "description": "Upload files from your computer (the editor stores them in a key-value store), or paste key-value store record URLs."
          },
          "method": {
            "title": "How to pick frames",
            "enum": [
              "interval",
              "scene"
            ],
            "type": "string",
            "description": "Interval: evenly spaced frames, or one every N seconds. Scene changes: the first frame plus the frames where the picture changes (compares keyframes; costs a scene-minute event per started minute analysed, more for 4K or very frequent keyframes). Not offered for VP9 or Motion JPEG video (free error row): use Interval.",
            "default": "interval"
          },
          "frames": {
            "title": "Frames per video",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Interval method: this many frames, evenly spaced over the video (each from the middle of an equal slice). Ignored when \"Every N seconds\" is set.",
            "default": 5
          },
          "everySeconds": {
            "title": "Every N seconds",
            "minimum": 0,
            "type": "number",
            "description": "Interval method: one frame at 0 s, N s, 2N s and so on. 0 means use \"Frames per video\" instead. At least 0.5.",
            "default": 0
          },
          "seek": {
            "title": "Seeking",
            "enum": [
              "keyframe",
              "accurate"
            ],
            "type": "string",
            "description": "Keyframe (fast, the default): each frame is the keyframe nearest to the wanted time, so positions are only as exact as the keyframe spacing (often 2 to 10 s) and two wanted times can share a keyframe (you then get fewer frames). Accurate: the frame at the wanted time, which decodes up to the next keyframe's worth of video, so long videos with few keyframes are slower (and snapped to a keyframe when it would take too long). The real time of every frame is in timestampSec.",
            "default": "keyframe"
          },
          "maxFramesPerVideo": {
            "title": "Max frames per video",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "No video gives more frames than this, whatever the other settings ask for. Hard cap 500.",
            "default": 100
          },
          "sceneThreshold": {
            "title": "Scene change threshold",
            "minimum": 0.02,
            "maximum": 0.95,
            "type": "number",
            "description": "Scene method: how different a keyframe must be from the one before it to count as a new scene. It is the mean brightness difference as a fraction of the full range: 0.2 catches most cuts, lower finds more changes (and more false ones), higher only hard cuts. 0.02 to 0.95.",
            "default": 0.2
          },
          "minSceneGapSeconds": {
            "title": "Minimum seconds between scenes",
            "minimum": 0,
            "type": "number",
            "description": "Scene method: a change closer than this to the previous kept frame is skipped.",
            "default": 1
          },
          "outputFormat": {
            "title": "Frame format",
            "enum": [
              "jpeg",
              "webp"
            ],
            "type": "string",
            "description": "JPEG works everywhere. WebP is smaller for the same quality.",
            "default": "jpeg"
          },
          "quality": {
            "title": "Quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1 to 100. 80 is a good balance. A saved frame is at most 4 MB: a larger one (4K at full width and a high quality) is re-encoded at a lower quality, then a smaller width, and its row says outputCapped.",
            "default": 80
          },
          "maxWidth": {
            "title": "Max width (px)",
            "minimum": 0,
            "maximum": 4096,
            "type": "integer",
            "description": "Frames wider than this are scaled down (height follows; never scaled up). 0 keeps the video's own size. Up to 4096 (videos above 4096 x 2160 are refused). A saved frame is at most 4 MB, see Quality.",
            "default": 1280
          },
          "contactSheet": {
            "title": "Contact sheet",
            "type": "boolean",
            "description": "Also save one image per video with up to 100 of its frames tiled together (thumbnail strip). Not charged.",
            "default": false
          },
          "maxFileSizeMb": {
            "title": "Max video file size (MB)",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Larger files are skipped, not charged. Hard cap 2000 MB; also limited by the run's disk (2x memory), so give big files more memory. The first 100 MB of each video are included in the frame price; above that an input-100mb event applies per started 100 MB.",
            "default": 500
          },
          "maxDurationMinutes": {
            "title": "Max video length (minutes)",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Longer videos are skipped, not charged. The length is measured from the video itself, not read from the file header. Hard cap 120 minutes.",
            "default": 30
          },
          "allowSlowHosts": {
            "title": "Allow slow hosts",
            "type": "boolean",
            "description": "A site whose robots.txt asks for more than 2 seconds between requests is skipped unless this is on; the delay is then honoured in full, up to 10 s at the default 1,024 MB of memory (longer delays are always skipped; the limit shrinks in proportion when you give the run more memory).",
            "default": false
          },
          "downloadTimeoutSecs": {
            "title": "Download timeout (seconds)",
            "minimum": 10,
            "maximum": 3600,
            "type": "integer",
            "description": "Per video, including redirects.",
            "default": 600
          },
          "mode": {
            "title": "Mode",
            "type": "string",
            "description": "Internal: \"selfTest\" runs the maintainer health check and saves no items.",
            "default": "run"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}