---
title: "Generate track subtitles"
method: POST
path: "/video/v1/assets/{ASSET_ID}/tracks/{TRACK_ID}/generate-subtitles"
tags: ["Assets"]
---

# Generate track subtitles

`POST /video/v1/assets/{ASSET_ID}/tracks/{TRACK_ID}/generate-subtitles`

## Request

- Base URL: `https://api.mux.com`
- URL: `https://api.mux.com/video/v1/assets/{ASSET_ID}/tracks/{TRACK_ID}/generate-subtitles`
- Auth: one of:
  - HTTP basic
  - HTTP bearer

Generates subtitles (captions) for a given audio track. [See docs for more information.](https://mux.com/docs/guides/add-autogenerated-captions-and-use-transcripts#retroactively-enable-auto-generated-captions)

## Path parameters

- `ASSET_ID` string, required
- `TRACK_ID` string, required

## Request body

- GenerateTrackSubtitlesRequest
  - `generated_subtitles` AssetGeneratedSubtitleSettings[], required: Generate subtitle tracks using automatic speech recognition with this configuration.
    - `name` string: A name for this subtitle track.
    - `passthrough` string: Arbitrary metadata set for the subtitle track. Max 255 characters.
    - `language_code` 'en' | 'es' | 'it' | 'pt' | 'de' | 'fr' | 'pl' | 'ru' | 'nl' | 'ca' | 'tr' | 'sv' | 'uk' | 'no' | 'fi' | 'sk' | 'el' | 'cs' | 'hr' | 'da' | 'ro' | 'bg' | 'auto': The language of the audio from which subtitles are generated. Selecting a language of "auto" will allow language detection to set the language code automatically.

## Response `201`

Created

- GenerateTrackSubtitlesResponse
  - `data` Track[], required
    - `id` string: Unique identifier for the Track
    - `type` 'video' | 'audio' | 'text': The type of track
    - `duration` number, double: The duration in seconds of the track media. This parameter is not set for `text` type tracks. This field is optional and may not be set. The top level `duration` field of an asset will always be set.
    - `max_width` integer: The maximum width in pixels available for the track. Only set for the `video` type track.
    - `max_height` integer: The maximum height in pixels available for the track. Only set for the `video` type track.
    - `max_frame_rate` number, double: The maximum frame rate available for the track. Only set for the `video` type track. This field may return `-1` if the frame rate of the input cannot be reliably determined.
    - `max_channels` integer: The maximum number of audio channels the track supports. Only set for the `audio` type track.
    - `text_type` 'subtitles' | 'chapters': This parameter is only set for `text` type tracks.
    - `text_source` 'uploaded' | 'embedded' | 'generated_live' | 'generated_live_final' | 'generated_vod': The source of the text contained in a Track of type `text`. Valid `text_source` values are listed below. * `uploaded`: Tracks uploaded to Mux as caption or subtitle files using the Create Asset Track API. * `embedded`: Tracks extracted from an embedded stream of CEA-608 closed captions. * `generated_vod`: Tracks generated by automatic speech recognition on an on-demand asset. * `generated_live`: Tracks generated by automatic speech recognition on a live stream configured with `generated_subtitles`. If an Asset has both `generated_live` and `generated_live_final` tracks that are `ready`, then only the `generated_live_final` track will be included during playback. * `generated_live_final`: Tracks generated by automatic speech recognition on a live stream using `generated_subtitles`. The accuracy, timing, and formatting of these subtitles is improved compared to the corresponding `generated_live` tracks. However, `generated_live_final` tracks will not be available in `ready` status until the live stream ends. If an Asset has both `generated_live` and `generated_live_final` tracks that are `ready`, then only the `generated_live_final` track will be included during playback.
    - `language_code` string: The language code value represents [BCP 47](https://tools.ietf.org/html/bcp47) specification compliant value, or 'auto'. For example, `en` for English or `en-US` for the US version of English. This parameter is only set for `text` and `audio` track types. During automatic language detection for generated subtitles, this value will be set to `auto` until the language is determined.
    - `name` string: The name of the track containing a human-readable description. The HLS manifest will associate a subtitle `text` or `audio` track with this value. For example, the value should be "English" for a subtitle text track for the `language_code` value of `en-US`. This parameter is only set for `text` and `audio` track types.
    - `closed_captions` boolean: Indicates the track provides Subtitles for the Deaf or Hard-of-hearing (SDH). This parameter is only set tracks where `type` is `text` and `text_type` is `subtitles`.
    - `passthrough` string: Arbitrary user-supplied metadata set for the track either when creating the asset or track. This parameter is only set for `text` type tracks. Max 255 characters.
    - `status` 'preparing' | 'ready' | 'errored' | 'deleted' | 'skipped': The status of the track. `skipped` means the track was not created because the asset doesn't support it, for example generated subtitles on an asset with no audio.
    - `primary` boolean: For an audio track, indicates that this is the primary audio track, ingested from the main input for this asset. The primary audio track cannot be deleted.
    - `auto_language_confidence` number, double: The confidence value (0-1) of the determined language. This value only is available when automatic language detection is utilized in generated subtitles.

## Changes

- **2026-11-04** `f55c89fc911c`: 1 warning
  - added the new `skipped` enum value to the `data/items/status` response property for the response status `201`
- **2026-10-02** `395805a20280`: 1 warning
  - added the new `chapters` enum value to the `data/items/text_type` response property for the response status `201`
- **2026-08-12** `5b4b3133f27d`: 1 warning
  - removed the optional property `data/items/max_channel_layout` from the response with the `201` status
- **2026-01-07** `83dc80cce4d6`: 2 info
  - added the new `auto` enum value to the request property `generated_subtitles/items/language_code`
  - added the optional property `data/items/auto_language_confidence` to the response with the `201` status
- **2025-08-05** `ba7ebfd893a1`: 1 info
  - the endpoint scheme security `authorizationToken` was added to the API

[Operation history](https://skmtc.dev/muxinc/apis/mux-api/changes/video/v1/assets/:ASSET_ID/tracks/:TRACK_ID/generate-subtitles/post.md)

---

[API](https://skmtc.dev/muxinc/apis/mux-api.md) - [All operations](https://skmtc.dev/muxinc/apis/mux-api/llms.txt) - [OpenAPI document](https://skmtc.dev/muxinc/apis/mux-api/revisions/75b4251a1d96?raw)
