{
  "openapi": "3.0.1",
  "info": {
    "title": "SRT Subtitle Generator: Auto Subtitles for Video & Audio",
    "description": "Generate SRT subtitles for any video or audio: ready-to-upload SRT and WebVTT files with broadcast formatting (42 characters per line, 2 lines, max 6 s) and exact word timing, in 99 languages or translated to English. Whisper, no API key. Pay per minute.",
    "version": "1.0",
    "x-build-id": "dWVSTTqOxL8W4u3GW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fguiraud~srt-subtitle-generator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fguiraud-srt-subtitle-generator",
        "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/fguiraud~srt-subtitle-generator/runs": {
      "post": {
        "operationId": "runs-sync-fguiraud-srt-subtitle-generator",
        "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/fguiraud~srt-subtitle-generator/run-sync": {
      "post": {
        "operationId": "run-sync-fguiraud-srt-subtitle-generator",
        "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": {
          "sources": {
            "title": "Video or audio URLs",
            "type": "array",
            "description": "Direct links to the video or audio to subtitle (MP4, MOV, WEBM, MKV, MP3, WAV...). Google Drive, Dropbox, OneDrive and GitHub share links work too. For TikTok, Instagram, X (Twitter) or Facebook video links use Video to Text Transcriber (fguiraud/video-to-text-transcriber); for YouTube, YouTube Transcript Scraper (fguiraud/youtube-transcript-scraper).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "base64Files": {
            "title": "Files as base64 (optional)",
            "type": "array",
            "description": "Short media files without a URL, e.g. from an AI agent: [{\"fileName\": \"memo.m4a\", \"content\": \"<base64>\"}]. Keep the total input under ~9 MB; use URLs for longer recordings."
          },
          "datasetId": {
            "title": "Read links from another Actor's dataset (optional)",
            "type": "string",
            "description": "A dataset from another Actor run, e.g. a podcast, TikTok or Google Drive scraper. The audio or video link in each row is transcribed, whatever the field is called (audioUrl, videoUrl, mediaUrl, url...), up to 10,000 rows. Pick the dataset here so the Actor is allowed to read it. Rows without a link are listed in a free warning row."
          },
          "datasetItems": {
            "title": "Or paste dataset rows (optional)",
            "type": "array",
            "description": "Rows from another Actor's dataset, e.g. [{\"audioUrl\": \"https://example.com/episode.mp3\"}], or plain links. The media link in each row is found automatically; set 'Dataset field with the link' if it is not."
          },
          "datasetField": {
            "title": "Dataset field with the link (optional)",
            "type": "string",
            "description": "Field of the dataset rows that holds the media link, e.g. audioUrl or media.url (dot path for nested fields). Leave empty to detect it."
          },
          "model": {
            "title": "Model",
            "enum": [
              "base",
              "small",
              "tiny"
            ],
            "type": "string",
            "description": "'base': good accuracy, fast (recommended). 'small': best accuracy, especially for accents, noisy audio and non-English speech; slower and billed at a higher per-minute price. 'tiny': fastest draft quality.",
            "default": "base"
          },
          "language": {
            "title": "Spoken language",
            "type": "string",
            "description": "ISO code of the spoken language (en, es, de, fr, pt, it, ja, zh, ...) or 'auto' to detect it. Setting it avoids misdetection on short clips.",
            "default": "auto"
          },
          "task": {
            "title": "Task",
            "enum": [
              "transcribe",
              "translate"
            ],
            "type": "string",
            "description": "'transcribe': text in the spoken language. 'translate': translate the speech to English text.",
            "default": "transcribe"
          },
          "vocabulary": {
            "title": "Vocabulary (names, jargon)",
            "type": "array",
            "description": "Words the speech recognition should favour: people and company names, product names, technical terms (e.g. 'Kubernetes', 'Dr. Nguyen', 'Apify'). Improves spelling of rare words.",
            "items": {
              "type": "string"
            }
          },
          "termCorrections": {
            "title": "Term corrections (optional)",
            "type": "object",
            "description": "Up to 50 heard forms and their correct spelling, e.g. {\"Cloud flare\": \"Cloudflare\", \"a pie fi\": \"Apify\"}. Applied to the text, segments, subtitles and documents (whole words, case-insensitive). 'Vocabulary' helps Whisper hear names; this fixes what it still gets wrong."
          },
          "outputs": {
            "title": "What to return",
            "type": "array",
            "description": "'text': full transcript split into paragraphs at pauses. 'segments': timestamped segments. 'srt' / 'vtt': ready-to-use subtitle files. 'chunks': ~chunkSize-character passages with start/end times and a token estimate, ready for vector databases. 'markdown': paragraphs prefixed with their start time, e.g. '**[00:01:23]** ...'.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "markdown",
                "segments",
                "srt",
                "vtt",
                "chunks"
              ],
              "enumTitles": [
                "Text",
                "Markdown with timestamps",
                "Timestamped segments",
                "SRT subtitles",
                "WebVTT subtitles",
                "RAG chunks with timestamps"
              ]
            },
            "default": [
              "srt",
              "vtt"
            ]
          },
          "subtitleMaxChars": {
            "title": "Subtitle line length (characters)",
            "minimum": 20,
            "maximum": 80,
            "type": "integer",
            "description": "Maximum characters per subtitle line (42 is the common broadcast and YouTube standard; use 32-37 for vertical/mobile video).",
            "default": 42
          },
          "subtitleMaxLines": {
            "title": "Lines per subtitle",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Maximum lines shown at once in each subtitle (when line length is set).",
            "default": 2
          },
          "subtitleMaxDuration": {
            "title": "Max seconds per subtitle",
            "minimum": 1,
            "maximum": 15,
            "type": "number",
            "description": "Longest time a single subtitle stays on screen (when line length is set).",
            "default": 6
          },
          "estimateOnly": {
            "title": "Check the cost first (free estimate)",
            "type": "boolean",
            "description": "Nothing is transcribed or charged (only the Actor start). Lists every file and podcast episode with its length and expected cost, read from the feed or from the file header without downloading it, plus a total row.",
            "default": false
          },
          "maxTotalMinutes": {
            "title": "Max total minutes per run",
            "minimum": 0,
            "type": "integer",
            "description": "Stop once this many audio minutes were charged in the run. The files not reached come back as free rows with status 'skipped'. 0 = no limit. Together with Apify's own run spending limit, this keeps a large batch within budget.",
            "default": 0
          },
          "skipFilesLongerThanMinutes": {
            "title": "Skip files longer than (minutes)",
            "minimum": 0,
            "type": "integer",
            "description": "Files longer than this are not transcribed and not charged (a free row says how long they were). 0 = no limit. Different from 'Max minutes per file', which transcribes only the beginning of long files.",
            "default": 0
          },
          "aiInsights": {
            "title": "AI summary, chapters and action items",
            "type": "boolean",
            "description": "Analyse each transcript with Claude: title, summary, key points, chapters with start times, action items and topics (in 'insights'). Requires your Anthropic API key; Claude usage is billed to your Anthropic account, plus one small 'AI insights' event per file.",
            "default": false
          },
          "anthropicApiKey": {
            "title": "Anthropic API key",
            "type": "string",
            "description": "Your key from console.anthropic.com. Stored as a secret input; used only to call Claude for this run."
          },
          "insightsModel": {
            "title": "Claude model",
            "enum": [
              "claude-opus-5-5",
              "claude-sonnet-5-5",
              "claude-haiku-5-5",
              "claude-opus-5",
              "claude-sonnet-5",
              "claude-haiku-4-5"
            ],
            "type": "string",
            "description": "'claude-opus-5-5': best quality (default). 'claude-sonnet-5-5': cheaper, great for meetings and podcasts. 'claude-haiku-5-5': cheapest. The older models still work.",
            "default": "claude-opus-5-5"
          },
          "insightsInstructions": {
            "title": "Insights instructions",
            "type": "string",
            "description": "Optional, e.g. 'Summarise in Spanish', 'Focus on decisions and owners', 'Chapters every ~10 minutes'."
          },
          "subtitleLanguages": {
            "title": "Translated subtitles (optional)",
            "type": "array",
            "description": "Also make SRT and VTT subtitles in these languages (up to 5), e.g. Spanish, German, Japanese. Timings and speaker labels are kept; returned in 'translatedSubtitles' (and as files with 'Also save downloadable files'). Translated by Claude with your Anthropic API key; billed as the AI insights event, once per file.",
            "items": {
              "type": "string"
            }
          },
          "saveFiles": {
            "title": "Also save downloadable files",
            "type": "boolean",
            "description": "Save the transcript (.txt) and subtitles (.srt / .vtt, if selected in outputs) as files in the run's key-value store; the result includes their download links.",
            "default": true
          },
          "wordTimestamps": {
            "title": "Word-level timestamps",
            "type": "boolean",
            "description": "Add start/end times for every word inside each segment (for karaoke-style captions or precise search). Slightly slower.",
            "default": false
          },
          "chunkSize": {
            "title": "Chunk size (characters)",
            "minimum": 200,
            "maximum": 20000,
            "type": "integer",
            "description": "Target size of 'RAG chunks'.",
            "default": 1000
          },
          "skipSilence": {
            "title": "Skip silence",
            "type": "boolean",
            "description": "Detect speech first and skip silent parts. Faster and reduces hallucinated text in long pauses.",
            "default": true
          },
          "maxDurationMinutes": {
            "title": "Max minutes per file",
            "minimum": 1,
            "maximum": 1440,
            "type": "integer",
            "description": "Only the first N minutes of each file are transcribed (and billed).",
            "default": 240
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Larger files are skipped (not billed).",
            "default": 1000
          },
          "failOnError": {
            "title": "Fail the run if any file fails",
            "type": "boolean",
            "description": "Mark the run as FAILED when a file cannot be transcribed. Useful for pipelines and monitoring.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}