{
  "openapi": "3.0.1",
  "info": {
    "title": "Add Subtitles to Videos",
    "description": "Burn karaoke-style word-highlighted subtitles into videos. Upload a clip or paste a URL, choose font, size, and highlight color, and download a captioned MP4.",
    "version": "0.1",
    "x-build-id": "OvfWf8QyS3ZwmTk4Z"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dadhalfdev~add-subtitles-to-videos/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dadhalfdev-add-subtitles-to-videos",
        "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/dadhalfdev~add-subtitles-to-videos/runs": {
      "post": {
        "operationId": "runs-sync-dadhalfdev-add-subtitles-to-videos",
        "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/dadhalfdev~add-subtitles-to-videos/run-sync": {
      "post": {
        "operationId": "run-sync-dadhalfdev-add-subtitles-to-videos",
        "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": [
          "video"
        ],
        "properties": {
          "video": {
            "title": "Video",
            "type": "string",
            "description": "Upload a video file or paste a direct URL (mp4, mov, webm, mkv). One video per run, at most 3 minutes and 50 MB."
          },
          "transcriptJson": {
            "title": "Transcript JSON (optional)",
            "type": "string",
            "description": "Optional. Leave empty to transcribe the video automatically. Upload a transcript JSON (from a previous output, after fixing words) to skip speech-to-text and burn these captions instead."
          },
          "transcriptJsonContent": {
            "title": "Or paste transcript JSON (optional)",
            "type": "object",
            "description": "Optional. Same as the transcript file, but pasted in the console. Ignored if you also upload a transcript file."
          },
          "fontFamily": {
            "title": "Font family",
            "enum": [
              "montserrat",
              "poppins",
              "oswald",
              "inter",
              "roboto",
              "rubik",
              "nunito",
              "anton",
              "bebas_neue",
              "archivo_black",
              "raleway",
              "lato",
              "work_sans",
              "dm_sans",
              "outfit",
              "kanit",
              "teko",
              "russo_one",
              "righteous",
              "barlow_condensed"
            ],
            "type": "string",
            "description": "Typeface used for the burned-in captions.",
            "default": "montserrat"
          },
          "fontSize": {
            "title": "Font size",
            "minimum": 16,
            "maximum": 120,
            "type": "integer",
            "description": "Caption size in pixels. 36–48 works well for vertical 1080×1920 videos; use 24–32 for landscape.",
            "default": 40
          },
          "textColor": {
            "title": "Text color",
            "type": "string",
            "description": "Color of words that are not currently spoken. Use hex (#FFF or #FFFFFF) or a name such as white, black, yellow, or orange.",
            "default": "#FFFFFF"
          },
          "highlightColor": {
            "title": "Spoken-word highlight color",
            "type": "string",
            "description": "Background color overlaid on the word being spoken. Use hex (#FF0 or #FFCC00) or a name such as yellow, orange, or green.",
            "default": "#003399"
          },
          "outlineColor": {
            "title": "Outline color",
            "type": "string",
            "description": "Stroke around each word so captions stay readable on light or busy backgrounds. Hex (#000 or #000000) or a name such as black.",
            "default": "#000000"
          },
          "uppercase": {
            "title": "Uppercase captions",
            "type": "boolean",
            "description": "Render every word in uppercase.",
            "default": true
          },
          "position": {
            "title": "Caption position",
            "enum": [
              "bottom",
              "center",
              "top"
            ],
            "type": "string",
            "description": "Vertical placement of the subtitle block.",
            "default": "bottom"
          },
          "maxWordsPerCaption": {
            "title": "Words per caption",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "How many words appear on screen at once. 3–5 is typical for short-form captions.",
            "default": 5
          },
          "language": {
            "title": "Spoken language",
            "enum": [
              "en",
              "es",
              "pt",
              "fr",
              "de",
              "it",
              "nl",
              "pl",
              "tr",
              "ru",
              "ja",
              "ko",
              "zh",
              "ar",
              "hi"
            ],
            "type": "string",
            "description": "Language of the video audio, used by Mistral Voxtral for transcription.",
            "default": "en"
          },
          "mistralApiKey": {
            "title": "Mistral API key",
            "type": "string",
            "description": "Optional override. A Mistral key is already configured. Set this only if you want to use a different account."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}