Software documentation Q&A
[Baidu API] Obtaining and configuring the Baidu Translate API

This article explains how to enable the Baidu Translate API and... Xiaofeitu (a website translation service) Configure the Baidu Translate API.

Activation steps

1. Register a Baidu account

2. Enable "General Translation"

1) Click to view details

2) Click "Use Now"

3) Fill in the information to apply for activation

3. Copy APPID and key

copyAPPIDandKeyaddress: https://api.fanyi.baidu.com/api/trans/product/desktop

WillAPPIDandKeyCopy to software configuration items. Activated service version:Standard Edition (Personal)Premium Version (Individual)Premium Edition (Enterprise)This configuration must be consistent with Baidu Translate.

4. Test and verify the translation

Configuration Interface

Download software

Interface configuration

  • Open the software and click on the menu bar. Configuration Interface

  • In the opened window, click Add Baidu

  • In the opened window, enter the following: Translate APPIDTranslation Key and Service Version

  • Click the button Add to

Interface fees

free

  • 50,000 characters per month

Paid

  • Standard EditionThe first 50,000 characters per month are free, with no limit on the number of characters used (QPS=1, i.e., one request per second to the interface), 49 yuan/million characters;
  • Premium versionThe first 1 million characters per month are free; after that, only the excess will be charged (QPS=10, which means 10 requests per second), at 49 yuan per million characters.
  • Premium EditionThe first 2 million characters per month are free; after that, only the excess will be charged (QPS=100, which means 100 requests per second), at 49 yuan per million characters.

For detailed pricing information, please refer to the official website documentation.https://fanyi-api.baidu.com/product/112

Precautions

  • Do not change your IP address after using Baidu Translate on the same day, otherwise the IP address will be blocked and will not be unblocked until the next day. The error code is 58003.
  • Applying for the premium version (enterprise) typically takes 1-2 days for approval.

Error code list

Official website:https://api.fanyi.baidu.com/doc/26

Error codemeaningSolution
0success
52001Request timed outPlease try again.
52002Server system errorPlease try again.
52003Unauthorized usersPlease check if the appid is correct or if the service is enabled.
52010Insufficient open device license capacityContact the administrator to increase capacity
54000Required parameters are empty or fixed parameters are incorrect.Check if parameters were transmitted incorrectly.
54001Signature errorPlease check your signature generation method.
54003Access frequency limitedPlease reduce your call frequency.
54004Insufficient account balancePlease go to the management control platform to top up your account.
54005Frequent long query requestsPlease reduce the frequency of sending long queries and try again in 3 seconds.
58000Invalid client IPTo check if the IP address entered in your personal profile is correct, you can go to the management control platform to modify it. IP restrictions apply; the IP address can be left blank.
58001The translation language direction is not supported.Check if the target language is in the language list.
58003Due to the use of improper means to collect user APPIDs and keys, the resulting theft of character data has become increasingly rampant. The system's risk control has added IP verification rules. If the same IP uses multiple APPIDs to send translation requests on the same day, that IP will be banned from requesting permissions for that day and unbanned the following day. However, due to the variability of IPs and the complexity of application scenarios, it is inevitable that some legitimate users will be mistakenly penalized.Apply for lifting the lockdown or wait for the next day to lift the lockdown.
69001The uploaded image data is incorrect.Check if there are any problems with the image.
69002Image recognition timed outPlease try again.
69003Content recognition failedTry again after checking if the image contains content.
69004The identified content is empty.Try again after checking if the image contains content.
69005Image size exceeds the limit (over 4MB)Please upload an image that meets the image size requirements.
69006Image dimensions do not meet standards (shortest side at least 30px, longest side maximum 4096px).Please upload an image that meets the image size requirements.
69007Image formats not supported (png/jpg)Please upload images in PNG or JPEG format.
69008Device number is emptyCheck cuid parameters
69012Text alignment parameters abnormalPlease check the parameter `paste`. Enumeration examples: 0 - Turn off text blending; 1 - Return to full image blending; 2 - Return to block blending.
Previous article:[Google API] Obtaining and configuring the Google Translate API
Next article:What is the runtime environment, and how do I install it?