Documentation Index
Fetch the complete documentation index at: https://cloudinary.com/documentation/llms.txt
Use this file to discover all available pages before exploring further.
Video Elements API
Download OpenAPI DocumentUse the Video Elements API to manage the elements attached to a video: its poster, transcripts and their translations, visual transcript, and chapters. You can list a video's elements, upload a poster, transcript, or visual transcript, and delete elements. Each element is stored as its own asset, related to the video. To deliver elements by URL, see Delivering video elements by URL.
The API supports Basic Authentication using your Cloudinary API Key and API Secret (which can be found in the API Keys page of your Cloudinary Console).
List, upload, and delete the elements attached to a video, such as its poster and transcripts.
Returns the elements of the given type that are attached to a video, such as its custom poster or its transcript files. Each element is a separate asset related to the video. Results are paginated; when next_cursor is returned, pass it as cursor to get the next page.
Path parameters
- videoAssetId stringRequired
The asset ID of the video. This is the video's
asset_id, not its public ID. - subkind stringRequired
The type of video element. One of:
poster: the image shown before the video plays.transcript: the video's transcript, or a translation of it.visual_transcript: descriptions of what's shown in the video.chapters: the video's chapters. You can list and delete chapters, but not upload them.
Query parameters
- cursor string
The
next_cursorvalue from a previous response, to get the next page of results.
Responses
200 The video's elements of the given type.
A response envelope wrapping a page of video elements.
- request_id stringRequired
A unique id for the request, useful when contacting support.
example"6ec0bd7f11c043da975e2a8ad9ebae0b" - next_cursor string
A cursor for the next page of results. Pass it as
cursorin your next request. When there are no more results, it'snull.example"da975e2a8ad9ebae0b6ec0bd7f11c043d" - data VideoElementResponse[]Requirednullable
The video's elements of the requested type.
ShowHide child attributes of data
Items VideoElementResponseA video element. Each element is an asset related to the video.
- type stringRequired
The type of the element, for example
posterortranscript.example"poster" - asset_id stringRequired
The asset ID of the element. Use it to delete this element.
example"43da975e2a8ad6ec0bd7f11c09ebae0b" - public_id stringRequired
The public ID of the element asset.
example"dog_poster" - metadata objectRequired
Extra information about the element, for example the
language_codeof a translated transcript. Empty when there's none.
400 Bad request. The element type isn't supported.
A response envelope returned when a request fails.
- request_id stringRequired
A unique id for the request, useful when contacting support.
example"6ec0bd7f11c043da975e2a8ad9ebae0b" - error MessageWrappedResponseDataRequired
An object carrying a human-readable message.
ShowHide child attributes of error
- message string
A human-readable message.
401 Authentication error
A response envelope returned when a request fails.
- request_id stringRequired
A unique id for the request, useful when contacting support.
example"6ec0bd7f11c043da975e2a8ad9ebae0b" - error MessageWrappedResponseDataRequired
An object carrying a human-readable message.
ShowHide child attributes of error
- message string
A human-readable message.
403 Authorization error
A response envelope returned when a request fails.
- request_id stringRequired
A unique id for the request, useful when contacting support.
example"6ec0bd7f11c043da975e2a8ad9ebae0b" - error MessageWrappedResponseDataRequired
An object carrying a human-readable message.
ShowHide child attributes of error
- message string
A human-readable message.
404 No video with this asset ID exists.
A response envelope returned when a request fails.
- request_id stringRequired
A unique id for the request, useful when contacting support.
example"6ec0bd7f11c043da975e2a8ad9ebae0b" - error MessageWrappedResponseDataRequired
An object carrying a human-readable message.
ShowHide child attributes of error
- message string
A human-readable message.
500 Internal server error
A response envelope returned when a request fails.
- request_id stringRequired
A unique id for the request, useful when contacting support.
example"6ec0bd7f11c043da975e2a8ad9ebae0b" - error MessageWrappedResponseDataRequired
An object carrying a human-readable message.
ShowHide child attributes of error
- message string
A human-readable message.
/elements/{videoAssetId}/{subkind}curl 'https://api.cloudinary.com/v2/video/CLOUD_NAME/elements/{videoAssetId}/{subkind}' \
-u 'API_KEY:API_SECRET'{
"request_id": "54fa10b700125e701b4e1dd0570b9a63",
"data": [
{
"type": "visual_transcript",
"asset_id": "3a4bf9a18670c7b24947bacb156b90e7",
"public_id": "samples/sea-turtle.visual.transcript",
"metadata": {}
}
]
}{
"request_id": "a59557e743338a5a26795a4bf7f600f6",
"error": {
"message": "validation failed: unrecognized video element subkind 'subtitles'"
}
}{
"request_id": "78fa2cbe6d2e16cdb9734f8c2b6de2c3",
"error": {
"message": "error while authenticating: api_secret mismatch"
}
}{
"request_id": "6ec0bd7f11c043da975e2a8ad9ebae0b",
"error": {
"message": "string"
}
}{
"request_id": "591e30d43eadf7e9461c65bafd2a4930",
"error": {
"message": "resource not found: video '00000000000000000000000000000000' not found"
}
}{
"request_id": "6ec0bd7f11c043da975e2a8ad9ebae0b",
"error": {
"message": "string"
}
}Uploads a file as a video element and attaches it to the video whose asset ID you pass as videoAssetId in the path. The element is stored as its own asset, in the same asset folder as the video, with a public ID based on the video's public ID.
How to send the file depends on the element type:
poster: send the image asfilein amultipart/form-datarequest, or send{"url": "<image URL>"}asapplication/jsonto upload it from a URL. The poster's public ID is<video public ID>_poster.transcript: send a.srt,.vtt, or.transcriptfile asfilein amultipart/form-datarequest. Cloudinary converts it to its.transcriptformat. To upload a translation, also sendlanguage_code. The public ID is<video public ID>.<language_code>.transcript, or<video public ID>.transcriptwithout a language code.visual_transcript: send a.srt,.vtt, or.transcriptfile asfilein amultipart/form-datarequest. Cloudinary converts it to its.transcriptformat. The public ID is<video public ID>.visual.transcript.
Files can be up to 30 MB. Chapters can't be uploaded.
Path parameters
- videoAssetId stringRequired
The asset ID of the video. This is the video's
asset_id, not its public ID. - subkind stringRequired
The type of video element. One of:
poster: the image shown before the video plays.transcript: the video's transcript, or a translation of it.visual_transcript: descriptions of what's shown in the video.chapters: the video's chapters. You can list and delete chapters, but not upload them.
Body Required
The element file, or for a poster, the URL of the image to upload.
The element file to upload, sent as multipart/form-data.
- file stringRequired
The element file. For a poster, an image. For a transcript or visual transcript, a
.srt,.vtt, or.transcriptfile. Up to 30 MB.formatbinaryBinary data - language_code string
For a transcript only, the language of the transcript, for example
enorde. The uploaded transcript's public ID is then<video public ID>.<language_code>.transcript. Don't send this field for other element types.example"de"
The URL of a poster image to upload, sent as application/json. Only posters can be uploaded from a URL.
- url stringRequired
The URL of the image to upload as the video's poster.
formaturiURIexample"https://res.cloudinary.com/demo/image/upload/sample.jpg"
Responses
200 The element was uploaded and attached to the video.
A response envelope wrapping the result of a video element upload.
- request_id stringRequired
A unique id for the request, useful when contacting support.
example"6ec0bd7f11c043da975e2a8ad9ebae0b" - data VideoElementUploadResponseRequired
The uploaded element.
ShowHide child attributes of data
- message stringRequired
A confirmation message, for example
video element poster uploaded.example"video element poster uploaded" - public_id stringRequired
The public ID of the uploaded element asset.
example"dog_poster" - asset_id stringRequired
The asset ID of the uploaded element.
example"43da975e2a8ad6ec0bd7f11c09ebae0b" - file_url stringRequired
The secure delivery URL of the uploaded element asset.
formaturiURIexample"https://res.cloudinary.com/demo/image/upload/v1763548800/dog_poster.jpg"
400 Bad request. For example, the element type can't be uploaded, or the file is missing, too large, or in an unsupported format.
Bad request. For example, the element type can't be uploaded, or the file is missing, too large, or in an unsupported format.
A response envelope returned when a request fails.
- request_id stringRequired
A unique id for the request, useful when contacting support.
example"6ec0bd7f11c043da975e2a8ad9ebae0b" - error MessageWrappedResponseDataRequired
An object carrying a human-readable message.
ShowHide child attributes of error
- message string
A human-readable message.
401 Authentication error
A response envelope returned when a request fails.
- request_id stringRequired
A unique id for the request, useful when contacting support.
example"6ec0bd7f11c043da975e2a8ad9ebae0b" - error MessageWrappedResponseDataRequired
An object carrying a human-readable message.
ShowHide child attributes of error
- message string
A human-readable message.
403 Authorization error
A response envelope returned when a request fails.
- request_id stringRequired
A unique id for the request, useful when contacting support.
example"6ec0bd7f11c043da975e2a8ad9ebae0b" - error MessageWrappedResponseDataRequired
An object carrying a human-readable message.
ShowHide child attributes of error
- message string
A human-readable message.
404 No video with this asset ID exists.
A response envelope returned when a request fails.
- request_id stringRequired
A unique id for the request, useful when contacting support.
example"6ec0bd7f11c043da975e2a8ad9ebae0b" - error MessageWrappedResponseDataRequired
An object carrying a human-readable message.
ShowHide child attributes of error
- message string
A human-readable message.
500 Internal server error
A response envelope returned when a request fails.
- request_id stringRequired
A unique id for the request, useful when contacting support.
example"6ec0bd7f11c043da975e2a8ad9ebae0b" - error MessageWrappedResponseDataRequired
An object carrying a human-readable message.
ShowHide child attributes of error
- message string
A human-readable message.
/elements/{videoAssetId}/{subkind}curl -X POST 'https://api.cloudinary.com/v2/video/CLOUD_NAME/elements/{videoAssetId}/{subkind}' \
-u 'API_KEY:API_SECRET' \
-H 'Content-Type: multipart/form-data' \
-d '{
"file": "<binary>",
"language_code": "de"
}'{
"request_id": "9e1a3c5e7b9d1f3a5c7e9b1d3f5a7c9e",
"data": {
"message": "video element poster uploaded",
"public_id": "dog_poster",
"asset_id": "43da975e2a8ad6ec0bd7f11c09ebae0b",
"file_url": "https://res.cloudinary.com/demo/image/upload/v1763548800/dog_poster.jpg"
}
}{
"request_id": "b29592417bf6437233c9073f541a3ee6",
"error": {
"message": "bad request: transcript upload requires multipart form with file part"
}
}{
"request_id": "796aa421102594ce8c072c62bca3b0f4",
"error": {
"message": "error while authenticating: api_secret mismatch"
}
}{
"request_id": "6ec0bd7f11c043da975e2a8ad9ebae0b",
"error": {
"message": "string"
}
}{
"request_id": "6b10e3e257f31f9ddd48cb2aa71a0ce9",
"error": {
"message": "resource not found: video '00000000000000000000000000000000' not found"
}
}{
"request_id": "6ec0bd7f11c043da975e2a8ad9ebae0b",
"error": {
"message": "string"
}
}Deletes elements of the given type from a video. By default, deletes all of the video's elements of that type, for example every transcript including translations. To delete a single element, pass its assetId. The element assets are deleted, not just detached from the video. The response confirms the request but doesn't list the deleted elements, so to check what's left, list the video's elements.
Path parameters
- videoAssetId stringRequired
The asset ID of the video. This is the video's
asset_id, not its public ID. - subkind stringRequired
The type of video element. One of:
poster: the image shown before the video plays.transcript: the video's transcript, or a translation of it.visual_transcript: descriptions of what's shown in the video.chapters: the video's chapters. You can list and delete chapters, but not upload them.
Query parameters
- assetId string
The asset ID of a single element to delete, as returned when you list the video's elements. When omitted, deletes all elements of the given type for the video.
Responses
200 The elements were deleted, or the video had no elements of this type.
A response envelope wrapping a simple message.
- request_id stringRequired
A unique id for the request, useful when contacting support.
example"6ec0bd7f11c043da975e2a8ad9ebae0b" - data MessageWrappedResponseDataRequired
An object carrying a human-readable message.
ShowHide child attributes of data
- message string
A human-readable message.
400 Bad request. The element type isn't supported.
A response envelope returned when a request fails.
- request_id stringRequired
A unique id for the request, useful when contacting support.
example"6ec0bd7f11c043da975e2a8ad9ebae0b" - error MessageWrappedResponseDataRequired
An object carrying a human-readable message.
ShowHide child attributes of error
- message string
A human-readable message.
401 Authentication error
A response envelope returned when a request fails.
- request_id stringRequired
A unique id for the request, useful when contacting support.
example"6ec0bd7f11c043da975e2a8ad9ebae0b" - error MessageWrappedResponseDataRequired
An object carrying a human-readable message.
ShowHide child attributes of error
- message string
A human-readable message.
403 Authorization error
A response envelope returned when a request fails.
- request_id stringRequired
A unique id for the request, useful when contacting support.
example"6ec0bd7f11c043da975e2a8ad9ebae0b" - error MessageWrappedResponseDataRequired
An object carrying a human-readable message.
ShowHide child attributes of error
- message string
A human-readable message.
404 No video with this asset ID exists, or the video has no element of this type with the given assetId.
No video with this asset ID exists, or the video has no element of this type with the given assetId.
A response envelope returned when a request fails.
- request_id stringRequired
A unique id for the request, useful when contacting support.
example"6ec0bd7f11c043da975e2a8ad9ebae0b" - error MessageWrappedResponseDataRequired
An object carrying a human-readable message.
ShowHide child attributes of error
- message string
A human-readable message.
500 Internal server error
A response envelope returned when a request fails.
- request_id stringRequired
A unique id for the request, useful when contacting support.
example"6ec0bd7f11c043da975e2a8ad9ebae0b" - error MessageWrappedResponseDataRequired
An object carrying a human-readable message.
ShowHide child attributes of error
- message string
A human-readable message.
/elements/{videoAssetId}/{subkind}curl -X DELETE 'https://api.cloudinary.com/v2/video/CLOUD_NAME/elements/{videoAssetId}/{subkind}' \
-u 'API_KEY:API_SECRET'{
"request_id": "d99c6557b8573bbb48c4a38ae3eb3dca",
"data": {
"message": "video element transcript deleted"
}
}{
"request_id": "6c367455025915942298d34c7ede6bf3",
"error": {
"message": "validation failed: unrecognized video element subkind 'subtitles'"
}
}{
"request_id": "dd92862fa230ff87d0a0893bac1c99c1",
"error": {
"message": "error while authenticating: api_secret mismatch"
}
}{
"request_id": "6ec0bd7f11c043da975e2a8ad9ebae0b",
"error": {
"message": "string"
}
}{
"request_id": "a761f913ec2477852cc0a77a28b276a8",
"error": {
"message": "resource not found: video element with asset id '00000000000000000000000000000000' not found for video"
}
}{
"request_id": "6ec0bd7f11c043da975e2a8ad9ebae0b",
"error": {
"message": "string"
}
}Models
Show schema
A response envelope wrapping a simple message.
- request_id stringRequired
A unique id for the request, useful when contacting support.
example"6ec0bd7f11c043da975e2a8ad9ebae0b" - data MessageWrappedResponseDataRequired
An object carrying a human-readable message.
ShowHide child attributes of data
- message string
A human-readable message.
Show schema
An object carrying a human-readable message.
- message string
A human-readable message.
Show schema
A response envelope returned when a request fails.
- request_id stringRequired
A unique id for the request, useful when contacting support.
example"6ec0bd7f11c043da975e2a8ad9ebae0b" - error MessageWrappedResponseDataRequired
An object carrying a human-readable message.
ShowHide child attributes of error
- message string
A human-readable message.
Show schema
A response envelope wrapping a page of video elements.
- request_id stringRequired
A unique id for the request, useful when contacting support.
example"6ec0bd7f11c043da975e2a8ad9ebae0b" - next_cursor string
A cursor for the next page of results. Pass it as
cursorin your next request. When there are no more results, it'snull.example"da975e2a8ad9ebae0b6ec0bd7f11c043d" - data VideoElementResponse[]Requirednullable
The video's elements of the requested type.
ShowHide child attributes of data
Items VideoElementResponseA video element. Each element is an asset related to the video.
- type stringRequired
The type of the element, for example
posterortranscript.example"poster" - asset_id stringRequired
The asset ID of the element. Use it to delete this element.
example"43da975e2a8ad6ec0bd7f11c09ebae0b" - public_id stringRequired
The public ID of the element asset.
example"dog_poster" - metadata objectRequired
Extra information about the element, for example the
language_codeof a translated transcript. Empty when there's none.
Show schema
A video element. Each element is an asset related to the video.
- type stringRequired
The type of the element, for example
posterortranscript.example"poster" - asset_id stringRequired
The asset ID of the element. Use it to delete this element.
example"43da975e2a8ad6ec0bd7f11c09ebae0b" - public_id stringRequired
The public ID of the element asset.
example"dog_poster" - metadata objectRequired
Extra information about the element, for example the
language_codeof a translated transcript. Empty when there's none.
Show schema
The element file to upload, sent as multipart/form-data.
- file stringRequired
The element file. For a poster, an image. For a transcript or visual transcript, a
.srt,.vtt, or.transcriptfile. Up to 30 MB.formatbinaryBinary data - language_code string
For a transcript only, the language of the transcript, for example
enorde. The uploaded transcript's public ID is then<video public ID>.<language_code>.transcript. Don't send this field for other element types.example"de"
Show schema
The URL of a poster image to upload, sent as application/json. Only posters can be uploaded from a URL.
- url stringRequired
The URL of the image to upload as the video's poster.
formaturiURIexample"https://res.cloudinary.com/demo/image/upload/sample.jpg"
Show schema
A response envelope wrapping the result of a video element upload.
- request_id stringRequired
A unique id for the request, useful when contacting support.
example"6ec0bd7f11c043da975e2a8ad9ebae0b" - data VideoElementUploadResponseRequired
The uploaded element.
ShowHide child attributes of data
- message stringRequired
A confirmation message, for example
video element poster uploaded.example"video element poster uploaded" - public_id stringRequired
The public ID of the uploaded element asset.
example"dog_poster" - asset_id stringRequired
The asset ID of the uploaded element.
example"43da975e2a8ad6ec0bd7f11c09ebae0b" - file_url stringRequired
The secure delivery URL of the uploaded element asset.
formaturiURIexample"https://res.cloudinary.com/demo/image/upload/v1763548800/dog_poster.jpg"
Show schema
The uploaded element.
- message stringRequired
A confirmation message, for example
video element poster uploaded.example"video element poster uploaded" - public_id stringRequired
The public ID of the uploaded element asset.
example"dog_poster" - asset_id stringRequired
The asset ID of the uploaded element.
example"43da975e2a8ad6ec0bd7f11c09ebae0b" - file_url stringRequired
The secure delivery URL of the uploaded element asset.
formaturiURIexample"https://res.cloudinary.com/demo/image/upload/v1763548800/dog_poster.jpg"