Media Transcript
Add Media Transcript in a Specific Language
Upload a user-provided transcript for a media in a given language. Each media can have at most one transcript per language.
NOTE: If a transcript for that primary language already exists, the request is rejected.
POSThttps://api.aiozstream.network/api/media/:media_id/transcripts/:lan
Parameters
media_id* The unique identifier of the media.
lan* The transcript's language accepts both primary language tags (e.g. en, fr) and language-region tags (e.g. en-US, fr-CA) in [BCP 47] format.
Headers
Authorization* Bearer your_access_token_here
or
stream-public-key* your_public_key_here
stream-secret-key* your_secret_key_here
Body
file* Transcript file in .vtt format.
Response
201: Created
curl --location --request POST 'https://api.aiozstream.network/api/media/media_id/transcripts/en' \
--header 'Authorization: Bearer your_access_token_here' \
# --header 'stream-public-key: your_public_key_here' \
# --header 'stream-secret-key: your_secret_key_here' \
--form 'file=@"/path/to/your/transcript.vtt"'Get Media Transcripts List
A media may have transcripts in multiple languages. Each language can have at most one transcript.
GEThttps://api.aiozstream.network/api/media/:media_id/transcripts
Parameters
media_id* The unique identifier of the media.
Query
offset The number of records to skip before starting to return the results (default: 0).
limit The maximum number of records to return in a query (max: 100).
Headers
Authorization* Bearer your_access_token_here
or
stream-public-key* your_public_key_here
stream-secret-key* your_secret_key_here
Response
200: OK
curl --location --request GET 'https://api.aiozstream.network/api/media/media_id/transcripts?offset=0&limit=10' \
--header 'Authorization: Bearer your_access_token_here'
# --header 'stream-public-key: your_public_key_here' \
# --header 'stream-secret-key: your_secret_key_here'Set Media's Default Transcript
The default transcript is the transcript the player loads by default
PATCHhttps://api.aiozstream.network/api/media/:media_id/transcripts/:lan
Parameters
media_id* The unique identifier of the media.
lan* The transcript's language accepts both primary language tags (e.g. en, fr) and language-region tags (e.g. en-US, fr-CA) in [BCP 47] format.
Headers
Authorization* Bearer your_access_token_here
or
stream-public-key* your_public_key_here
stream-secret-key* your_secret_key_here
Body
is_default* Set to `true` to make this transcript the default, `false` otherwise.
Response
200: OK
curl --location --request PATCH 'https://api.aiozstream.network/api/media/media_id/transcripts/en' \
--header 'Authorization: Bearer your_access_token_here' \
# --header 'stream-public-key: your_public_key_here' \
# --header 'stream-secret-key: your_secret_key_here' \
--header 'Content-Type: application/json' \
--data '{
"is_default": true
}'Remove Media Transcript
Remove a transcript of a media for a given language
NOTE: If the deleted transcript was the default transcript, the system clears the default transcript setting. You can call Set Media's Default Transcript to set a new default transcript when needed.
DELETEhttps://api.aiozstream.network/api/media/:media_id/transcripts/:lan
Parameters
media_id* The unique identifier of the media.
lan* The transcript's language accepts both primary language tags (e.g. en, fr) and language-region tags (e.g. en-US, fr-CA) in [BCP 47] format.
Headers
Authorization* Bearer your_access_token_here
or
stream-public-key* your_public_key_here
stream-secret-key* your_secret_key_here
Response
200: OK
curl --location --request DELETE 'https://api.aiozstream.network/api/media/media_id/transcripts/en' \
--header 'Authorization: Bearer your_access_token_here'
# --header 'stream-public-key: your_public_key_here' \
# --header 'stream-secret-key: your_secret_key_here'