Erforderlich. Der Inhalt der Eingabe im Stringformat. Wir empfehlen, dass der gesamte Inhalt weniger als 30.000 Codepoints umfasst. Die maximale Länge dieses Feldes beträgt 1.024 Zeichen.
mime_type
string
Optional. Das Format des Quelltexts, z. B. „text/html“ oder „text/plain“. Wenn Sie hier nichts eingeben, wird standardmäßig der MIME-Typ „text/html“ verwendet.
source_language_code
string
Optional. Der BCP-47-Sprachcode des Eingabetexts, falls bekannt, z. B. „en-US“ oder „sr-Latn“. Die unterstützten Sprachcodes finden Sie unter „Sprachunterstützung“. Wenn die Ausgangssprache nicht angegeben ist, versucht die API, sie automatisch zu ermitteln, und gibt sie in der Antwort zurück.
target_language_code
string
Erforderlich. Der BCP-47-Sprachcode, der für die Übersetzung des Eingabetexts verwendet werden soll. Er muss auf einen der unter „Sprachunterstützung“ aufgeführten Sprachcodes festgelegt sein.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 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)."]]