Query Mini Drama Video Media Information
Retrieves technical information about up to 20 videos, including the source file and every transcoded output. Use the returned store_uri values to create a CDN preload task.
Endpoint
HTTP URL |
|
HTTP method |
|
Scopes |
|
Content type |
|
Request
Headers
Field | Type | Description | Required | Example |
|
| The client access token of your mini app, prefixed with | Yes |
|
|
| The media type of the request body. | Yes |
|
Request body
Field | Type | Description | Required | Example |
|
| The ID of the BytePlus account. | Yes |
|
|
| The IDs of the videos to query. Minimum: | Yes |
|
Request example
curl --location --request POST 'https://open.tiktokapis.com/v2/sg/shortdrama/video/media-info/query/' \
--header 'Authorization: Bearer CLIENT_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"byteplus_account_id": "BYTEPLUS_ACCOUNT_ID",
"vids": ["v0d000example0000000000000000001"]
}'Replace the following:
CLIENT_ACCESS_TOKEN: your mini app's client access token.BYTEPLUS_ACCOUNT_ID: the ID of the BytePlus account bound to your mini app.
Response
Response body
Field | Type | Description |
| The media information. | |
| The error object. |
MediaInfoData
Field | Type | Description | Example |
|
| The media information for each video. Each key is a | See the response example. |
|
|
|
|
MediaInfoItem
Field | Type | Description | Example |
| The media information for the video. | See MediaInfo. | |
|
| The query status for this video. |
|
|
| The error code. Returned only when the query for this video fails. |
|
|
| The error description. Returned only when the query for this video fails. |
|
MediaInfo
Field | Type | Description |
| General information about the video. | |
| Information about the source file. | |
| Information about each transcoded output. |
BasicInfo
Field | Type | Description | Example |
|
| The ID of the video. |
|
|
| The title of the video. |
|
|
| The name of the BytePlus space. |
|
|
| The creation time, in ISO 8601 format. |
|
|
| The duration of the video in seconds. |
|
|
| The storage URI of the cover image. |
|
|
| The BytePlus publish status. |
|
|
| The BytePlus storage class. |
|
|
| How the video was uploaded. |
|
| The media classification. | See Classification. |
SourceInfo
Field | Type | Description | Example |
|
| The ID of the file. |
|
|
| The file name. |
|
|
| The file type. |
|
|
| The container format. |
|
|
| The video codec. |
|
|
| The definition label. |
|
|
| The video width in pixels. |
|
|
| The video height in pixels. |
|
|
| The frame rate. |
|
|
| The total bitrate in bits per second. |
|
|
| The duration in seconds. |
|
|
| The dynamic range. |
|
|
| The file size in bytes. |
|
|
| The MD5 hash of the file. |
|
|
| The storage URI of the file. |
|
|
| The BytePlus storage class. |
|
|
| The creation time, in ISO 8601 format. |
|
| The video stream information. | See VideoStreamMeta. | |
| The audio stream information. | See AudioStreamMeta. |
TranscodeInfo
TranscodeInfo has the same fields as SourceInfo, except file_name. The definition field returns the transcoded definition, such as 480p or 720p.
VideoStreamMeta
Field | Type | Description | Example |
|
| The video codec. |
|
|
| The width in pixels. |
|
|
| The height in pixels. |
|
|
| The definition label. |
|
|
| The duration in seconds. |
|
|
| The bitrate in bits per second. |
|
|
| The frame rate. |
|
AudioStreamMeta
Field | Type | Description | Example |
|
| The duration in seconds. |
|
|
| The sample rate in hertz. |
|
|
| The bitrate in bits per second. |
|
|
| The number of audio channels. |
|
Classification
Field | Type | Description | Example |
|
| The media classification. | N/A |
ErrorStruct
Field | Type | Description |
|
| The error code. Omitted on success. |
|
| A human-readable description of the error. |
|
| The unique identifier for the request. Include this value when contacting support. |
Response example
{
"data": {
"media_info_map": {
"v0d000example0000000000000000001": [
{
"media_info": {
"basic_info": {
"vid": "v0d000example0000000000000000001",
"title": "episode_01",
"space_name": "shortdrama-sg",
"create_time": "2026-08-19T06:26:05Z",
"duration": 10.08,
"poster_uri": "tos-vod-example/poster0000example",
"publish_status": "Published",
"tos_storage_class": "STANDARD",
"vod_upload_source": "url_upload"
},
"source_info": {
"file_id": "v0d000example0000000000000000001",
"file_name": "example0000.mp4",
"file_type": "video",
"format": "MP4",
"codec": "h264",
"definition": "unknown",
"width": 720,
"height": 1280,
"fps": 24,
"bitrate": 3494934,
"duration": 10.08,
"dynamic_range": "SDR",
"size": 4403618,
"md5": "0123456789abcdef0123456789abcdef",
"store_uri": "tos-vod-example/example0000.mp4",
"tos_storage_class": "STANDARD",
"create_time": "2026-08-19T06:26:05Z"
},
"transcode_infos": [
{
"file_id": "example0000transcode480p",
"file_type": "video",
"format": "MP4",
"codec": "h264",
"definition": "480p",
"width": 480,
"height": 854,
"bitrate": 496999,
"duration": 10.08,
"dynamic_range": "SDR",
"size": 626219,
"md5": "abcdef0123456789abcdef0123456789",
"store_uri": "tos-vod-example/transcode0000480p",
"tos_storage_class": "STANDARD",
"create_time": "2026-08-19T06:29:42Z"
}
]
},
"status": "SUCCESS"
}
]
},
"partial_success": false
},
"error": {
"log_id": "202508010000000000000000000000000"
}
}Error codes
Error code | Description | Resolution |
| The service is temporarily unavailable. | Retry later. If the error persists, contact support with the |
| The query is invalid. | Provide the client key, |
| The video wasn't found in BytePlus. | Verify the |