Sand AISand AI MAGI-2MAGI-2 現已登上 SandBase:支援原生音訊的 1080p 影片立即試用

TikTok Content Translation

API 文件
https://api.sandbase.ai/v1/api/tiktok/app-v3/content-translate

Translates provided text content into a designated target language. Accepts source text up to 5000 characters and returns the corresponding translated text string.

價格
$0.001美元/次呼叫
方法
POST
回應
JSON
參數
0 個必填 · 2 個選填

Playground

輸入
Source content, that is, the content that needs to be translated, the length does not exceed 5000 characters, if it exceeds 5000 characters, only the first 5000 characters will be translated.
Target language
輸出範例
回應outputs · 500 B · 23 行
[
  {
    "data": {
      "extra": {
        "fatal_item_ids": [],
        "logid": "202610061239112C072D19832236975281",
        "now": 1791290351000
      },
      "log_pb": {
        "impr_id": "202610061239112C072D19832236975281"
      },
      "status_code": 0,
      "status_msg": "",
      "translated_content_list": [
        {
          "src_content": "Hello, welcome to TikHub!",
          "translated_content": "您好,欢迎来到TikHub!",
          "variant": "default"
        }
      ]
    }
  }
]

範例

選擇一個範例,將其輸入與結果載入 playground。

API README

TikTok Content Translation API

Translates a block of text into a target language and returns the translated string. Send the text in src_content and the target language code in trg_lang. Text over 5000 characters is cut to the first 5000 before translation.

Use cases

  • Translate a TikTok video caption into your own language before you review it.
  • Convert comments from a video into one language so you can compare them.
  • Localize a short marketing message into the language of a target audience.
  • Translate hashtag or bio text collected from other TikTok APIs.

Request

curl -X POST "https://api.sandbase.ai/v1/api/tiktok/app-v3/content-translate" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
src_contentstringNoSource content, that is, the content that needs to be translated, the length does not exceed 5000 characters, if it exceeds 5000 characters, only the first 5000 characters will be translated.
trg_langstringNoTarget language

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "extra": {
    "fatal_item_ids": [],
    "logid": "20261103074351BB9CC598720C27019497",
    "now": 1793691831000
  },
  "log_pb": {
    "impr_id": "20261103074351BB9CC598720C27019497"
  },
  "status_code": 0,
  "status_msg": "",
  "translated_content_list": [
    {
      "translated_content": "您好,欢迎来到TikHub!",
      "variant": "default"
    }
  ]
}

Response fields

FieldMeaning
translated_content_listList of translation results. The sample response holds one item.
translated_content_list[].translated_contentThe translated text. In the sample, the default English greeting comes back as a Chinese string, because trg_lang defaults to zh-Hans.
translated_content_list[].variantLabel for the kind of translation returned. The sample value is default.
status_codeResult code of the call. 0 appears in the sample response, which is a successful call.
status_msgStatus message text. It is an empty string in the sample.
extra.logid / log_pb.impr_idRequest identifiers. Both hold the same value in the sample. Keep them if you need to reference a specific call.
extra.nowTimestamp for the response, shown as a 13-digit number.

Notes

  • trg_lang defaults to zh-Hans. Pass a different language code to change the target language.
  • Both parameters are optional. If you send nothing, the API translates its default sample text to zh-Hans.
  • Read the translation from translated_content_list[0].translated_content.
  • To get text to translate, fetch captions or comments first, for example with TikTok Video Details or TikTok Video Comments (App V3).

Pricing

$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

探索更多

相關 APIs

所有 APIs
API價格回應
TikTok每次呼叫 $0.001JSON
TikTok每次呼叫 $0.001JSON
TikTok每次呼叫 $0.01JSON
TikTok每次呼叫 $0.001JSON
TikTok每次呼叫 $0.001JSON
TikTok每次呼叫 $0.001JSON

指南:TikTok API pricing: official access vs per-call dataBest TikTok API in 2026: Pricing Compared

問題

常見問題

我要如何使用 TikTok Content Translation API?

使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/tiktok/app-v3/content-translate。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。

TikTok Content Translation API 的費用是多少?

每次 $0.001,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。

TikTok Content Translation API 接受哪些參數?

不需要任何參數。 選填:src_content (string) 和 trg_lang (string)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。

TikTok Content Translation API 會回傳什麼?

在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。

我需要 TikTok 開發者帳號或 API 金鑰嗎?

不需要。TikTok Content Translation 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 TikTok API 存取權。