Wajib. Konten input dalam format string. Sebaiknya total konten kurang dari 30 ribu titik kode. Panjang maksimum kolom ini adalah 1024.
mime_type
string
Opsional. Format teks sumber, misalnya, "text/html", "text/plain". Jika dibiarkan kosong, jenis MIME akan ditetapkan secara default ke "text/html".
source_language_code
string
Opsional. Kode bahasa BCP-47 dari teks input jika diketahui, misalnya, "en-US" atau "sr-Latn". Kode bahasa yang didukung tercantum dalam Dukungan Bahasa. Jika bahasa sumber tidak ditentukan, API akan mencoba mengidentifikasi bahasa sumber secara otomatis dan menampilkan bahasa sumber dalam respons.
target_language_code
string
Wajib. Kode bahasa BCP-47 yang akan digunakan untuk terjemahan teks input, ditetapkan ke salah satu kode bahasa yang tercantum di Dukungan Bahasa.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-07-30 UTC."],[[["\u003cp\u003eThis service translates text input into a specified target language, using a POST request to the provided endpoint.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eparent\u003c/code\u003e parameter is required in the path, representing the caller's project in the format \u003ccode\u003e/projects/{project-id}\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe request body requires \u003ccode\u003econtents\u003c/code\u003e (the text to translate) and \u003ccode\u003etarget_language_code\u003c/code\u003e (the desired translation language) fields, while \u003ccode\u003esource_language_code\u003c/code\u003e and \u003ccode\u003emime_type\u003c/code\u003e are optional.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eglossary_config\u003c/code\u003e field is optional and enables the use of a glossary for translation, supporting the \u003ccode\u003ecloudtranslate.glossaries.predict\u003c/code\u003e feature.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful requests return a \u003ccode\u003eTranslateTextResponse\u003c/code\u003e, and the total \u003ccode\u003econtents\u003c/code\u003e input should ideally be under 30k codepoints with a max length of 1024.\u003c/p\u003e\n"]]],[],null,["# Method: projects.translateText\n\nTranslates input text and returns translated text.\n\n### HTTP request\n\n`POST https://{TRANSLATION_GDC_ENDPOINT}/v3/{parent}:translateText`\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nIf successful, the response body contains an instance of [TranslateTextResponse](/distributed-cloud/hosted/docs/latest/gdch/apis/vertex-ai/translation/rest/v3/TranslateTextResponse)."]]