{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Frames & Keyframes for AI Vision (Scenes, OCR)",
    "description": "Turn video files into timestamped frames an AI model can see: scene-change keyframes, every N seconds, N evenly spaced or exact timestamps, plus contact sheets and optional OCR of on-screen text. Reads only the parts it needs. No API keys.",
    "version": "0.1",
    "x-build-id": "VwJ5w4K1fCyo9X73u"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/errandkit~video-frames-for-ai/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-errandkit-video-frames-for-ai",
        "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/errandkit~video-frames-for-ai/runs": {
      "post": {
        "operationId": "runs-sync-errandkit-video-frames-for-ai",
        "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/errandkit~video-frames-for-ai/run-sync": {
      "post": {
        "operationId": "run-sync-errandkit-video-frames-for-ai",
        "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": [
          "rightsConfirmed"
        ],
        "properties": {
          "rightsConfirmed": {
            "title": "I own these videos or have the rights to process them",
            "type": "boolean",
            "description": "By running this Actor, you (the buyer) confirm that you own every video you submit or have the rights to process it. Required; on by default. If set to false, the run fails with RIGHTS_NOT_CONFIRMED before downloading anything. Streaming-platform links (YouTube, TikTok, Instagram, Facebook, X, Vimeo, Twitch, Dailymotion, Reddit) are refused.",
            "default": true
          },
          "videoUrls": {
            "title": "Video file URLs",
            "type": "array",
            "description": "Direct links to video files you have rights to (MP4, MOV, WebM, MKV, AVI, M4V ...). Links to YouTube, TikTok, Instagram, Facebook, X, Vimeo, Twitch, Dailymotion or Reddit are refused (STREAMING_PLATFORM_NOT_SUPPORTED).",
            "items": {
              "type": "string"
            }
          },
          "uploadedFile": {
            "title": "Or upload a video",
            "type": "string",
            "description": "Upload one video file from your computer."
          },
          "videos": {
            "title": "Videos (advanced, JSON)",
            "type": "array",
            "description": "For API and agent use: [{\"name\": \"demo.mp4\", \"url\": \"https://...\"}] or [{\"name\": \"clip.mp4\", \"content_base64\": \"...\"}] (base64 up to 25 MB)."
          },
          "mode": {
            "title": "Which frames",
            "enum": [
              "scenes",
              "interval",
              "count",
              "timestamps"
            ],
            "type": "string",
            "description": "scenes: a frame wherever the picture changes (cuts, new slides). interval: one every N seconds. count: N evenly spaced. timestamps: the exact times you list.",
            "default": "scenes"
          },
          "intervalSeconds": {
            "title": "Interval (seconds)",
            "minimum": 1,
            "maximum": 3600,
            "type": "integer",
            "description": "For mode 'interval'.",
            "default": 10
          },
          "frameCount": {
            "title": "Number of frames",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "For mode 'count'.",
            "default": 12
          },
          "timestamps": {
            "title": "Timestamps",
            "type": "array",
            "description": "For mode 'timestamps': seconds (83.5) or mm:ss / hh:mm:ss.mmm, one per line.",
            "items": {
              "type": "string"
            }
          },
          "maxFrames": {
            "title": "Max frames per video",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Upper limit in every mode. In scenes mode the strongest changes are kept.",
            "default": 30
          },
          "sceneThreshold": {
            "title": "Scene sensitivity",
            "type": "string",
            "description": "Scenes mode: minimum picture change between keyframes, 0.01-1. Lower finds more scenes. Default 0.12.",
            "default": "0.12"
          },
          "dedupe": {
            "title": "Drop near-duplicate frames",
            "type": "boolean",
            "description": "Skip a frame that looks the same as the previous one (not in timestamps mode). Dropped frames are not charged.",
            "default": true
          },
          "imageFormat": {
            "title": "Image format",
            "enum": [
              "jpeg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "File type of the frame images.",
            "default": "jpeg"
          },
          "imageMaxWidth": {
            "title": "Max image width (px)",
            "minimum": 0,
            "maximum": 7680,
            "type": "integer",
            "description": "Wider frames are scaled down to this width. 0 keeps the original size. 1024 suits most vision models.",
            "default": 1024
          },
          "jpegQuality": {
            "title": "JPEG/WebP quality",
            "minimum": 30,
            "maximum": 100,
            "type": "integer",
            "description": "30-100.",
            "default": 85
          },
          "contactSheet": {
            "title": "Contact sheets",
            "type": "boolean",
            "description": "Also save contact sheets: up to 24 timestamped thumbnails in one image. Free.",
            "default": true
          },
          "includeBase64": {
            "title": "Include images as base64",
            "type": "boolean",
            "description": "Put each frame's image bytes in its dataset item, for agents that can't open URLs. Use a smaller max width.",
            "default": false
          },
          "ocr": {
            "title": "Read on-screen text (OCR)",
            "type": "boolean",
            "description": "Run OCR on every frame (slides, code, captions). Charged only for frames where text was found.",
            "default": false
          },
          "ocrLanguage": {
            "title": "OCR language",
            "enum": [
              "eng",
              "spa",
              "fra",
              "deu",
              "por",
              "ita",
              "eng+spa",
              "eng+fra"
            ],
            "type": "string",
            "description": "Tesseract language code(s).",
            "default": "eng"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}