Skip to content

Captions API

Live captions in the language being spoken, included with every stream. These endpoints answer 404 until live captions are enabled for your organization.

This page is generated from the OpenAPI specification; the same text is inMarkdown for tools and AI assistants.

Read a customer's caption settings

GET/v1/customers/{customer_ref}/caption-settings

The caption settings new streams for this customer start with. is_default is true when none have been saved.

Path parameters

NameTypeDescription
customer_refrequiredstring

Your identifier for the customer.

Response 200

The settings.

Fields
NameTypeDescription
customer_refrequiredstring

Your identifier for a customer. 1-128 letters, digits, ., _ or -; not . or ...

settingsrequiredobject
settings.spoken_languagerequiredstring

auto, or the language spoken: one of ar de en es fr it ja ko pl pt ru tl uk vi zh.

settings.translation_languagesrequiredarray of string

Reserved for translated captions. Empty.

settings.translation_moderequiredstring

One of "on_demand", "always".

settings.profanity_maskingrequiredboolean
settings.sung_lyricsrequiredstring

Whether sung lyrics are captioned or shown as a music symbol.

One of "music-symbol", "caption".

settings.vocabularyrequiredarray of string

Up to 100 names and terms the captions should spell right.

settings.retired_source_languagesarray of string
is_defaultrequiredboolean

True when nothing has been saved for this customer.

translations_availablerequiredboolean

True when translated captions are priced for the organization, so languages chosen now would be produced.

choicesrequiredobject

The languages each field may name, for a form.

choices.spokenrequiredarray of object
choices.spoken[].coderequiredstring

The language code, e.g. es or zh-Hans.

choices.spoken[].namerequiredstring

The language’s name in itself.

choices.spoken[].betaboolean

True for a translation still in beta.

choices.translationrequiredarray of object
choices.translation[].coderequiredstring

The language code, e.g. es or zh-Hans.

choices.translation[].namerequiredstring

The language’s name in itself.

choices.translation[].betaboolean

True for a translation still in beta.

Errors

StatusCodeMeaning
400invalid_customer_ref

The path’s customer reference is not valid.

Terminal window
curl "https://api.cardinalstreaming.com/v1/customers/grace-chapel/caption-settings" \
-H "Authorization: Bearer $CARDINAL_API_KEY"

Save a customer's caption settings

PUT/v1/customers/{customer_ref}/caption-settings

The whole document; a field left out takes its default. New streams for the customer start with these.

Path parameters

NameTypeDescription
customer_refrequiredstring

Your identifier for the customer.

Request body

NameTypeDescription
spoken_languagestring
translation_languagesarray of string
translation_modestring

One of "on_demand", "always".

profanity_maskingboolean
sung_lyricsstring

One of "music-symbol", "caption".

vocabularyarray of string

Response 200

The settings as saved.

Fields
NameTypeDescription
customer_refrequiredstring

Your identifier for a customer. 1-128 letters, digits, ., _ or -; not . or ...

settingsrequiredobject
settings.spoken_languagerequiredstring

auto, or the language spoken: one of ar de en es fr it ja ko pl pt ru tl uk vi zh.

settings.translation_languagesrequiredarray of string

Reserved for translated captions. Empty.

settings.translation_moderequiredstring

One of "on_demand", "always".

settings.profanity_maskingrequiredboolean
settings.sung_lyricsrequiredstring

Whether sung lyrics are captioned or shown as a music symbol.

One of "music-symbol", "caption".

settings.vocabularyrequiredarray of string

Up to 100 names and terms the captions should spell right.

settings.retired_source_languagesarray of string
is_defaultrequiredboolean

True when nothing has been saved for this customer.

translations_availablerequiredboolean

True when translated captions are priced for the organization, so languages chosen now would be produced.

choicesrequiredobject

The languages each field may name, for a form.

choices.spokenrequiredarray of object
choices.spoken[].coderequiredstring

The language code, e.g. es or zh-Hans.

choices.spoken[].namerequiredstring

The language’s name in itself.

choices.spoken[].betaboolean

True for a translation still in beta.

choices.translationrequiredarray of object
choices.translation[].coderequiredstring

The language code, e.g. es or zh-Hans.

choices.translation[].namerequiredstring

The language’s name in itself.

choices.translation[].betaboolean

True for a translation still in beta.

Errors

StatusCodeMeaning
400invalid_customer_ref

The path’s customer reference is not valid.

400invalid_body

The body is not JSON.

400invalid_captions

A setting is not acceptable; detail names the field.

409translations_unavailable

Translated captions are not available to your organization.

413body_too_large

The document is over 128 KB.

Terminal window
curl -X PUT "https://api.cardinalstreaming.com/v1/customers/grace-chapel/caption-settings" \
-H "Authorization: Bearer $CARDINAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"spoken_language": "en",
"profanity_masking": true,
"vocabulary": [
"Grace Chapel",
"Pastor Okafor"
]
}'

Read a stream's captions status

GET/v1/streams/{playback_id}/captions

Whether captions are being produced for a stream right now, and how far behind the video they are.

Path parameters

NameTypeDescription
playback_idrequiredstring

The stream’s playback_id.

Response 200

The status.

Fields
NameTypeDescription
statusrequiredstring

delayed when captions are more than 15 seconds behind the video.

One of "waiting", "running", "delayed", "unavailable", "ended".

lag_secondsrequirednumber or null
source_languagestring
translation_modestring
translations_availablerequiredboolean
languagesrequiredarray of object
languages[].langrequiredstring
languages[].namerequiredstring
languages[].kindrequiredstring

One of "source", "translation".

languages[].betaboolean
languages[].producingrequiredboolean

Errors

StatusCodeMeaning
404not_found

No such stream in your organization.

Terminal window
curl "https://api.cardinalstreaming.com/v1/streams/1846bdac2d8c0ce0e846d4a3817012c9/captions" \
-H "Authorization: Bearer $CARDINAL_API_KEY"