Query a Mini Drama Transcoding Task
Retrieves the status of a batch transcoding task and the result for each video.
Endpoint
HTTP URL |
|
HTTP method |
|
Scopes |
|
Request
Headers
Field | Type | Description | Required | Example |
|
| The client access token of your mini app, prefixed with | Yes |
|
|
| The client key of your mini app. | Yes |
|
Query parameters
Field | Type | Description | Required | Example |
|
| The ID of the BytePlus account. | Yes |
|
|
| The ID of the batch task. | Yes |
|
Request example
curl --location --request GET 'https://open.tiktokapis.com/v2/sg/shortdrama/video/transcode/batch/?byteplus_account_id=BYTEPLUS_ACCOUNT_ID&task_id=transcode:batch:7300000000000000004' \
--header 'Authorization: Bearer CLIENT_ACCESS_TOKEN' \
--header 'client-key: CLIENT_KEY'Replace the following:
BYTEPLUS_ACCOUNT_ID: the ID of the BytePlus account bound to your mini app.CLIENT_ACCESS_TOKEN: your mini app's client access token.CLIENT_KEY: your mini app's client key.
Response
Response body
Field | Type | Description |
| The task status. | |
| The error object. |
TranscodeTaskStatus
Field | Type | Description | Example |
|
| The ID of the batch task. |
|
|
| The task status. |
|
|
| The number of videos in the task. |
|
|
| The number of videos transcoded successfully. |
|
|
| The number of videos that failed. |
|
|
| The number of videos waiting or in progress. |
|
| The videos transcoded successfully. | See TaskResultItem. | |
| The videos that failed. |
| |
| The videos waiting or in progress. |
|
TaskResultItem
Field | Type | Description | Example |
|
| The ID of the video. |
|
|
| The time the video finished transcoding, as a Unix timestamp in seconds. |
|
FailedItem
Field | Type | Description | Example |
|
| The ID of the video. |
|
|
| The error code. |
|
|
| The reason for the failure. |
|
|
|
|
|
|
| The stage at which transcoding failed. |
|
|
| The time the video failed, as a Unix timestamp in seconds. |
|
PendingItem
Field | Type | Description | Example |
|
| The ID of the video. |
|
|
| The status of the video. One of: |
|
|
| The time the status last changed, as a Unix timestamp in seconds. |
|
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": {
"task_id": "transcode:batch:7300000000000000004",
"task_status": "SUCCESS",
"total_count": 3,
"success_count": 3,
"failed_count": 0,
"pending_count": 0,
"success_list": [
{ "completed_at": 1787125398, "vid": "v0d000example0000000000000000001" },
{ "completed_at": 1787125397, "vid": "v0d000example0000000000000000002" },
{ "completed_at": 1787125400, "vid": "v0d000example0000000000000000003" }
],
"failed_list": [],
"pending_list": []
},
"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 transcoding task wasn't found. | Verify the |
| BytePlus transcoding failed or was stopped. | Check the task details before you retry. |