Skip to main content

language

Creates, updates, deletes, gets or lists a language resource.

Overview

Namelanguage
TypeResource
Idcloudflare.streams.language

Fields

The following fields are returned by SELECT queries:

List captions or subtitles response for a provided language.

NameDatatypeDescription
generatedbooleanWhether the caption was generated via AI.
labelstringThe language label displayed in the native language to users. (example: Türkçe)
languagestringThe language tag in BCP 47 format. (example: tr)
statusstringThe status of a generated caption. (ready, inprogress, error)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectlanguage, identifier, account_idLists the captions or subtitles for provided language.
createinsertlanguage, identifier, account_idGenerate captions or subtitles for provided language via AI.
updatereplacelanguage, identifier, account_id, fileUploads the caption or subtitle file to the endpoint for a specific BCP47 language. One caption or subtitle file per language is allowed.
deletedeletelanguage, identifier, account_idRemoves the captions or subtitles from a video.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
identifierstringResource identifier.
languagestring

SELECT examples

Lists the captions or subtitles for provided language.

SELECT
generated,
label,
language,
status
FROM cloudflare.streams.language
WHERE language = '{{ language }}' -- required
AND identifier = '{{ identifier }}' -- required
AND account_id = '{{ account_id }}' -- required
;

INSERT examples

Generate captions or subtitles for provided language via AI.

INSERT INTO cloudflare.streams.language (
language,
identifier,
account_id
)
SELECT
'{{ language }}',
'{{ identifier }}',
'{{ account_id }}'
RETURNING
errors,
messages,
result,
success
;

REPLACE examples

Uploads the caption or subtitle file to the endpoint for a specific BCP47 language. One caption or subtitle file per language is allowed.

REPLACE cloudflare.streams.language
SET
file = '{{ file }}'
WHERE
language = '{{ language }}' --required
AND identifier = '{{ identifier }}' --required
AND account_id = '{{ account_id }}' --required
AND file = '{{ file }}' --required
RETURNING
errors,
messages,
result,
success;

DELETE examples

Removes the captions or subtitles from a video.

DELETE FROM cloudflare.streams.language
WHERE language = '{{ language }}' --required
AND identifier = '{{ identifier }}' --required
AND account_id = '{{ account_id }}' --required
;