Sand AISand AI MAGI-2MAGI-2 jest teraz na SandBase: wideo 1080p z natywnym dźwiękiemWypróbuj teraz

TikTok Content Translation

Dokumentacja 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.

Cena
$0.001USD / wywołanie
Metoda
POST
Odpowiedź
JSON
Parametry
0 wymaganych · 2 opcjonalnych

Playground

Wejście
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
WyjściePrzykład
Odpowiedźoutputs · 500 B · 23 wierszy
[
  {
    "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"
        }
      ]
    }
  }
]

Przykłady

Wybierz przykład, aby wczytać jego dane wejściowe i wynik do playgroundu.

README API

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.

Odkryj więcej

Powiązane APIs

Wszystkie APIs
APICenaOdpowiedź
TikTok$0.001 za wywołanieJSON
TikTok$0.001 za wywołanieJSON
TikTok$0.01 za wywołanieJSON
TikTok$0.001 za wywołanieJSON
TikTok$0.001 za wywołanieJSON
TikTok$0.001 za wywołanieJSON

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

Pytania

FAQ

Jak używać API TikTok Content Translation?

Wyślij żądanie POST do https://api.sandbase.ai/v1/api/tiktok/app-v3/content-translate z kluczem API SandBase w nagłówku Authorization (Bearer) oraz parametrami w treści JSON. Możesz też wypróbować je w Playground na tej stronie bez pisania kodu.

Ile kosztuje API TikTok Content Translation?

$0.001 za wywołanie, rozliczane z salda SandBase. Płacisz tylko za wykonane wywołania; nie ma subskrypcji.

Jakie parametry przyjmuje API TikTok Content Translation?

Nie są wymagane żadne parametry. Opcjonalne: src_content (string) i trg_lang (string). Tabela Parameters oraz Playground na tej stronie zawierają wszystkie pola.

Co zwraca API TikTok Content Translation?

Odpowiedź JSON zwrócona w tym samym żądaniu HTTP (synchronicznie). README na tej stronie zawiera przykładową odpowiedź.

Czy potrzebuję konta deweloperskiego TikTok lub klucza API?

Nie. TikTok Content Translation działa przez SandBase, więc jeden klucz API SandBase obejmuje ten endpoint i każde inne API oraz model w katalogu. Nie musisz osobno ubiegać się o dostęp do API TikTok.