Skip to content
Captions & translation

AI Captions

Overview

Transcodely can transcribe a video’s audio track into a caption file automatically, using the generate subtitle operation. It runs on the same worker fleet that encodes your video — the audio is transcribed in-house, not handed off to a third-party captioning service, and it composes with the rest of the pipeline (HTTP Live Streaming (HLS) and MPEG-DASH packaging, other subtitle tracks, thumbnails).

Generated captions are always labelled as machine-produced. Transcodely makes no accuracy guarantee — see Honesty markers for exactly how that is surfaced.

For the full wire contract — fields, formats, validation — see the Subtitles reference.


Two ways to add captions

1. Caption a new transcode

Add a generate track to any output that has audio when you create the job. In the dashboard’s new-job flow (and the uploader), this is the Auto-generate captions checkbox; on the wire it is a single subtitle track, inside one entry of the job’s outputs:

{
  "subtitle_tracks": [
    { "operation": "generate" }
  ]
}

The spoken language is detected from the audio, so there is nothing to pick. To force one, set language on the track to an ISO 639-2 code (see Generating captions).

On a hosted upload: two flags

For a video you host with us, captions and insights are two flags on the call that creates it: auto_captions and auto_insights, on CreateUpload, CreateFromUrl and CreateMultipartUpload. The captions are made inline, by the same job as the encode, so there is no second call, and the language is detected for you. auto_insights runs insights over those captions and requires auto_captions.

{
  "app_id": "app_k1l2m3n4o5",
  "url": "https://example.com/talk.mp4",
  "auto_captions": true,
  "auto_insights": true
}

With the upload helper in the TypeScript SDK (software development kit), the same two flags are autoCaptions and autoInsights:

const video = await client.uploads.putFile("./eclipse.mp4", {
  appId: "app_k1l2m3n4o5",
  autoCaptions: true, // language detected for you
  autoInsights: true, // summary, chapters, Q&A, key terms
});

An AI agent can do the same through the hosted MCP (Model Context Protocol) server, where generate_captions, generate_insights and translate_captions are tools.

2. Retro-caption an already-hosted video

You do not need to re-encode a video to caption it. Point a captions-only job at a hosted video with input_video_id — no video variants, no re-encode:

curl -X POST https://api.transcodely.com/transcodely.v1.JobService/Create 
  -H "Authorization: Bearer ak_your_api_key" 
  -H "Content-Type: application/json" 
  -d '{
    "input_video_id": "vid_a1b2c3d4e5f6g7",
    "outputs": [
      { "subtitle_tracks": [{ "operation": "generate" }] }
    ]
  }'
import { SubtitleOperation } from "@transcodely/sdk";

const job = await client.jobs.create({
  inputVideoId: "vid_a1b2c3d4e5f6g7",
  outputs: [{ subtitleTracks: [{ operation: SubtitleOperation.GENERATE }] }],
});
job = client.jobs.create(
    input_video_id="vid_a1b2c3d4e5f6g7",
    outputs=[{"subtitle_tracks": [{"operation": "generate"}]}],
)
job, err := client.Jobs.Create(ctx, &transcodely.JobCreateParams{
    InputVideoId: proto.String("vid_a1b2c3d4e5f6g7"),
    Outputs: []*transcodely.OutputSpec{{
        SubtitleTracks: []*transcodely.SubtitleTrack{{Operation: transcodely.SubtitleOpGenerate}},
    }},
})

The call returns a job. When it completes, the new track is listed in the video’s text_tracks.

In the dashboard this is the Generate captions button on the video detail page. When the job finishes, the caption track appears there with an Auto-generated badge and a download link.

Running it again for a language the video already has replaces the earlier auto-generated track. If that track was listed in the video’s HLS manifest (captioned inline at upload), the manifest’s caption rendition is rewritten with the new text and the track stays in the manifest, so players keep seeing one entry per language. Captions you supplied yourself are never overwritten by a transcript.


Already have captions?

Captions from a human captioner, another platform or your own tooling can be attached to a hosted video as they are, with no job and no transcription. Free: no captions fee, no processing fee.

  • Formats: SubRip (.srt) or WebVTT (.vtt), detected from the content. The track is stored as WebVTT.
  • Encoding: UTF-8. A byte-order mark is fine; a file saved as UTF-16 or in another encoding is refused with a message to re-save it as UTF-8.
  • Size: at most 5 MB.
  • Timing: cue start times in order (overlapping cues are fine), and no cue ending more than 5 seconds after the end of the video. On a video that is still processing, that last check runs once processing finishes; a file that fails it is marked Failed with the reason.
  • One per language and kind: a video holds one uploaded track per language and kind (subtitles or captions, for the deaf and hard of hearing). Adding a second one is refused until you ask to replace it.

