> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gladia.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Export subtitles (SRT/VTT)

> Generate caption files directly from transcripts

<Badge color="blue" size="lg" icon="file-audio">
  Pre-recorded
</Badge>

You can export completed transcripts in both SRT and VTT formats for subtitles and captions.

<Tip>
  You can use the `subtitles` feature alongside `translation`. You'll have subtitles in the original language, and in each targeted translation language.
</Tip>

```json Pre-recorded theme={"system"}
{
  "audio_url": "YOUR_AUDIO_URL",
  "subtitles": true,
  "subtitles_config": {
    "formats": ["srt", "vtt"],
    "minimum_duration": 1,
    "maximum_duration": 5,
    "maximum_characters_per_row": 42,
    "maximum_rows_per_caption": 2,
    "style": "compliance"
  }
}
```

The `subtitles_config` object supports:

<ParamField body="formats" type="enum[&#x22;srt&#x22;, &#x22;vtt&#x22;]">
  The format of the subtitles.
</ParamField>

<ParamField body="minimum_duration" type="number">
  The minimum duration of the subtitles in seconds (min 0).
</ParamField>

<ParamField body="maximum_duration" type="number">
  The maximum duration of the subtitles in seconds (min 1, max 30).
</ParamField>

<ParamField body="maximum_characters_per_row" type="number">
  The maximum number of characters per row (min 1).
</ParamField>

<ParamField body="maximum_rows_per_caption" type="number">
  The maximum number of rows per caption (min 1, max 5).
</ParamField>

<ParamField body="style" type="enum[&#x22;default&#x22;, &#x22;compliance&#x22;]">
  The style of the subtitles ("default" or "compliance").
</ParamField>

The JSON response adds a `subtitles` array with items like:

```json Pre-recorded theme={"system"}
{
  "format": "srt",
  "subtitles": "1\n00:00:00,210 --> 00:00:04,711....."
}
```
