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.
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
preview_minutesinteger or null
progressrequiredinteger
qualityrequiredQuality
srtstring or null
staterequiredState
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.
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.
qualityQualityOutput resolution: default = 720p, hd = 1080p, uhd = 4K
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.