The video can be ready or still processing. An attached track behaves like a generated one: it is listed in text_tracks with uploaded: true and auto_generated: false, it plays in the hosted player and, when the video streams as HLS, it is added to the manifest as a subtitles rendition named after its label or its language (Deutsch, Deutsch (CC) for captions; Deutsch (uploaded) when the stream already lists AI captions of that name). It gets the same transcript files (JSON, plain text, Markdown), built from its cues. While the video is still processing, the track is attached as a sidecar file and added to the manifest once processing finishes.

In the dashboard

On the video’s Captions tab, Add captions sits next to Generate captions. Pick the .srt or .vtt file, its language (pre-filled from a name like lesson.en.srt), the kind and, optionally, the label viewers see in the captions menu. If the video already has an uploaded file of that language and kind, the dialog offers Replace existing. A file the API refuses shows the API’s own sentence, with the line or cue that is wrong.

Attached files are listed under the generated captions with an Uploaded badge, a download link, their transcript files, and the same Generate insights and Translate buttons as generated captions. When a language has both, those buttons on the generated captions say that the attached file is what gets read. The trash icon deletes a file after you confirm.

With the API

CreateTextTrack attaches a file by URL in one call; the track is ready in the response:

{
  "video_id": "vid_a1b2c3d4e5f6g7",
  "language": "en",
  "kind": "subtitles",
  "source": { "url": "https://example.com/lesson.en.srt" }
}

To upload the file yourself, send "source": { "upload": { "size_bytes": 48213 } } (the file’s exact size) instead: the response carries an upload_url, signed for exactly that size, to PUT the file to, then CompleteTextTrackUpload checks and attaches it. The PUT must carry a Content-Length of exactly size_bytes. language takes an ISO 639-1 (en), ISO 639-2 (eng) or BCP 47 (en-US) code from the supported languages, and is stored as ISO 639-2 (eng).

  • Refusals: text_track_invalid for a file that is not valid (the message says what is wrong and where), text_track_too_large over 5 MB, already_exists for a second track of the same language and kind.
  • Replace: pass "replace": true. The new track gets a new ID; the old one is removed once the new one is ready.
  • Delete: DeleteTextTrack with the track’s trk_ ID removes it from the player, the manifest and storage.
  • Request bodies: CompleteTextTrackUpload and DeleteTextTrack both take { "video_id": "vid_…", "text_track_id": "trk_…" }. CreateTextTrack returns the new track as text_track. Calling CompleteTextTrackUpload before the file was uploaded is refused with text_track_upload_missing; upload the file and call it again.
  • In use: while a running translation or a pending insights pass reads an attached track, replacing or deleting it is refused with captions_job_in_flight; try again once it finishes.

Translation and insights

An attached track is a source like generated captions. TranslateCaptions and GenerateInsights read it, and prefer it over AI captions of the same language. Translations of an attached track are added to the HLS manifest only when the stream also carries AI captions of the source language; otherwise they are attached as sidecar files, which the hosted player shows all the same. When the track a language is translated from changes (a first file attached over AI captions, a replace, or deleting the file that was the source), the language’s translations are marked Outdated: translate again to update them. Translation and insights are billed as usual.


Translating captions

Generated captions can be translated into up to ten other languages: at creation, or later for a video that is already captioned. Each language gets its own caption track with exactly the source’s cue timing (one cue in, one cue out), its own transcript files (JSON, plain text, Markdown) and, when the video streams as HLS, a caption rendition in the manifest that the player lists by the language’s own name (Deutsch, Български, 日本語).

At creation

Add translations to the generate track. Codes are ISO 639-2 three-letter:

{
  "subtitle_tracks": [
    { "operation": "generate", "translations": ["eng", "ger", "spa"] }
  ]
}

On the upload and import calls the same list is auto_translations, next to auto_captions. In the dashboard it is the Also translate captions into picker under the insights opt-in, in the uploader, the URL import and the new-job flow.

Afterwards

Already captioned a video in one language? TranslateCaptions translates the existing captions. Nothing is transcribed again, and the original source file is not needed:

{
  "id": "vid_a1b2c3d4e5f6g7",
  "target_languages": ["eng", "ger"]
}

