# YouTube transcript API with AI fallback

> YouTube transcript API: send a URL, get JSON, text, SRT or VTT. Uses the video's captions when they exist, AI transcription when not. 1 credit per minute.

Canonical: https://transcript1.com/features/youtube-transcript-api
Last updated: 2026-10-19

Send a URL to the YouTube transcript API and get JSON, text, SRT or VTT. transcript1 uses the video's captions when a usable track exists. Otherwise, it transcribes the audio with AI.

- Captions first, AI transcription as the fallback
- The same price either way: 1 credit per minute
- watch, youtu.be, Shorts and embed links

## Choose the source your application needs

### Every common YouTube link

Watch pages, youtu.be short links, Shorts, embeds and live links all resolve to the same video, with or without www.

### Captions when they exist

With source set to auto, creator captions win over auto-generated ones. Auto-translated tracks are never used.

### AI transcription when they do not

When no usable caption track exists, transcript1 uses speech-to-text. Set source to stt to always transcribe the audio.

### You see where the text came from

Every transcription reports transcript_source: youtube_captions or speech_to_text.

### One price

1 credit per media minute, rounded up, for captions and AI transcription alike. Failed and canceled transcriptions are not charged.

## Call the YouTube transcript API from your code

POST the video URL with your API key, from Python or any HTTP client. wait=60 holds the request open for up to 60 seconds. Read an unfinished job later by id. The [create-transcription API reference](https://transcript1.com/docs/api-reference#create-a-transcription) lists the request fields and status codes.

Create a key in the dashboard and use it from your server or script. Store the returned transcription id as soon as the request succeeds. A wait timeout is not a failed transcription: the job can continue after the HTTP response. Check its status through GET /v1/transcriptions/:id instead of making another create request.

Model the integration as a job lifecycle. Your application may see queued, fetching and transcribing before a final status. A completed job has a transcript to read; a failed job has an error to handle. Keep those outcomes distinct so a network delay or unavailable video does not appear to your users as an empty successful transcript.

### cURL

```
curl -X POST "https://api.transcript1.com/v1/transcriptions?wait=60" \
  -H "Authorization: Bearer $TRANSCRIPT1_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"platform":"youtube","url":"https://youtu.be/dQw4w9WgXcQ"}'
```

## Check transcript\_source in the response

A transcript made from captions says so, and says whether the track was creator-uploaded or auto-generated. billed_minutes is the media duration rounded up. See the [transcription object reference](https://transcript1.com/docs/api-reference#the-transcription-object) for all response fields.

Retain transcript_source and caption_kind when your application needs provenance. Creator captions preserve their published wording and do not provide word-level timings. Auto-generated captions provide word starts, while speech-to-text provides word start and end times with confidence. The JSON below illustrates the response shape rather than quoting the example video.

Do not treat the top-level transcript text as the only useful result. Segments carry start and end seconds that let you build a source-linked reader, align notes with playback or retrieve the relevant passage for an assistant. Read JSON with include=words only when your interface needs the additional word data.

### Response (shortened)

```
{
  "id": "tr_8fK2Lm0PqRsTuVwXyZaBcD",
  "status": "completed",
  "transcript_source": "youtube_captions",
  "caption_kind": "auto_generated",
  "language": "en",
  "billed_minutes": 4,
  "transcript": {
    "text": "Welcome back to the channel. Today we are looking at how transcripts are made.",
    "segments": [
      { "start": 0, "end": 4.2, "speaker": null, "language": "en", "text": "Welcome back to the channel." }
    ]
  }
}
```

## Choose captions or AI transcription

source is auto by default. Use captions to fail with no_captions (and no charge) when a video has no usable track, or stt to always transcribe the audio. The [source selection guide](https://transcript1.com/docs/sources-and-options#source) explains how language and speaker options affect that choice.

Use captions-only mode when your workflow specifically requires the published caption track. Use speech-to-text when you need a fresh audio transcript or speaker diarization. With auto, requesting diarize=true takes the speech-to-text path even if captions exist. Combining diarization with captions-only mode is rejected rather than silently dropping the speaker option.

The language option also affects source selection. A usable caption track must match the requested language, or the original video language when auto is selected. Automatically translated tracks are not used. A language hint for speech-to-text does not turn this endpoint into a translation service.

### Request body

```
{
  "platform": "youtube",
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "source": "stt"
}
```

## Handle unavailable videos and repeat requests

Classify errors before retrying. A private video, an age restriction or an active livestream requires a different input. A captions-only no_captions result requires a decision about whether speech-to-text is acceptable. By contrast, a processing job should be read again by id. The [error reference](https://transcript1.com/docs/errors) provides the codes your client should handle.

For a retriable create request, use the [Idempotency-Key contract](https://transcript1.com/docs/api-reference#idempotency). Recent-result reuse is a separate option for matching an earlier video and option set. Also distinguish reused from cached: a cached transcript can still be billed as a new job, while reading an existing completed job does not spend minutes.

If you are building a multi-platform application, YouTube, X, TikTok and Bluesky support usable native captions with speech-to-text as the auto fallback. The same create endpoint accepts [TikTok](https://transcript1.com/features/tiktok-transcript), [Instagram](https://transcript1.com/features/instagram-transcript) and other supported links. Your input validation should follow the [source capability matrix](https://transcript1.com/docs/sources-and-options) rather than offer an unsupported source combination.

## Frequently asked questions

### Does the YouTube transcript API work without captions?

Yes. With source set to auto, the default, transcript1 transcribes the audio when no usable caption track exists. Set source to captions if you would rather such videos fail than use AI transcription.

### Which YouTube links are accepted?

Watch pages, youtu.be short links, Shorts, embeds and live links. Channel pages and playlist-only links return 422 invalid_url.

### Can I transcribe a private video?

No. Only public and unlisted videos can be fetched. Private, age-restricted and live videos fail. For a file you own, upload it instead.

### How much does a YouTube transcript cost?

1 credit per minute, rounded up, for captions or AI transcription. New accounts get 60 free minutes once, after email verification. No card required.

### Is this the youtube-transcript-api Python package?

No. transcript1 is a hosted REST API. To use the YouTube transcript API from Python, send an HTTP request with your API key.

## Related

- [Timestamps and SRT/VTT subtitles](https://transcript1.com/features/timestamps-srt-vtt)
- [Audio and video file transcription](https://transcript1.com/features/audio-video-transcription-api)
- [Webhooks](https://transcript1.com/features/webhooks)
- [Content repurposing](https://transcript1.com/use-cases/content-repurposing)
