TikTok for Developers

Developer Docs

Last updated November 24, 2026

Query a Mini Drama Transcoding Task

Retrieves the status of a batch transcoding task and the result for each video.

Endpoint

HTTP URL

https://open.tiktokapis.com/v2/sg/shortdrama/video/transcode/batch/

HTTP method

GET

Scopes

None

Request

Headers

Field

Type

Description

Required

Example

Authorization

string

The client access token of your mini app, prefixed with Bearer.

Yes

Bearer clt.example12345Example12345Example

client-key

string

The client key of your mini app.

Yes

mnexample12345

Query parameters

Field

Type

Description

Required

Example

byteplus_account_id

string

The ID of the BytePlus account.

Yes

3000000000

task_id

string

The ID of the batch task.

Yes

transcode:batch:7300000000000000004

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

data

TranscodeTaskStatus

The task status.

error

ErrorStruct

The error object.

TranscodeTaskStatus

Field

Type

Description

Example

task_id

string

The ID of the batch task.

transcode:batch:7300000000000000004

task_status

string

The task status.

SUCCESS

total_count

int32

The number of videos in the task.

3

success_count

int32

The number of videos transcoded successfully.

3

failed_count

int32

The number of videos that failed.

0

pending_count

int32

The number of videos waiting or in progress.

0

success_list

list<TaskResultItem>

The videos transcoded successfully.

See TaskResultItem.

failed_list

list<FailedItem>

The videos that failed.

[]

pending_list

list<PendingItem>

The videos waiting or in progress.

[]

TaskResultItem

Field

Type

Description

Example

vid

string

The ID of the video.

v0d000example0000000000000000001

completed_at

int64

The time the video finished transcoding, as a Unix timestamp in seconds.

1787125398

FailedItem

Field

Type

Description

Example

vid

string

The ID of the video.

v0d000example0000000000000000002

error_code

string

The error code.

22001

error_message

string

The reason for the failure.

transcode failed

retryable

Boolean

true if you can retry transcoding the video; false otherwise.

false

failure_stage

string

The stage at which transcoding failed.

submit

completed_at

int64

The time the video failed, as a Unix timestamp in seconds.

1787125398

PendingItem

Field

Type

Description

Example

vid

string

The ID of the video.

v0d000example0000000000000000003

status

string

The status of the video. One of: QUEUED, SUBMITTING, or PROCESSING.

PROCESSING

updated_at

int64

The time the status last changed, as a Unix timestamp in seconds.

1787125300

ErrorStruct

Field

Type

Description

code

string

The error code. Omitted on success.

message

string

A human-readable description of the error.

log_id

string

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

5001

The service is temporarily unavailable.

Retry later. If the error persists, contact support with the log_id.

1121010

The query is invalid.

Provide the client key, byteplus_account_id, and task_id.

1121103

The transcoding task wasn't found.

Verify the task_id and retry.

1221507

BytePlus transcoding failed or was stopped.

Check the task details before you retry.

TikTok for Developers