source_language (ISO 639-2) is needed only when the video has captions in more than one language. The response carries the new job_id, the target_languages it translates into and an estimated_fee_eur; a language that is already being translated is listed under in_flight instead of being requested again. The call is refused with captions_required when the video has no captions, and with translation_busy when many translations are being started at once: retry that one after a few seconds.

In the dashboard each AI caption track and each attached caption file has a Translate button. A translated track shows a Translated from Български badge. When the source captions are regenerated later, existing translations are kept and marked Outdated. Translate again to update them; regenerating never re-translates (and never re-bills) on its own.

What else is translated

  • Insights: with insights on (or ready on the video), they are translated too, keeping every chapter time. Each language appears as one more insights entry with translated_from set. Highlights stay in the source language, because they are verbatim quotes of the transcript.
  • Not translated: subtitle tracks supplied on a transcode job, burned-in captions, highlight clips and the audio itself. There is no dubbing. Caption files you attached to a hosted video can be translated.

Codes are normalized to the bibliographic form (deu is answered as ger, fra as fre, zho as chi). The supported languages are listed in the Subtitles reference.


Caption style

The caption style decides how the words are cut into cues: how much text is on screen at once and for how long. Cues follow the speech, so a short pause does not end a cue, and no cue goes over the style’s limits. Three presets:

PresetOn screenGood for
CompactOne line of up to 42 characters, at most 4 secondsPhones and fast reading
Standard (default)Up to two lines of 42 characters, at most 7 secondsMost videos: about a sentence at a time
LongUp to two lines of 50 characters, at most 8 secondsLectures and talks

The style changes no word and no price.

Set the app default

In the dashboard, open the app’s Edit page and pick a preset under Caption style. Advanced sets the three limits yourself: characters per line (20 to 60), lines per cue (1 to 3) and seconds on screen (2 to 10). A limit left empty follows the preset. Reset to Standard clears the default. On the API this is cue_style on AppService.Update, where the limits are max_chars_per_line (20 to 60), max_lines (1 to 3) and max_cue_duration_ms (2000 to 10000, in milliseconds), for example {"cue_style": {"preset": "standard", "max_cue_duration_ms": 5000}}. The default applies to captions made from then on, including videos captioned at upload or import.

Pick a style for one video

With Auto-generate captions ticked, the uploader, the URL import and the new-job flow show which style will be used, the app default unless you pick another. Change picks a preset for that video or job only. On the wire it is cue_style next to auto_captions on the upload and import calls, or on the generate track:

{
  "subtitle_tracks": [
    { "operation": "generate", "cue_style": { "preset": "compact" } }
  ]
}

Restyle existing captions

Each language on a video’s Captions tab shows its default style, such as Style: Standard. Restyle… cuts the language’s captions into another preset from the stored transcript: nothing is transcribed again, every word and its timing is kept, and it is free.

Restyling keeps the style you have. A preset the language does not have yet is added next to it (Add a Compact version); one it has is re-cut in place (Re-cut Compact). Tick Make it the default to switch viewers to the new style once the job completes. On the API this is RestyleCaptions with make_default.

Several styles of one language

Each language lists its styles as rows: the default is labelled with the language alone, Bulgarian, with a Default badge, and every other style carries its preset, Bulgarian (compact). A language with one style shows only the language. Each style has its own download. Viewers switch between styles in the player’s captions menu, where they read Български and Български (compact): the language’s own name, like every caption language there.

  • Set default makes another style the one the player selects and the one translations are made from. The playlist is updated for viewers right away (SetDefaultCaptionStyle).
  • Delete removes a style after you confirm (DeleteCaptionStyle). The default cannot be deleted: make another style the default first.
  • Outdated marks a style cut from older captions. Regenerate captions transcribes again and replaces the style it is cut in (the language’s track in that style, else its default). The other styles are kept, but they were cut from the previous transcript: restyle them again to update them.

Translations follow the default style. They keep their timing when the default’s cues change, through a re-cut or a new default, and are marked Outdated; translate again to bring them onto the new cues.


Transcripts, insights and SEO

Every generate track also writes the transcript next to the caption file, as JSON, plain text and Markdown, at no extra charge. You can opt in to insights on the same track: title suggestions, a summary, key points, chapters, questions, key terms and verbatim highlights.

