Skip to content
Start here

Captions

List captions or subtitles
client.Stream.Captions.Get(ctx, identifier, query) (*SinglePage[Caption], error)
GET/accounts/{account_id}/stream/{identifier}/captions
ModelsExpand Collapse
type Caption struct{…}
Generated booloptional

Whether the caption was generated via AI.

Label stringoptional

The language label displayed in the native language to users.

Language stringoptional

The language tag in BCP 47 format.

Status CaptionStatusoptional

The status of a generated caption.

One of the following:
const CaptionStatusReady CaptionStatus = "ready"
const CaptionStatusInprogress CaptionStatus = "inprogress"
const CaptionStatusError CaptionStatus = "error"

CaptionsLanguage

List captions or subtitles for a provided language
client.Stream.Captions.Language.Get(ctx, identifier, language, query) (*Caption, error)
GET/accounts/{account_id}/stream/{identifier}/captions/{language}
Generate captions or subtitles for a provided language via AI
client.Stream.Captions.Language.New(ctx, identifier, language, body) (*Caption, error)
POST/accounts/{account_id}/stream/{identifier}/captions/{language}/generate
Upload captions or subtitles
client.Stream.Captions.Language.Update(ctx, identifier, language, params) (*Caption, error)
PUT/accounts/{account_id}/stream/{identifier}/captions/{language}
Delete captions or subtitles
client.Stream.Captions.Language.Delete(ctx, identifier, language, body) (*string, error)
DELETE/accounts/{account_id}/stream/{identifier}/captions/{language}

CaptionsLanguageVtt

Return WebVTT captions for a provided language
client.Stream.Captions.Language.Vtt.Get(ctx, identifier, language, query) (*string, error)
GET/accounts/{account_id}/stream/{identifier}/captions/{language}/vtt