# Subtitles

> VEED’s Subtitles API transforms raw footage into polished, publish-ready content with professional burned-in subtitles starting at a base rate of $0.10 per minute.


## Overview

- **Endpoint**: `https://fal.run/veed/subtitles`
- **Model ID**: `veed/subtitles`
- **Category**: video-to-video
- **Kind**: inference


## Pricing

Your request will cost $0.10 per minute of input video, with a 2x multiplier for resolutions above 1080p and a 2x multiplier for dynamic styling. Minimum charge: 1 minute.

For more details, see [fal.ai pricing](https://fal.ai/pricing).

## API Information

This model can be used via our HTTP API or more conveniently via our client libraries.
See the input and output schema below, as well as the usage examples.


### Input Schema

The API accepts the following input parameters:


- **`video_url`** (`string`, _required_):
  Upload or paste a URL to the video you want to subtitle.
  - Examples: "https://v3b.fal.media/files/b/0a967ce5/iARc_J0kLN9OEmiXnxT3l_substyle-example-input.mp4"

- **`preset`** (`PresetEnum`, _required_):
  Each style defines fonts, colors, layout, and animation. Two tiers with different pricing:
  
  - Dynamic presets (2x multiplier): glass, whisper, glide2, fusion, glide, terminal, handwritten. Richer, context-aware rendering that adapts to the input.
  - Basic presets (1x multiplier): simple, plain, beans, corpo, boo, shadeplay, casper, capri, lowkey, vinta, diego, ali, slay, kitty, hustle, karl, sprout, flex, mint, rizz, vegas. Fixed, lightweight styling with predictable output.
  - Options: `"glass"`, `"whisper"`, `"glide2"`, `"fusion"`, `"glide"`, `"terminal"`, `"handwritten"`, `"simple"`, `"plain"`, `"beans"`, `"corpo"`, `"boo"`, `"shadeplay"`, `"casper"`, `"capri"`, `"lowkey"`, `"vinta"`, `"diego"`, `"ali"`, `"slay"`, `"kitty"`, `"hustle"`, `"karl"`, `"sprout"`, `"flex"`, `"mint"`, `"rizz"`, `"vegas"`
  - Examples: "glass"

- **`language`** (`Enum`, _optional_):
  Improves transcription accuracy, and should match the source audio (not output subtitles).
  - Options: `"af-ZA"`, `"am-ET"`, `"ar-AE"`, `"ar-BH"`, `"ar-DZ"`, `"ar-EG"`, `"ar-IL"`, `"ar-IQ"`, `"ar-JO"`, `"ar-KW"`, `"ar-LB"`, `"ar-MA"`, `"ar-OM"`, `"ar-PS"`, `"ar-QA"`, `"ar-SA"`, `"ar-TN"`, `"as-IN"`, `"ast-ES"`, `"az-AZ"`, `"ba"`, `"bas"`, `"be-BY"`, `"bg-BG"`, `"bn-BD"`, `"bn-IN"`, `"bo"`, `"br"`, `"bs-BA"`, `"ca-ES"`, `"ceb-PH"`, `"ckb-IQ"`, `"cs-CZ"`, `"cy-GB"`, `"da-DK"`, `"de-DE"`, `"dyu"`, `"el-GR"`, `"en-AU"`, `"en-GB"`, `"en-IN"`, `"en-NZ"`, `"en-US"`, `"eo"`, `"es-AR"`, `"es-BO"`, `"es-CL"`, `"es-CO"`, `"es-CR"`, `"es-DO"`, `"es-EC"`, `"es-ES"`, `"es-GT"`, `"es-HN"`, `"es-MX"`, `"es-NI"`, `"es-PA"`, `"es-PE"`, `"es-PR"`, `"es-PY"`, `"es-SV"`, `"es-US"`, `"es-UY"`, `"es-VE"`, `"et-EE"`, `"eu-ES"`, `"fa-IR"`, `"ff"`, `"fi-FI"`, `"fil-PH"`, `"fo"`, `"fr-CA"`, `"fr-FR"`, `"fy"`, `"ga"`, `"gd"`, `"gl-ES"`, `"gu-IN"`, `"ha-NG"`, `"haw"`, `"he-IL"`, `"hi-IN"`, `"hi-Latn-IN"`, `"hr-HR"`, `"hsb"`, `"ht"`, `"hu-HU"`, `"hy-AM"`, `"id-ID"`, `"ig"`, `"is-IS"`, `"it-IT"`, `"ja-JP"`, `"ja-Latn-JP"`, `"jv-ID"`, `"ka-GE"`, `"kab"`, `"kam-KE"`, `"kas"`, `"kea-CV"`, `"kk-KZ"`, `"km-KH"`, `"kn-IN"`, `"ko-KR"`, `"ku"`, `"ky-KG"`, `"la"`, `"lb-LU"`, `"lg"`, `"lij"`, `"ln-CD"`, `"lo-LA"`, `"lt-LT"`, `"luo-KE"`, `"lv-LV"`, `"mg"`, `"mi-NZ"`, `"mk-MK"`, `"ml-IN"`, `"mn-MN"`, `"mr-IN"`, `"ms-MY"`, `"mt-MT"`, `"my-MM"`, `"nb-NO"`, `"ne-NP"`, `"nl-NL"`, `"nn"`, `"nso-ZA"`, `"ny-MW"`, `"oc-FR"`, `"or"`, `"pa-IN"`, `"pl-PL"`, `"ps-AF"`, `"pt-BR"`, `"pt-PT"`, `"ro-RO"`, `"roh"`, `"ru-RU"`, `"rw-RW"`, `"sa"`, `"sah"`, `"sd-IN"`, `"si-LK"`, `"sk-SK"`, `"sl-SI"`, `"sm"`, `"sn-ZW"`, `"so-SO"`, `"sq-AL"`, `"sr-Latn-RS"`, `"sr-RS"`, `"srd"`, `"ss"`, `"su-ID"`, `"sv-SE"`, `"sw-KE"`, `"sw-TZ"`, `"ta-IN"`, `"ta-LK"`, `"ta-MY"`, `"ta-SG"`, `"te-IN"`, `"tg-TJ"`, `"th-TH"`, `"tk"`, `"tn"`, `"tok"`, `"ton"`, `"tr-TR"`, `"ts-ZA"`, `"tt"`, `"uk-UA"`, `"umb-AO"`, `"ur-IN"`, `"ur-PK"`, `"uz-UZ"`, `"vi-VN"`, `"vro"`, `"wo-SN"`, `"xh-ZA"`, `"yi"`, `"yo-NG"`, `"yue-Hant-HK"`, `"zh"`, `"zh-HK"`, `"zh-TW"`, `"zu-ZA"`

- **`srt_file_url`** (`string`, _optional_):
  Upload or paste a URL to your .srt subtitles file. When provided, transcription is skipped.

- **`srt_content`** (`string`, _optional_):
  Paste raw SRT subtitle text. Alternative to srt_file_url. When provided, transcription is skipped.

- **`customization`** (`PresetCustomization`, _optional_):
  Optional preset overrides: vertical position, shadow intensity, and per-tier text styling (font, weight, hex colour) for each word-importance tier. Any omitted field keeps the preset's default.



**Required Parameters Example**:

```json
{
  "video_url": "https://v3b.fal.media/files/b/0a967ce5/iARc_J0kLN9OEmiXnxT3l_substyle-example-input.mp4",
  "preset": "glass"
}
```


### Output Schema

The API returns the following output format:

- **`video`** (`File`, _required_):
  Rendered video with styled subtitles
  - Examples: {"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/0a967f2e/uiCpSaEvJM9I5zXP_Jmef_substyle-example-output-compilation-v2.mp4"}



**Example Response**:

```json
{
  "video": {
    "content_type": "video/mp4",
    "url": "https://v3b.fal.media/files/b/0a967f2e/uiCpSaEvJM9I5zXP_Jmef_substyle-example-output-compilation-v2.mp4"
  }
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/veed/subtitles \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "video_url": "https://v3b.fal.media/files/b/0a967ce5/iARc_J0kLN9OEmiXnxT3l_substyle-example-input.mp4",
     "preset": "glass"
   }'
```

### Python

Ensure you have the Python client installed:

```bash
pip install fal-client
```

Then use the API client to make requests:

```python
import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "veed/subtitles",
    arguments={
        "video_url": "https://v3b.fal.media/files/b/0a967ce5/iARc_J0kLN9OEmiXnxT3l_substyle-example-input.mp4",
        "preset": "glass"
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)
```

### JavaScript

Ensure you have the JavaScript client installed:

```bash
npm install --save @fal-ai/client
```

Then use the API client to make requests:

```javascript
import { fal } from "@fal-ai/client";

const result = await fal.subscribe("veed/subtitles", {
  input: {
    video_url: "https://v3b.fal.media/files/b/0a967ce5/iARc_J0kLN9OEmiXnxT3l_substyle-example-input.mp4",
    preset: "glass"
  },
  logs: true,
  onQueueUpdate: (update) => {
    if (update.status === "IN_PROGRESS") {
      update.logs.map((log) => log.message).forEach(console.log);
    }
  },
});
console.log(result.data);
console.log(result.requestId);
```


## Additional Resources

### Documentation

- [Model Playground](https://fal.ai/models/veed/subtitles)
- [API Documentation](https://fal.ai/models/veed/subtitles/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=veed/subtitles)

### fal.ai Platform

- [Platform Documentation](https://docs.fal.ai)
- [Python Client](https://docs.fal.ai/clients/python)
- [JavaScript Client](https://docs.fal.ai/clients/javascript)
