{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Forensic Viewer — Frames & Contact Sheets",
    "description": "Turn any video into timestamped frames, contact sheets and a JSON manifest in one fast ffmpeg pass. Built for AI agents that can see images but not video.",
    "version": "0.5",
    "x-build-id": "pbLIa2Sul0q1vsC3e"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/andrew_babo~video-forensic-viewer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-andrew_babo-video-forensic-viewer",
        "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/andrew_babo~video-forensic-viewer/runs": {
      "post": {
        "operationId": "runs-sync-andrew_babo-video-forensic-viewer",
        "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/andrew_babo~video-forensic-viewer/run-sync": {
      "post": {
        "operationId": "run-sync-andrew_babo-video-forensic-viewer",
        "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",
            "type": "array",
            "description": "Direct links to video files (MP4, MOV, MKV, WebM, AVI ...). Several videos can be processed in one run.",
            "items": {
              "type": "string"
            }
          },
          "keyValueStoreRecords": {
            "title": "Uploaded videos (key-value store records)",
            "type": "array",
            "description": "Videos you uploaded to an Apify key-value store, e.g. [{\"storeId\":\"<store id>\",\"key\":\"clip.mp4\"}]. Omit storeId to read from this run's own store."
          },
          "intervalSecs": {
            "title": "Seconds between frames",
            "type": "string",
            "description": "1 = one frame per second, 0.5 = two per second, 0.1 = ten per second. Any custom value between 0.02 and 60 works.",
            "default": "1"
          },
          "framesPerSheet": {
            "title": "Frames per contact sheet",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many frames are tiled into one contact sheet, e.g. 10, 20 or 30. The grid shape is chosen automatically from the video aspect ratio.",
            "default": 20
          },
          "startTimeSecs": {
            "title": "Start at (seconds)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip the beginning of the video.",
            "default": 0
          },
          "endTimeSecs": {
            "title": "Stop at (seconds)",
            "minimum": 0,
            "type": "integer",
            "description": "Leave empty to run to the end of the video."
          },
          "maxFrames": {
            "title": "Maximum frames",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Safety cap, mainly for 0.1 s intervals. The window is trimmed and the reason is reported instead of failing.",
            "default": 1500
          },
          "maxDurationSecs": {
            "title": "Maximum analysed duration (seconds)",
            "minimum": 0,
            "maximum": 36000,
            "type": "integer",
            "description": "Upper bound on how much of the video is analysed. 0 means no limit.",
            "default": 3600
          },
          "storeFrames": {
            "title": "Store full-resolution frames",
            "type": "boolean",
            "description": "Save every extracted frame as its own timestamped JPEG. Turn off to get contact sheets and the manifest only.",
            "default": true
          },
          "frameWidth": {
            "title": "Frame width (px)",
            "minimum": 160,
            "maximum": 3840,
            "type": "integer",
            "description": "Width of the stored frames. Height follows the original aspect ratio.",
            "default": 1280
          },
          "cellWidth": {
            "title": "Contact sheet cell width (px)",
            "minimum": 80,
            "maximum": 960,
            "type": "integer",
            "description": "Width of one tile inside a contact sheet.",
            "default": 320
          },
          "jpegQuality": {
            "title": "JPEG quality",
            "minimum": 2,
            "maximum": 15,
            "type": "integer",
            "description": "ffmpeg quality scale: 2 is best quality and largest files, 15 is smallest.",
            "default": 4
          },
          "dedupeThreshold": {
            "title": "Significant change threshold",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Frames whose visual difference from the previous frame is below this score are flagged as near-duplicates in the manifest. Nothing is deleted; downstream analysis can skip them.",
            "default": 3
          },
          "concurrency": {
            "title": "Parallel videos",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many videos are processed at the same time in one run.",
            "default": 2
          },
          "maxFileSizeMb": {
            "title": "Max video size (MB)",
            "minimum": 1,
            "maximum": 8192,
            "type": "integer",
            "description": "Videos larger than this are skipped with an error entry.",
            "default": 2048
          },
          "requestTimeoutSecs": {
            "title": "Download timeout (s)",
            "minimum": 10,
            "maximum": 3600,
            "type": "integer",
            "description": "Timeout for downloading a single video URL.",
            "default": 300
          },
          "speedMode": {
            "title": "Speed mode",
            "enum": [
              "fast",
              "balanced",
              "accurate"
            ],
            "type": "string",
            "description": "fast = base model (cheapest, quickest). balanced = small model (better for Vietnamese, accents, names). accurate = large-v3-turbo. Only used when transcription is on; an explicit transcriptionModel overrides it.",
            "default": "fast"
          },
          "transcribe": {
            "title": "Transcribe speech",
            "type": "boolean",
            "description": "Run on-machine speech recognition (CTranslate2 large-v3-turbo, 99 languages, no external API). Audio is decoded in CPU-optimized batches.",
            "default": false
          },
          "transcriptionModel": {
            "title": "Speech model",
            "enum": [
              "base",
              "small",
              "turbo"
            ],
            "type": "string",
            "description": "All models are bundled in the image, so nothing is downloaded at run time. Version 0.4 always uses large-v3-turbo in its optimized CTranslate2 path; older choices remain compatible with the fallback engine.",
            "default": "turbo"
          },
          "transcriptionLanguage": {
            "title": "Speech language",
            "type": "string",
            "description": "'auto' detects the language per chunk. Or give an ISO code such as en, vi, es, ja.",
            "default": "auto"
          },
          "wordTimestamps": {
            "title": "Word-level timestamps",
            "type": "boolean",
            "description": "Give every word its own start and end time (DTW alignment). Turn off for slightly faster runs.",
            "default": true
          },
          "skipSilence": {
            "title": "Skip silence (VAD)",
            "type": "boolean",
            "description": "Use the built-in Silero voice activity detector so silent stretches are never sent through recognition.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}