{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Frame Extractor (direct links) for AI Vision",
    "description": "Turn direct video links (MP4, MOV, WebM, MKV, TS, AVI) into still frames: N evenly spaced, one every X seconds, or exact timestamps. $0.003 per video + $0.001 per frame (10 frames = $0.013) + Apify's small start fee. Failed videos and blank frames are free. Not for YouTube/TikTok pages.",
    "version": "0.1",
    "x-build-id": "UxAEuCUa6Vsmwhu30"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/asunoki~video-frame-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-asunoki-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/asunoki~video-frame-extractor/runs": {
      "post": {
        "operationId": "runs-sync-asunoki-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/asunoki~video-frame-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-asunoki-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 you own or are allowed to process: MP4, MOV, M4V, WebM, MKV, TS or AVI (your storage, S3/R2/GCS signed URLs, a CDN, Dropbox ?dl=1). Not supported: video platform pages (YouTube, TikTok, Instagram, Vimeo, ...) whose terms do not allow downloading, streaming playlists (HLS .m3u8, DASH), and links to private or local network addresses.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "datasetId": {
            "title": "Or: dataset ID from another run",
            "type": "string",
            "description": "Take video links from another Actor run's dataset (fields videoUrl, downloadUrl, mediaUrl, url or video.*). Rows without a direct link are ignored for free."
          },
          "datasetField": {
            "title": "Dataset field with the link (optional)",
            "type": "string",
            "description": "Dot path to the link in each dataset row, e.g. media.src. Leave empty to detect common field names."
          },
          "mode": {
            "title": "Which frames",
            "enum": [
              "count",
              "interval",
              "timestamps"
            ],
            "type": "string",
            "description": "count: N frames, each from the middle of an equal slice (never the black first/last frame). interval: one frame every X seconds. timestamps: the moments you list.",
            "default": "count"
          },
          "frameCount": {
            "title": "Frames per video (count mode)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "8-20 frames are usually enough for a vision model to understand a video.",
            "default": 10
          },
          "intervalSeconds": {
            "title": "Seconds between frames (interval mode)",
            "minimum": 0.1,
            "type": "number",
            "description": "Interval mode: seconds between frames, starting at the start time. 0.5 = two frames per second.",
            "default": 5
          },
          "timestamps": {
            "title": "Timestamps (timestamps mode)",
            "type": "array",
            "description": "Seconds (90, 90.5), clock format (1:30, 00:01:30.250) or 1m30s. Times past the end of a video are skipped for free.",
            "items": {
              "type": "string"
            }
          },
          "startTime": {
            "title": "Start at",
            "type": "string",
            "description": "Optional, e.g. 30, 0:30 or 1m. Applies to count and interval modes."
          },
          "endTime": {
            "title": "End at",
            "type": "string",
            "description": "Optional, e.g. 300 or 5:00. Empty = end of the video."
          },
          "maxFramesPerVideo": {
            "title": "Max frames per video",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Hard cap in every mode, so a long video cannot produce more frames than you expect.",
            "default": 50
          },
          "imageFormat": {
            "title": "Image format",
            "enum": [
              "jpg",
              "webp",
              "png"
            ],
            "type": "string",
            "description": "JPG is smallest and works everywhere; WEBP is smaller at the same quality; PNG is lossless and larger.",
            "default": "jpg"
          },
          "maxWidth": {
            "title": "Max width (px)",
            "minimum": 0,
            "maximum": 7680,
            "type": "integer",
            "description": "Wider frames are scaled down (aspect ratio kept, never scaled up). 0 = original size.",
            "default": 1280
          },
          "quality": {
            "title": "Quality (JPG/WEBP)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Compression quality for JPG and WEBP (higher = sharper and bigger files).",
            "default": 85
          },
          "skipBlankFrames": {
            "title": "Skip blank frames",
            "type": "boolean",
            "description": "When a chosen frame is one flat colour (black fade, white flash), step forward 0.5 s up to twice. Still blank = skipped and not charged.",
            "default": true
          },
          "inlineDataUri": {
            "title": "Include data URI in each row",
            "type": "boolean",
            "description": "Adds the image as a base64 data URI to each dataset row, so an AI agent or workflow can pass it straight to a vision model. Keep maxWidth small (e.g. 512) when this is on.",
            "default": false
          },
          "maxDurationMinutes": {
            "title": "Use at most this many minutes of each video",
            "minimum": 1,
            "maximum": 1440,
            "type": "integer",
            "description": "Safety limit for very long files: frames are only taken from the first N minutes (from the start).",
            "default": 180
          },
          "maxDownloadMbPerVideo": {
            "title": "Max download per video (MB)",
            "minimum": 1,
            "maximum": 2048,
            "type": "integer",
            "description": "Safety limit on the bytes fetched for one video (all frames together). Only the parts around each moment are read, so 10-20 frames of a 1080p video usually need 20-40 MB. Over the limit, the video stops and the remaining frames are not charged.",
            "default": 200
          },
          "maxSecondsPerVideo": {
            "title": "Max processing time per video (seconds)",
            "minimum": 10,
            "maximum": 3600,
            "type": "integer",
            "description": "Stops taking frames from one video after this time; frames not taken are not charged.",
            "default": 300
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}