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

# Captions or AI

> How mode decides where the transcript comes from.

A transcript comes from one of two sources:

| Source | Speed | Uses AI hours |
| - | - | - |
| The video's captions | Usually a few seconds | No |
| AI transcription | Slower | Yes |

Captions come from the creator or the platform. AI transcription works on anything with speech.

## Choose a mode

| `mode` | What happens |
| - | - |
| `auto` (default) | Captions if the video has them, AI transcription if it doesn't. |
| `native` | Captions only. A video without them returns `CAPTIONS_UNAVAILABLE`. |
| `generate` | Always AI transcription, even when captions exist. |

Only YouTube, X and LinkedIn videos can have captions. Instagram reels, Facebook videos and files never do, so `auto` always transcribes them with AI and `native` returns `CAPTIONS_UNAVAILABLE`.

## Language

`lang` takes a code like `en`, `de` or `es-US`.

| Source | What `lang` does |
| - | - |
| Captions | Picks the caption track. If there's no track in that language, you get `LANGUAGE_NOT_AVAILABLE` with `availableLangs`. |
| AI transcription | Tells the model which language is spoken. Leave it out and the language is detected. |

Every transcript includes its language (`lang`) and the video's caption languages (`availableLangs`).

## AI transcription limits

| Limit | Max | Error |
| - | - | - |
| Media length | 2 hours | `VIDEO_TOO_LONG` |
| File size | 2 GB | `FILE_TOO_LARGE` |

Captions have no length limit. A 5-hour YouTube video with captions works with `mode=native`.

See [Usage and limits](https://docs.bestvideotranscriptapi.com/concepts/usage-and-limits.md) for how AI hours are counted.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.