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.

v0.1.1OAS 3.0.3

Video Elements API

Download OpenAPI Document

Use 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).

Video Elements

List, upload, and delete the elements attached to a video, such as its poster and transcripts.

List a video's elements

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_cursor value from a previous response, to get the next page of results.

Responses

200 The video's elements of the given type.
application/json
VideoElementsWrappedResponse

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 cursor in your next request. When there are no more results, it's null.

    example "da975e2a8ad9ebae0b6ec0bd7f11c043d"
  • data VideoElementResponse[]Requirednullable

    The video's elements of the requested type.

    ShowHide child attributes of data
    Items VideoElementResponse

    A video element. Each element is an asset related to the video.

    • type stringRequired

      The type of the element, for example poster or transcript.

      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_code of a translated transcript. Empty when there's none.

400 Bad request. The element type isn't supported.
application/json
ErrorWrappedResponse

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
application/json
ErrorWrappedResponse

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
application/json
ErrorWrappedResponse

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.
application/json
ErrorWrappedResponse

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
application/json
ErrorWrappedResponse

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.

GET/elements/{videoAssetId}/{subkind}
curl 'https://api.cloudinary.com/v2/video/CLOUD_NAME/elements/{videoAssetId}/{subkind}' \
  -u 'API_KEY:API_SECRET'
Response
{
  "request_id": "54fa10b700125e701b4e1dd0570b9a63",
  "data": [
    {
      "type": "visual_transcript",
      "asset_id": "3a4bf9a18670c7b24947bacb156b90e7",
      "public_id": "samples/sea-turtle.visual.transcript",
      "metadata": {}
    }
  ]
}

Upload a video element

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 as file in a multipart/form-data request, or send {"url": "<image URL>"} as application/json to upload it from a URL. The poster's public ID is <video public ID>_poster.
  • transcript: send a .srt, .vtt, or .transcript file as file in a multipart/form-data request. Cloudinary converts it to its .transcript format. To upload a translation, also send language_code. The public ID is <video public ID>.<language_code>.transcript, or <video public ID>.transcript without a language code.
  • visual_transcript: send a .srt, .vtt, or .transcript file as file in a multipart/form-data request. Cloudinary converts it to its .transcript format. 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.

VideoElementFileUpload

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 .transcript file. Up to 30 MB.

    format binary Binary data
  • language_code string

    For a transcript only, the language of the transcript, for example en or de. 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"

Responses

200 The element was uploaded and attached to the video.
application/json
VideoElementUploadWrappedResponse

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.

      format uri URIexample "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.

application/json
ErrorWrappedResponse

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
application/json
ErrorWrappedResponse

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
application/json
ErrorWrappedResponse

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.
application/json
ErrorWrappedResponse

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
application/json
ErrorWrappedResponse

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.

POST/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"
}'
Response
{
  "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"
  }
}

Delete video elements

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.
application/json
MessageWrappedResponse

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.
application/json
ErrorWrappedResponse

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
application/json
ErrorWrappedResponse

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
application/json
ErrorWrappedResponse

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.

application/json
ErrorWrappedResponse

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
application/json
ErrorWrappedResponse

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.

DEL/elements/{videoAssetId}/{subkind}
curl -X DELETE 'https://api.cloudinary.com/v2/video/CLOUD_NAME/elements/{videoAssetId}/{subkind}' \
  -u 'API_KEY:API_SECRET'
Response
{
  "request_id": "d99c6557b8573bbb48c4a38ae3eb3dca",
  "data": {
    "message": "video element transcript deleted"
  }
}

Models

MessageWrappedResponse

Show schema
object

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.

MessageWrappedResponseData

Show schema
object

An object carrying a human-readable message.

  • message string

    A human-readable message.

ErrorWrappedResponse

Show schema
object

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.

VideoElementsWrappedResponse

Show schema
object

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 cursor in your next request. When there are no more results, it's null.

    example "da975e2a8ad9ebae0b6ec0bd7f11c043d"
  • data VideoElementResponse[]Requirednullable

    The video's elements of the requested type.

    ShowHide child attributes of data
    Items VideoElementResponse

    A video element. Each element is an asset related to the video.

    • type stringRequired

      The type of the element, for example poster or transcript.

      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_code of a translated transcript. Empty when there's none.

VideoElementResponse

Show schema
object

A video element. Each element is an asset related to the video.

  • type stringRequired

    The type of the element, for example poster or transcript.

    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_code of a translated transcript. Empty when there's none.

VideoElementFileUpload

Show schema
object

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 .transcript file. Up to 30 MB.

    format binary Binary data
  • language_code string

    For a transcript only, the language of the transcript, for example en or de. 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"

VideoElementURLUpload

Show schema
object

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.

    format uri URIexample "https://res.cloudinary.com/demo/image/upload/sample.jpg"

VideoElementUploadWrappedResponse

Show schema
object

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.

      format uri URIexample "https://res.cloudinary.com/demo/image/upload/v1763548800/dog_poster.jpg"

VideoElementUploadResponse

Show schema
object

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.

    format uri URIexample "https://res.cloudinary.com/demo/image/upload/v1763548800/dog_poster.jpg"