TikTok for Developers

Developer Docs

Last updated November 24, 2026

Query a Mini Drama Video

Retrieves the upload status and details of a mini drama video. After you upload a video, poll this endpoint with the job_id until upload_status is 2, then use the returned vid in an episode.

Endpoint

HTTP URL

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

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

Query parameters

Field

Type

Description

Required

Example

client_key

string

The client key of your mini app.

Yes

mnexample12345

byteplus_account_id

string

The ID of the BytePlus account the video was uploaded to.

Yes

3000000000

job_id

string

Required when vid isn't provided. The upload task ID returned by Upload a Mini Drama Video. Use this field to poll after an upload.

Conditional

vod:job:1234567890

vid

string

Required when job_id isn't provided. The ID of the video. If you pass both job_id and vid, the query uses vid.

Conditional

v0d000example0000000000000000000

Request example

curl --location --request GET 'https://open.tiktokapis.com/v2/sg/shortdrama/video?client_key=CLIENT_KEY&job_id=vod%3Ajob%3A1234567890&byteplus_account_id=BYTEPLUS_ACCOUNT_ID' \
--header 'Authorization: Bearer CLIENT_ACCESS_TOKEN'

Replace the following:

  • CLIENT_KEY: your mini app's client key.
  • BYTEPLUS_ACCOUNT_ID: the ID of the BytePlus account bound to your mini app.
  • CLIENT_ACCESS_TOKEN: your mini app's client access token.

Response

Response body

Field

Type

Description

data

VideoInfo

The video details.

error

ErrorStruct

The error object.

VideoInfo

Field

Type

Description

Example

upload_status

int32

The upload status. One of:
• 1: Processing.
• 2: Succeeded.
• 3: Failed.

2

vid

string

The BytePlus ID of the uploaded video.

v0d000example0000000000000000000

job_id

string

The upload task ID.

vod:job:1234567890

byteplus_url

string

The playback URL of the video.

https://example.com/play/episode-01.m3u8

title

string

The title of the video.

episode_01

duration_ms

int64

The duration of the video in milliseconds.

10079

cover_url

string

The URL of the video cover.

https://example.com/cover/episode-01.jpg

raw_video_info_json

string

The raw BytePlus video information, as a JSON string. Use it for debugging.

{"Vid":"v0d000example0000000000000000000"}

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": {
    "upload_status": 2,
    "vid": "v0d000example0000000000000000000",
    "job_id": "vod:job:1234567890",
    "byteplus_url": "https://example.com/play/episode-01.m3u8",
    "title": "episode_01",
    "duration_ms": 10079,
    "cover_url": "https://example.com/cover/episode-01.jpg",
    "raw_video_info_json": "{\"Vid\":\"v0d000example0000000000000000000\"}"
  },
  "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.

1121006

The query is invalid.

Provide client_key and either vid or job_id, then retry.

1121102

The uploaded resource isn't a valid video.

Upload a valid video and retry.

1121104

The video wasn't found.

Verify the vid, client key, BytePlus account, and space.

1121404

The BytePlus account doesn't match the video's account and space.

Use the account the video belongs to.

1221501

The BytePlus upload task failed.

Check the source media and submit a new upload.

TikTok for Developers