json and markdown.
This document will provide detailed instructions on integrating the Translate API, helping you easily integrate and fully utilize the powerful features of this API. With the Translate API, you can easily translate the input text into a specific language and support specific methods for outputting the translation results.
Application Process
To use the Localization Translate API, first go to the Ace Data Cloud Console to obtain your API Token for future use.
If you are not logged in or registered, you will be automatically redirected to the login page inviting you to register and log in, and after completion, you will be automatically returned to the current page.
One API Token can call all services on the platform without needing to apply separately for each service. The first application will grant a free quota for a trial experience; when the quota is insufficient, you can recharge the general balance in the console.
📘 Complete documentation: Localization Translate API →
Request Example
We will take an English input as an example to demonstrate how to use this API. Suppose the English description is:# Title 1\n\nThis is a paragraph.\n\n## Title 2\n\nThis is another paragraph., and we will demonstrate how to upload the English description and obtain the Chinese translation result, while displaying it in markdown format.
Setting Request Headers and Request Body
Request Headers include:accept: Specifies that the response result should be in JSON format, set toapplication/json.authorization: The key to call the API, which can be selected directly after application.
input: The content that needs to be translated. Pass a string whenextension=md, and pass a JSON object whenextension=json.locale: The language for the custom translation.extension: The format of the input content, optionalmdorjson.model: The large model used for translation, default is gpt-3.5.
extension must match the input type; strings cannot use json, and JSON objects cannot use md.
Set as shown in the image below:

Code Example
You can see that various language codes have been automatically generated on the right side of the page, as shown in the image:
CURL
Python
Response Example
Upon successful request, the API will return the result information of this translation task. For example:data field, which includes the translated Chinese text, and is returned in markdown format. Other information is as follows:
data, the result of this translation task.model, the large language model used for this translation task.locale, the type of translation language for this translation task.
Error Handling
When calling the API, if an error occurs, the API will return the corresponding error code and message. For example:400 token_mismatched: Bad request, possibly due to missing or invalid parameters.400 api_not_implemented: Bad request, possibly due to missing or invalid parameters.401 invalid_token: Unauthorized, invalid or missing authorization token.429 too_many_requests: Too many requests, you have exceeded the rate limit.500 api_error: Internal server error, something went wrong on the server.

