---
title: "Generate captions for a video"
method: POST
path: "/v1/media/{id}/captions"
tags: ["media"]
---

# Generate captions for a video

`POST /v1/media/{id}/captions`

## Request

- Base URL: `https://api.brixsignage.com`
- URL: `https://api.brixsignage.com/v1/media/{id}/captions`
- Auth: HTTP bearer

Automatically generate a caption track for a video from its audio and attach it to the asset. To upload a caption file instead, use the caption upload operation. To show or hide an existing caption track, use the caption visibility operation.

## Path parameters

- `id` string, required

## Response `200`

Success.

- object
  - `data` object, required
    - `ok` true, required
    - `key` string, required: Storage path of the caption track.
    - `state` 'ready', required

## Other responses

- `400`: `wrong_kind`: not a video.
- `401`: Missing, expired or revoked bearer token.
- `403`: The token lacks the permission this operation needs (see `x-brix-permission`).
- `404`: No media with this id, or no bytes.
- `413`: Over 40 MB: send the audio to /captions/transcribe instead.
- `502`: `transcription_failed`.
- `5XX`: Server error. The body carries a `requestId` to quote to support.

---

[API](https://skmtc.dev/brixsignage/apis/brix-api.md) · [All operations](https://skmtc.dev/brixsignage/apis/brix-api/llms.txt) · [OpenAPI document](https://skmtc.dev/brixsignage/apis/brix-api/revisions/02fd3665dc7d?raw)
