AI Translation

AI61 AI Translation

The AI Translation API leverages advanced large language model (LLM) to deliver real-time multilingual translation services worldwide. It enables accurate and seamless conversion of source text into target languages. Developers can easily integrate the API to achieve efficient and precise text translation, fully catering to multilingual application scenarios and enhancing user experience and cross-language communication efficiency.

post/ai/translation

Request

Request body

source_langstring

Source language.<p>Note:</p><p>1.Support direct input of the source language, e.g., CN;</p><p>2.Support automatic detection of the input text's language when the source language is not specified.</p>

target_langstring

Target language. Only supports CN, EN, and JP. If not specified, the default is EN.

textstring required

The original text that needs to be translated.Cannot exceed 2000 characters

Example request

{
  "source_lang": "CN",
  "target_lang": "EN",
  "text": "你好,世界!"
}

Response

Successful ai61 ai translation response.

statusboolean required

Status

error_msgstring

Error Message

error_codeinteger required

Error Code

Example response

{
  "data": {
    "source_lang": "CN",
    "target_lang": "EN",
    "translate_result": "Hello, world!"
  },
  "error_msg": "The request parameter format is incorrect!"
}

Changes

No recorded changes to this operation across all 1 revision of this API.