{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Frame Extractor: Stills Every N Seconds or at Set Times",
    "description": "Extract frames from video links (MP4, WebM, MOV, MKV, HLS .m3u8): evenly spaced video frames, one every N seconds, or at exact times, as JPG, PNG or WebP stills with public links, plus length, fps and codec. Pay per frame.",
    "version": "0.1",
    "x-build-id": "fjUbDVEqBQDPhm1mM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dtkfoundry~video-frame-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dtkfoundry-video-frame-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/dtkfoundry~video-frame-extractor/runs": {
      "post": {
        "operationId": "runs-sync-dtkfoundry-video-frame-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/dtkfoundry~video-frame-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-dtkfoundry-video-frame-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, one per line: .mp4, .webm, .mov, .mkv, .avi, .m3u8 (HLS) and most other formats ffmpeg reads. Links to pages with a player (YouTube, TikTok, Vimeo, Instagram ...) are not video files and are skipped. Up to 500 per run. Leave empty for a free format example.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Which frames",
            "enum": [
              "count",
              "interval",
              "timestamps"
            ],
            "type": "string",
            "description": "Count = a set number of frames spread evenly over the video. Interval = one frame every N seconds. Timestamps = frames at the exact times you list.",
            "default": "count"
          },
          "framesPerVideo": {
            "title": "Frames per video (count mode)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many evenly spaced frames to take from each video, 1-1000. Each sits at the middle of an equal slice of the video, so the black first frame is skipped.",
            "default": 10
          },
          "intervalSeconds": {
            "title": "Seconds between frames (interval mode)",
            "type": "string",
            "description": "One frame every this many seconds, starting at the start time (0 by default). Decimals allowed, e.g. 0.5 or 2.5.",
            "default": "10"
          },
          "timestamps": {
            "title": "Times (timestamps mode)",
            "type": "array",
            "description": "One time per line, in seconds or as minutes:seconds or hours:minutes:seconds: \"95\", \"1:35\", \"0:01:35.5\". The same times are used for every video; times past the end of a video are skipped and not charged.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startTime": {
            "title": "Start time",
            "type": "string",
            "description": "Count and interval modes: take frames from this point on (seconds or 1:30 style). Empty = the start of the video."
          },
          "endTime": {
            "title": "End time",
            "type": "string",
            "description": "Count and interval modes: take frames up to this point (seconds or 1:30 style). Empty = the end of the video."
          },
          "maxFramesPerVideo": {
            "title": "Maximum frames per video",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "A cap for every mode, 1-1000. Each frame is one charged result.",
            "default": 100
          },
          "imageFormat": {
            "title": "Image format",
            "enum": [
              "jpg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "JPG (small, the default), PNG (lossless, large) or WebP (smallest).",
            "default": "jpg"
          },
          "imageQuality": {
            "title": "Image quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1-100 for JPG and WebP (PNG is always lossless). 85 is a good default; lower makes smaller files.",
            "default": 85
          },
          "maxWidth": {
            "title": "Maximum width (pixels)",
            "minimum": 0,
            "maximum": 7680,
            "type": "integer",
            "description": "Scale frames down to at most this width, keeping the aspect ratio; smaller videos are not scaled up. 0 = the video's own size. 1280 suits most AI vision models.",
            "default": 0
          },
          "contactSheet": {
            "title": "Contact sheet",
            "type": "boolean",
            "description": "Also make one JPG grid of each video's frames (up to 100, 320 px each), free of charge. Its link is in every frame record as contactSheetUrl.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed for most links. Turn on Apify Proxy (or give your own proxy) if a host refuses downloads from cloud servers. Proxy traffic is billed by Apify to your account as usual.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}