Obrigatório. O conteúdo da entrada no formato de string. Recomendamos que o conteúdo total tenha menos de 30 mil pontos de código. O comprimento máximo deste campo é de 1024 carateres.
mime_type
string
Opcional. O formato do texto de origem, por exemplo, "text/html" ou "text/plain". Se for deixado em branco, o tipo MIME usa como predefinição "text/html".
source_language_code
string
Opcional. O código de idioma BCP-47 do texto de entrada, se conhecido, por exemplo, "en-US" ou "sr-Latn". Os códigos de idioma suportados estão listados no artigo Suporte de idiomas. Se o idioma de origem não for especificado, a API tenta identificar o idioma de origem automaticamente e devolve o idioma de origem na resposta.
target_language_code
string
Obrigatório. O código de idioma BCP-47 a usar para a tradução do texto de entrada, definido para um dos códigos de idioma indicados em Suporte de idiomas.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-21 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)."]]