With insights or translations on, an AI pass also corrects recognition mistakes in the captions without changing their timing, and a glossary pins the spelling of your own names and terms.

  • Transcripts & Insights: the three transcript formats, the clean and literal styles, and how to request insights.
  • Highlight Clips: short MP4 clips of a hosted video, cut around the quotes its insights picked.
  • Video SEO: turning the transcript and insights into a watch page that search engines and AI assistants can read.

The hosted player shows all of it: every caption language in its captions menu, the AI chapters on the seek bar and a searchable transcript drawer opened from the control bar (see Embed API). A guide page, off until you turn it on, puts the player, the insights and the full transcript on one shareable page.


Accessibility for your whole library

Retro-captioning is the back-catalogue play: input_video_id lets you caption videos you uploaded months or years ago without re-encoding them, one API call (or one button) at a time. Script it across your library and every video gains a subtitle track without your originals being touched.

On the law, briefly and carefully, because most of what is written about it is wrong. The European Accessibility Act (Directive (EU) 2019/882) has applied since 28 June 2025, but its video duty in Annex I, Section III(b) is about carrying access services — where subtitles, audio description or sign language already exist, they must be transmitted with adequate quality, synchronised, and under the viewer’s control. It does not itself require you to create captions, it sets no back-catalogue deadline, and it names no percentage-of-revenue penalty. The duty to progressively add access services to audiovisual media services is AVMSD Article 7, which sets no date either.

What that means here: our HLS and DASH outputs carry subtitle tracks as first-class renditions with language, label, default, hearing-impaired and forced flags, and the player exposes track selection — which is the carriage half. Whether you are obliged to generate the tracks in the first place depends on what you distribute and where, and on national implementations that differ a great deal.

This is not legal advice. Captions are one requirement among several — WCAG 2.1 Level AA, for instance, requires audio description as well as captions for prerecorded video, and we do not generate audio description. Transcodely provides the captions; it does not certify accessibility compliance for your product. Read the primary texts, or ask a lawyer, before relying on a date.


Where your audio is processed

AI captions run on the same EU-based worker fleet that encodes your transcodes. The audio is transcribed in-house on that infrastructure — it is not sent to an external transcription API — so your media stays inside the Transcodely pipeline, consistent with how the rest of your encoding runs.

Optional insights and translations are the exceptions: when you enable them, the transcript text (never the audio or video) is sent to Anthropic to produce them. Requesting a translation also runs the AI correction pass over the captions before they are translated. See Privacy.


Correcting a generated caption

Because captions are machine-produced, you may want to fix a word or a timestamp. There is no special edit endpoint — reuse the tools you already have:

  1. Download the caption file from the track’s url (or the download link on the video page).
  2. Edit it in any subtitle editor.
  3. Attach the corrected file to the hosted video with Add captions or CreateTextTrack (see Already have captions?), or, for a transcode-only job, re-attach it as a convert or passthrough track from source_url on your next job.

The attached file is a separate track next to the generated one, so the captions menu lists both; when their names match, the attached one is named with (uploaded).


Pricing

Captions are free on every video you host with us. Turn on insights or translations and an AI pass corrects names and terms too.

  • Hosted with Transcodely (any VideoService upload or import, and any job created with input_video_id or managed: true): free. The captions row is still written, at €0, and the dashboard shows it as Included with hosting.
  • Transcode-only (a job that delivers to your own storage origin): an additive fee of €0.01 per minute of source video at list price.

Either way the fee is metered on the input duration and charged once per job — the audio is transcribed once, no matter how many renditions you produce. Details:

  • It is added on top of the encode cost as a fees line item on the job, shown in the dashboard cost breakdown as Encoding + Captions.
  • It is additive to the processing fee, not absorbed by it. The processing fee pays for starting an encoder; captions are a separately metered service billed on top.
  • The fee is only confirmed if a caption artifact is actually produced. No artifact, no charge.
  • The transcript renditions (JSON, plain text, Markdown) are included. Insights are an opt-in extra at €0.05 per video + €0.005 per source minute.
  • Translations are €0.02 per source minute per language, with a minimum of €0.05 per video per language, billed only for languages actually delivered. Each language’s transcript files and translated insights are included. A translation of an existing video (TranslateCaptions) has no captions fee and no processing fee.
  • Restyling existing captions, adding a style and changing the default style are free: no captions fee and no processing fee.

See the pricing page for the full rate card and the calculator to estimate a captions bill.

Run this against your own file

A free account runs standard-quality encodes up to 2 minutes, one at a time (a longer upload is shortened to its first 2 minutes), so the Quickstart runs with nothing set up but an API key.