{
  "openapi": "3.0.1",
  "info": {
    "title": "Video to LLM Context - Keyframes, Transcript & Scenes for AI",
    "description": "Turn any video file into context an AI agent can read: scene list, one keyframe image per scene, Whisper transcript aligned to each scene, a keyframe grid and a ready-to-paste text block. No LLM inside. $0.002 per keyframe + $0.008 per audio minute.",
    "version": "1.0",
    "x-build-id": "nNXnvtkuch2gaRODR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kantolabs~video-to-llm-context/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kantolabs-video-to-llm-context",
        "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/kantolabs~video-to-llm-context/runs": {
      "post": {
        "operationId": "runs-sync-kantolabs-video-to-llm-context",
        "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/kantolabs~video-to-llm-context/run-sync": {
      "post": {
        "operationId": "run-sync-kantolabs-video-to-llm-context",
        "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": [
          "videoUrls"
        ],
        "properties": {
          "videoUrls": {
            "title": "Video file URLs",
            "type": "array",
            "description": "Direct links to video files (MP4, MOV, WEBM, MKV, AVI, M4V, MPEG-TS...), one per line. Your own storage, S3/R2/GCS (public or pre-signed URLs), CDNs, an Apify key-value store, Dropbox and Google Drive share links (shared as 'anyone with the link') all work. Pages of platforms such as YouTube, TikTok or Instagram are refused.",
            "default": [
              "https://api.apify.com/v2/key-value-stores/aXcXwfChlioPWAUJv/records/sample-vertical-talk.mp4?signature=105QVevs72w3z5gMQzgIJ"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxKeyframes": {
            "title": "Max scenes / keyframes per video",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Upper limit of scenes per video; each scene gets one keyframe image ($0.002 each). The strongest cuts are kept first. 8-16 suits most AI prompts; long videos without cuts are split into parts of at most 'Max scene length'.",
            "default": 12
          },
          "transcribe": {
            "title": "Transcribe speech",
            "type": "boolean",
            "description": "Transcribe the audio track with Whisper and align the words to each scene ($0.008 per started audio minute). Videos without speech or audio are not charged for audio. Turn off for keyframes only.",
            "default": true
          },
          "language": {
            "title": "Spoken language",
            "pattern": "^(auto|[a-zA-Z]{2,3})$",
            "type": "string",
            "description": "'auto' detects the language. Or a 2-letter ISO 639-1 code (en, es, de, fr, pt, ja, zh...) to skip detection - recommended for short clips.",
            "default": "auto"
          },
          "sceneThreshold": {
            "title": "Scene cut sensitivity",
            "enum": [
              "0.15",
              "0.2",
              "0.3",
              "0.4",
              "0.5"
            ],
            "type": "string",
            "description": "Minimum ffmpeg scene score (0-1) that counts as a cut. Lower finds subtler changes.",
            "default": "0.3"
          },
          "minSceneSeconds": {
            "title": "Min scene length (seconds)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Cuts closer together than this are merged, so fast montages do not produce a flood of tiny scenes.",
            "default": 2
          },
          "maxSceneSeconds": {
            "title": "Max scene length (seconds)",
            "minimum": 5,
            "maximum": 3600,
            "type": "integer",
            "description": "Shots longer than this (talking heads, screen recordings) are split into equal parts at pauses in the speech, while the scene limit allows. Real cuts are never moved.",
            "default": 60
          },
          "gridImage": {
            "title": "Keyframe grid image (free)",
            "type": "boolean",
            "description": "Also save ONE image with every keyframe tiled and labelled (scene number + time) - send a single image to a vision model instead of many. Not charged.",
            "default": true
          },
          "includeImageUrlsInContext": {
            "title": "Image links in llmContext",
            "type": "boolean",
            "description": "Put the keyframe and grid image links into the plain-text llmContext field. Turn off for a shorter text block (links stay in the scenes list).",
            "default": true
          },
          "keyframeMaxWidth": {
            "title": "Max keyframe width (px)",
            "minimum": 0,
            "maximum": 4096,
            "type": "integer",
            "description": "Keyframes wider than this are scaled down (aspect kept). 1024 is a good size for vision models. 0 = original size.",
            "default": 1024
          },
          "imageFormat": {
            "title": "Image format",
            "enum": [
              "jpg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "Format of the keyframe images.",
            "default": "jpg"
          },
          "imageQuality": {
            "title": "JPEG / WEBP quality",
            "minimum": 30,
            "maximum": 100,
            "type": "integer",
            "description": "30-100.",
            "default": 85
          },
          "skipBlankFrames": {
            "title": "Skip black / blank keyframes",
            "type": "boolean",
            "description": "When a keyframe is black or one flat colour, step forward up to 2 seconds inside the scene to a frame with content; if none, that scene has no image and it is not charged.",
            "default": true
          },
          "maxDurationMinutes": {
            "title": "Max video duration (minutes)",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Longer videos are skipped (free). Up to 300.",
            "default": 120
          },
          "maxVideoSizeMb": {
            "title": "Max video size (MB)",
            "minimum": 1,
            "maximum": 4000,
            "type": "integer",
            "description": "Larger files are skipped (free).",
            "default": 1000
          },
          "downloadTimeoutSecs": {
            "title": "Download timeout (seconds)",
            "minimum": 10,
            "maximum": 3600,
            "type": "integer",
            "description": "Give up on a video that does not download within this time (free).",
            "default": 600
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}