TikTok for Developers

Developer Docs

Last updated November 24, 2026

Upload Mini Drama Subtitles

Uploads a subtitle file from a public URL to your BytePlus space and optionally links it to a video. Upload a separate file for each language. Mini Drama Player displays linked subtitles when you enable automatic subtitles.

Endpoint

HTTP URL

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

HTTP method

POST

Scopes

None

Content type

application/json

Request

Headers

Field

Type

Description

Required

Example

Authorization

string

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

Yes

Bearer clt.example12345Example12345Example

Content-Type

string

The media type of the request body.

Yes

application/json

Request body

Field

Type

Description

Required

Example

client_key

string

The client key of your mini app.

Yes

mnexample12345

subtitle_url

string

The download URL of the subtitle file. The URL must be a publicly accessible HTTP or HTTPS link. TikTok reads the format from the file extension, which must be srt, vtt, ass, or ssa.

Yes

https://example.com/subtitles/episode-01.vtt

title

string

The file name of the subtitle.

Yes

episode-01.vtt

language

string

The language of the subtitle.

Yes

eng-US

space_name

string

The name of the BytePlus space to upload the subtitle to.

Yes

shortdrama-sg

byteplus_account_id

string

The ID of the BytePlus account to upload the subtitle to.

Yes

3000000000

vid

string

The ID of the video to link the subtitle to.

No

v0d000example0000000000000000000

Request example

curl --location 'https://open.tiktokapis.com/v2/sg/shortdrama/subtitle/' \
--header 'Authorization: Bearer CLIENT_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
  "client_key": "CLIENT_KEY",
  "subtitle_url": "https://example.com/subtitles/episode-01.srt",
  "title": "episode-01.srt",
  "language": "eng-US",
  "space_name": "SPACE_NAME",
  "byteplus_account_id": "BYTEPLUS_ACCOUNT_ID",
  "vid": "VID"
}'

Replace the following:

  • CLIENT_ACCESS_TOKEN: your mini app's client access token.
  • CLIENT_KEY: your mini app's client key.
  • SPACE_NAME: the name of your BytePlus space.
  • BYTEPLUS_ACCOUNT_ID: the ID of the BytePlus account bound to your mini app.
  • VID: the ID of the video to link the subtitle to.

Response

Response body

Field

Type

Description

data

SubtitleUploadData

The uploaded subtitle.

error

ErrorStruct

The error object.

SubtitleUploadData

Field

Type

Description

Example

file_id

string

The ID of the subtitle file.

file_0000example

mid

string

The BytePlus material ID of the subtitle.

example0000000000000

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": {
    "file_id": "file_0000example",
    "mid": "example0000000000000"
  },
  "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.

1121015

A field is missing or invalid. For example, subtitle_url isn't a valid URL or the format isn't supported.

Correct the field named in the message. Use an accessible URL with an srt, vtt, ass, or ssa extension.

1121104

The video wasn't found.

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

1121405

The BytePlus account, space, or video doesn't match.

Confirm that byteplus_account_id, space_name, and vid match the account and space the video was uploaded to.

1521501

TikTok couldn't download the subtitle file.

Confirm that the URL is publicly accessible and the file is valid, then retry.

TikTok for Developers