Docs

API reference

Every endpoint on one page. All of them sit under https://api.youtubetotext.ai, and every one takes the same header.

Every request
Authorization: Bearer ytt_<your-token>
POST/v1/api/transcribe

Queue one video and get a job id back.

Request body

FieldTypeWhat it is
language_codestring or nullISO-639-1/639-3 code of the video's spoken language, e.g. "en"; can improve quality. Omit to auto-detect.
tag_audio_eventsbooleanMark non-speech audio with tags like (laughter) or [music]. Off by default: the transcriber picks the tag language itself and does not always match the video's language.
urlrequiredstringYouTube video URL
verbatimbooleanKeep filler words and repetitions instead of cleaning them up

Response

FieldTypeWhat it is
idrequiredstringJob id; poll GET /v1/api/transcription/{id} until `state` is `done`

Answers: 200, 401, 422, 429

GET/v1/api/transcription/{id}

Read a job: its state while it runs, its text when it is done.

Parameters

FieldTypeWhat it is
idrequiredstring

Response

FieldTypeWhat it is
backgroundrequiredboolean
burned_video_urlstring or null
created_atrequiredstring
durationinteger or null
errorstring or null
font_sizerequiredFontSize
idrequiredstring
is_previewboolean
lyricsboolean
lyrics_statusLyricsStatus or null
preview_minutesinteger or null
progressrequiredinteger
qualityrequiredQuality
srtstring or null
staterequiredState
tag_audio_eventsboolean
translationsTranslationApiResponse[]
txtstring or null
typerequiredTranscriptionType
updated_atrequiredstring
verbatimrequiredboolean
video_urlstring or null
webvttstring or null

Answers: 200, 401, 404, 422, 429

POST/v1/api/subtitles

Queue one video and get SRT and WebVTT cues back.

Request body

FieldTypeWhat it is
formatstringWhich field to read from the result; both are always populated
language_codestring or nullISO-639-1/639-3 code of the video's spoken language, e.g. "en"; can improve quality. Omit to auto-detect.
lyricsbooleanFor songs: build the subtitles from the song's published lyrics, timed on the audio. Where several singers sing different lines at once, every line is shown, stacked. Falls back to normal subtitles when no lyrics are found or they do not match what is sung; `lyrics_status` on the result says which happened. Off by default.
tag_audio_eventsbooleanMark non-speech audio with tags like (laughter) or [music]. Off by default: the transcriber picks the tag language itself and does not always match the video's language.
target_languagesarray or nullAlso translate into these languages (max 10), e.g. ["Spanish", "French"]
urlrequiredstringYouTube video URL
verbatimbooleanKeep filler words and repetitions instead of cleaning them up

Response

FieldTypeWhat it is
formatrequiredstringThe requested format, echoed back
idrequiredstringJob id; poll GET /v1/api/transcription/{id} until `state` is `done`

Answers: 200, 401, 422, 429

POST/v1/api/burn-subtitles

Queue one video and get a video with the captions rendered into it.

Request body

FieldTypeWhat it is
backgroundbooleanDraw a semi-transparent black box behind the subtitles for readability. Off = white text with a black outline.
font_sizeFontSizeSubtitle text size: default ≈7% of video height, large ≈10%, xl ≈12.5%.
language_codestring or nullISO-639-1/639-3 code of the video's spoken language, e.g. "en"; can improve quality. Omit to auto-detect.
lyricsbooleanFor songs: build the subtitles from the song's published lyrics, timed on the audio. Where several singers sing different lines at once, every line is shown, stacked. Falls back to normal subtitles when no lyrics are found or they do not match what is sung; `lyrics_status` on the result says which happened. Off by default.
qualityQualityOutput resolution: default = 720p, hd = 1080p, uhd = 4K
tag_audio_eventsbooleanMark non-speech audio with tags like (laughter) or [music]. Off by default: the transcriber picks the tag language itself and does not always match the video's language.
target_languagesarray or nullAlso produce a burned video per translated language (max 10), e.g. ["Spanish", "French"]
urlrequiredstringYouTube video URL
verbatimbooleanKeep filler words and repetitions instead of cleaning them up

Response

FieldTypeWhat it is
idrequiredstringJob id; poll GET /v1/api/transcription/{id} until `state` is `done`

Answers: 200, 401, 422, 429

The machine-readable version of this page is openapi.json, and it is what this page is generated from.