Belin Doc IconBelin Doc

Belin Doc · Open platform

Translation API Docs

Every endpoint below is the open counterpart of a feature you already use in the web app — same models, same quota, same output. The only difference is that an API key stands in for a login session.

Base URL
https://belindoc.com/api
Auth header
X-Api-Key
Method
POST · application/json
Endpoints
21
Last updated
2026-09-04
Contents
Getting started

Quick start

Four steps from a raw PDF to a translated file. The video endpoints follow the same shape.

  1. 01

    Create an API key

    Sign in to belindoc.com, open the avatar menu in the top right, choose Developer Center and create a key. Keys start with ft_ and the full value is shown only once, right after creation.

  2. 02

    Upload the file

    Ask for a presigned URL, then PUT the file straight to it. The URL is valid for 10 minutes; keep the objectKey it returns for the next step.

    bash
    # 1. Get a presigned upload URL (valid for 10 minutes)
    curl -X POST https://belindoc.com/api/external/translate/batchPresignedUploadUrl \
      -H "X-Api-Key: $BELINDOC_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"fileNameList": ["contract.pdf"]}'
    
    # → data[0].persignedUploadUrl / data[0].objectKey
    
    # 2. PUT the file straight to that URL
    curl -X PUT "<persignedUploadUrl>" --upload-file contract.pdf
  3. 03

    Submit the translation

    fileList, sourceLanguage, targetLanguage and model are required. Pass AnyLanguage to auto-detect the source, and read the authoritative model list from getModelList rather than hard-coding names.

    bash
    curl -X POST https://belindoc.com/api/external/translate/batchSubmitTranslateTask \
      -H "X-Api-Key: $BELINDOC_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "fileList": [{ "fileName": "contract.pdf", "fileObjectKey": "<objectKey>" }],
        "sourceLanguage": "AnyLanguage",
        "targetLanguage": "zh-CN",
        "model": "Gemini-2.5-Flash"
      }'
    
    # → { "code": "200", "data": { "batchNo": "...", "fileList": [ ... ] } }
  4. 04

    Poll, then download

    Poll by batchNo until status is 3, then ask for a download URL. That endpoint answers with an SSE stream — the link arrives in the [DONE] event.

    bash
    # Poll the task — status = 3 means the translation is ready
    curl -X POST https://belindoc.com/api/external/translate/searchTranslateFileByBatchNo \
      -H "X-Api-Key: $BELINDOC_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"batchNo": "<batchNo>"}'
    
    # Get the download URL — SSE response, the link arrives in the [DONE] event
    curl -N -X POST https://belindoc.com/api/external/translate/getTranslateS3DownloadUrl \
      -H "X-Api-Key: $BELINDOC_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"translateOrderNo": "<translateOrderNo>", "urlType": 2}'
    
    # event:[DONE]
    # data:{"url":"https://..."}
Getting started

Authentication

Open endpoints live under /external/ and identify the caller by the key alone. Everything else — request body, defaults, response envelope — matches the web app.

http
POST /api/external/translate/getModelList HTTP/1.1
Host: belindoc.com
Content-Type: application/json
X-Api-Key: ft_xxxxxxxxxxxxxxxxxxxxxxxx
language: zh

{}
json
{
  "code": "200",
  "msg": null,
  "requestId": "8f1c…",
  "data": { }
}
X-Api-Key header
Send your key on every request. A missing, revoked, expired or out-of-allowlist key fails before any business logic runs.
language header
Optional. Sets the language of the msg field in the response; defaults to en. Accepts the site locales: en, zh, zh-Hant, ja, ko, fr, ru, de, ar.
Keys act on the personal account
A key always resolves to the personal account that created it. Files go to the platform storage and tasks draw on that account's own quota — an organization's private workspace is not addressed through the API.
Response envelope
Every endpoint answers with the same wrapper. A code of 200 means success; anything else is a business error and msg carries the localized text.
No JWT, no request signature
The token and signature filters that guard the web endpoints skip /external/. Your key is the only credential, so treat it like a password and keep it server-side.
/external/translate9 endpoints

Document translation

The whole document pipeline: upload, submit, poll, download — plus the model and language enumerations you should read instead of hard-coding.

  • status: 0 queued · 1 parsing · 2 translating · 3 done · 4 failed · 5 canceled
  • urlType: 1 source file · 2 translation · 3 side-by-side · 4 stacked · -1 EPUB preview
01

Get upload URLs

POST

/external/translate/batchPresignedUploadUrl

Get presigned upload URLs for one or more files.

Parameters

FieldTypeReq.Description
fileNameListarray[string]requiredFile names you want upload URLs for

Response · data

FieldTypeDescription
persignedUploadUrlstringPresigned PUT URL, valid for 10 minutes
objectKeystringStorage key to pass on submit
fileNamestringOriginal file name
storageTypenumberStorage backend holding the file
Example
request
{
  "fileNameList": ["contract.pdf"]
}
response
{
  "code": "200",
  "data": [
    {
      "persignedUploadUrl": "https://s3.../contract.pdf?X-Amz-Signature=…",
      "objectKey": "translate/10086/2026/contract.pdf",
      "fileName": "contract.pdf",
      "storageType": 1
    }
  ]
}
02

Detect a scanned file

POST

/external/translate/isOcr

Tell whether an uploaded file is a scan before you submit it, so OCR is only switched on where it actually earns its cost.

Parameters

FieldTypeReq.Description
fileObjectKeystringrequiredobjectKey returned by the presign call
storageTypenumberrequiredStorage backend holding the file

Response · data

FieldTypeDescription
isOcrnumber1 means the file is a scan
isDoubleDecknumber1 means the scan already carries a text layer
Example
request
{
  "fileObjectKey": "translate/10086/2026/contract.pdf",
  "storageType": 1
}
response
{
  "code": "200",
  "data": { "isOcr": 1, "isDoubleDeck": 0 }
}
03

Submit a translation

POST

/external/translate/batchSubmitTranslateTask

Submit a batch translation job; returns batchNo and one order number per file.

Parameters

FieldTypeReq.Description
fileListarrayrequiredFiles to translate
fileNamestringrequiredOriginal file name
fileObjectKeystringrequiredobjectKey returned by the presign call
isOcrFilenumber1 treats this file as a scan; take the value from isOcr
sourceLanguagestringrequiredSource language code; AnyLanguage auto-detects
targetLanguagestringrequiredTarget language code
modelstringrequiredModel version, taken from getModelList
isOcrnumber1 runs OCR; defaults to 0
isMathnumber1 preserves formula layout; defaults to 0
translateStylenumberTranslation style preset
terminologyCollectionIdstringID of the term library to apply; term libraries can currently only be created and managed in the web app

Response · data

FieldTypeDescription
batchNostringBatch number returned on submit
fileListarrayFiles to translate
balanceHintnumber1 warns that the remaining quota is running low
Example
request
{
  "fileList": [
    { "fileName": "contract.pdf", "fileObjectKey": "translate/10086/2026/contract.pdf" }
  ],
  "sourceLanguage": "AnyLanguage",
  "targetLanguage": "zh-CN",
  "model": "Gemini-2.5-Flash",
  "isOcr": 0,
  "terminologyCollectionId": "66f1c2a4b8d3e5f7a9c1b2d3"
}
response
{
  "code": "200",
  "data": {
    "batchNo": "B20260828173001",
    "fileList": [
      { "fileName": "contract.pdf", "fileObjectKey": "translate/10086/2026/contract.pdf" }
    ],
    "balanceHint": 0
  }
}
04

List tasks in a batch

POST

/external/translate/searchTranslateFileByBatchNo

List every task in a batch — this is the endpoint to poll.

Parameters

FieldTypeReq.Description
batchNostringrequiredBatch number returned on submit

Response · task object

FieldTypeDescription
translateOrderNostringTask order number
batchNostringBatch number returned on submit
sourceFileNamestringOriginal file name
statusnumberTask status — see the legend above
textNumbernumberCharacters counted for this task
targetFileUrlstringTranslated file URL
targetFileUrl2stringMainland-China fallback URL
xComparisonS3UrlstringSide-by-side comparison file
yComparisonS3UrlstringStacked comparison file
freeTranslateQuotanumberPages taken from the free quota
walletTranslateQuotanumberPages taken from the paid quota
createTimenumberCreated at, epoch milliseconds
startTimenumberStarted at, epoch milliseconds
endTimenumberFinished at, epoch milliseconds
errorCodestringFailure code when status is 4
Example
request
{
  "batchNo": "B20260828173001"
}
response
{
  "code": "200",
  "data": [
    {
      "translateOrderNo": "T20260828173002",
      "batchNo": "B20260828173001",
      "sourceFileName": "contract.pdf",
      "status": 3,
      "textNumber": 4820,
      "targetFileUrl": "https://s3.../contract_zh-CN.pdf?X-Amz-Signature=…"
    }
  ]
}
05

Browse translation history

POST

/external/translate/searchTranslateFilePage

Page through this account's translation history.

Parameters

FieldTypeReq.Description
pageNumnumberrequiredPage number, starts at 1
pageSizenumberrequiredRows per page
statusnumberTask status — see the legend above
fileTypestringFilter by file type, e.g. PDF
sourceFileNamestringFilter by file name

Response · data

FieldTypeDescription
recordsarrayRows on this page
totalnumberTotal rows
currentnumberCurrent page number
pagesnumberTotal number of pages
06

Get a task's detail

POST

/external/translate/getTranslateFileDetail

Read a single task by its order number.

Parameters

FieldTypeReq.Description
translateOrderNostringrequiredTask order number

Response · task object

FieldTypeDescription
translateOrderNostringTask order number
batchNostringBatch number returned on submit
sourceFileNamestringOriginal file name
statusnumberTask status — see the legend above
textNumbernumberCharacters counted for this task
targetFileUrlstringTranslated file URL
targetFileUrl2stringMainland-China fallback URL
xComparisonS3UrlstringSide-by-side comparison file
yComparisonS3UrlstringStacked comparison file
freeTranslateQuotanumberPages taken from the free quota
walletTranslateQuotanumberPages taken from the paid quota
createTimenumberCreated at, epoch milliseconds
startTimenumberStarted at, epoch milliseconds
endTimenumberFinished at, epoch milliseconds
errorCodestringFailure code when status is 4
07

Get a download URL

POST

/external/translate/getTranslateS3DownloadUrl

Get a download URL for the source, the translation or a comparison file (SSE response).

Parameters

FieldTypeReq.Description
translateOrderNostringrequiredTask order number
urlTypenumberrequiredWhich file to fetch — see the legend above
isWatermarknumber0 drops the watermark when your plan allows it

Response · SSE events

FieldTypeDescription
urlstringDownload link, carried by the [DONE] event
url2stringMainland-China fallback link, when present
Example
request
{
  "translateOrderNo": "T20260828173002",
  "urlType": 2,
  "isWatermark": 0
}
response
event:[PROCESS]
data:

event:[DONE]
data:{"translateOrderNo":"T20260828173002","url":"https://s3.../contract_zh-CN.pdf?X-Amz-Signature=…"}
08

List available models

POST

/external/translate/getModelList

List the values accepted by model, with their quota coefficients.

Parameters

No parameters — send an empty JSON body.

Response · data

FieldTypeDescription
versionstringThe value to pass as model
modelTypenumberInternal model family
vipTypenumberPlan required to use it
coefficientnumberQuota multiplier of this model
groupTypenumberGroup it is listed under
09

List supported languages

POST

/external/translate/getLanguageEnum

List the 79 supported language codes with localized names.

Parameters

No parameters — send an empty JSON body.

Response · data

FieldTypeDescription
{locale}objectlocale → language code → localized name
Example
response
{
  "code": "200",
  "data": {
    "en": {
      "AnyLanguage": "Any language",
      "zh-CN": "Simplified Chinese",
      "…": "…"
    },
    "zh": {
      "AnyLanguage": "任意语言",
      "zh-CN": "简体中文",
      "…": "…"
    },
    "…": {}
  }
}
/external/videoTranslate10 endpoints

Video translation

Video translation end to end: estimate the cost, submit, follow progress, then edit the subtitles and re-render.

  • status: 0 pending · 1 running · 2 done · 3 failed · 4 canceled
  • step: 1 speech recognition · 2 subtitle translation · 3 voice generation
  • stepStatus: 0 pending · 1 running · 2 done · 3 failed
  • subtitleType: 0 none · 1 translated · 2 original · 3 both
01

Get upload URLs

POST

/external/videoTranslate/batchPresignedUploadUrl

Get presigned upload URLs for video files.

Parameters

FieldTypeReq.Description
fileNameListarray[string]requiredFile names you want upload URLs for

Response · data

FieldTypeDescription
persignedUploadUrlstringPresigned PUT URL, valid for 10 minutes
objectKeystringStorage key to pass on submit
fileNamestringOriginal file name
02

Submit a video

POST

/external/videoTranslate/submitVideoTranslate

Submit a video translation job; videoTaskParam carries voice, subtitle and font settings.

Parameters

FieldTypeReq.Description
sourceLanguagestringrequiredSource language code; AnyLanguage auto-detects
targetLanguagestringrequiredTarget language code
sourceFileObjectKeystringrequiredobjectKey of the uploaded video
videoFileNamestringrequiredOriginal video file name
videoTaskParamobjectrequiredVoice, subtitle and font settings
voiceRolestringDubbing voice; clone reuses the original speaker
subtitleTypenumberSubtitles to burn in — see the legend above
Other videoTaskParam fields (25, all optional)
FieldTypeDescription
recognTypenumberSpeech-recognition engine, default 12 — leave as is
modelNamestringRecognition model, default tiny
splitTypestringSegmentation mode, default all
isCudabooleanUse GPU acceleration, default false
translateTypenumberSubtitle translation engine, default 14 — leave as is
ttsTypenumberSpeech synthesis engine, default 15 — leave as is
voiceRatestringDubbing speed, e.g. +10%, default +0%
volumestringDubbing volume, e.g. +10%, default +0%
pitchstringDubbing pitch, e.g. +5Hz, default +0Hz
voiceAutoratebooleanFit the dub to the original timing, default true
videoAutoratebooleanFit the video timing to the dub, default true
appendVideobooleanLoop the footage when it runs short, default true
isSeparatebooleanOutput voice and background audio separately, default false
onlyVideobooleanProduce only the video, no subtitle files, default false
fontsizenumberSubtitle font size, default 14
fontnamestringSubtitle font name; omit for the server default
fontcolorstringSubtitle text color, #RRGGBB or an ASS color
fontboldbooleanBold subtitles
subtitlePosYnumberDistance from the bottom edge, 0-90 percent; omit for bottom
subtitlePosXnumberHorizontal center from the left edge, 5-95 percent; 50 is centered
fontbordercolorstringSubtitle outline color, #RRGGBB / #RRGGBBAA / ASS color
backgroundcolorstringSubtitle background box color, #RRGGBB / #RRGGBBAA / ASS color
outlinenumberOutline width 0-10; 0 turns the outline off
shadownumberShadow size 0-10; 0 turns the shadow off
borderStylenumberBorder style: 1 outline/shadow, 3 per-line background box

Response · task object

FieldTypeDescription
videoTranslateOrderNostringVideo task order number
videoFileNamestringOriginal video file name
videoDurationnumberVideo length in seconds
statusnumberTask status — see the legend above
stepnumberCurrent step of the pipeline — see the legend above
stepStatusnumberStatus of the current step — see the legend above
targetFileUrlstringTranslated file URL
sourceSubtitlesUrlstringSource subtitle file URL
targetSubtitlesUrlstringTranslated subtitle file URL
freeTranslateQuotanumberPages taken from the free quota
walletTranslateQuotanumberPages taken from the paid quota
errorMessagestringFailure reason when the task fails
Example
request
{
  "sourceLanguage": "ja",
  "targetLanguage": "zh-CN",
  "sourceFileObjectKey": "video/10086/2026/lecture.mp4",
  "videoFileName": "lecture.mp4",
  "videoTaskParam": { "voiceRole": "clone", "subtitleType": 1 }
}
03

Estimate video cost

POST

/external/videoTranslate/videoTranslateQuotaCalculate

Estimate the quota cost from duration, voice and subtitle type before submitting.

Parameters

FieldTypeReq.Description
videoDurationnumberrequiredVideo length in seconds
voiceRolestringrequiredDubbing voice; clone reuses the original speaker
subtitleTypenumberrequiredSubtitles to burn in — see the legend above

Response · data

FieldTypeDescription
translateQuotanumberTotal quota this job costs
videoDurationTranslateQuotanumberQuota derived from the video length
thirtySecondQuotanumberQuota per 30 seconds
quotaCoefficientnumberMultiplier applied to the base cost
04

Browse video history

POST

/external/videoTranslate/searchVideoTranslatePage

Page through this account's video translation history.

Parameters

FieldTypeReq.Description
pageNumnumberrequiredPage number, starts at 1
pageSizenumberrequiredRows per page
statusnumberTask status — see the legend above

Response · data

FieldTypeDescription
recordsarrayRows on this page
totalnumberTotal rows
currentnumberCurrent page number
pagesnumberTotal number of pages
05

Get a task's detail

POST

/external/videoTranslate/getVideoTranslateDetail

Read a single video task, including progress and output URLs.

Parameters

FieldTypeReq.Description
videoTranslateOrderNostringrequiredVideo task order number

Response · task object

FieldTypeDescription
videoTranslateOrderNostringVideo task order number
videoFileNamestringOriginal video file name
videoDurationnumberVideo length in seconds
statusnumberTask status — see the legend above
stepnumberCurrent step of the pipeline — see the legend above
stepStatusnumberStatus of the current step — see the legend above
targetFileUrlstringTranslated file URL
sourceSubtitlesUrlstringSource subtitle file URL
targetSubtitlesUrlstringTranslated subtitle file URL
freeTranslateQuotanumberPages taken from the free quota
walletTranslateQuotanumberPages taken from the paid quota
errorMessagestringFailure reason when the task fails
06

Cancel a video task

POST

/external/videoTranslate/cancelVideoTranslateHistory

Cancel a video task that has not finished yet.

Parameters

FieldTypeReq.Description
videoTranslateOrderNostringrequiredVideo task order number
07

Get the subtitles

POST

/external/videoTranslate/getVideoTranslateSubtitles

Fetch the source and translated subtitles for editing.

Parameters

FieldTypeReq.Description
videoTranslateOrderNostringrequiredVideo task order number

Response · data

FieldTypeDescription
sourceSubtitlesUrlstringSource subtitle file URL
targetSubtitlesUrlstringTranslated subtitle file URL
08

Submit edited subtitles

POST

/external/videoTranslate/submitVideoRewrite

Submit edited subtitles and re-render the video.

Parameters

FieldTypeReq.Description
videoTranslateOrderNostringrequiredVideo task order number
sourceSubtitlesTxtstringrequiredEdited source subtitles
targetSubtitlesTxtstringrequiredEdited translated subtitles
videoTaskParamobjectVoice, subtitle and font settings
Other videoTaskParam fields (25, all optional)
FieldTypeDescription
recognTypenumberSpeech-recognition engine, default 12 — leave as is
modelNamestringRecognition model, default tiny
splitTypestringSegmentation mode, default all
isCudabooleanUse GPU acceleration, default false
translateTypenumberSubtitle translation engine, default 14 — leave as is
ttsTypenumberSpeech synthesis engine, default 15 — leave as is
voiceRatestringDubbing speed, e.g. +10%, default +0%
volumestringDubbing volume, e.g. +10%, default +0%
pitchstringDubbing pitch, e.g. +5Hz, default +0Hz
voiceAutoratebooleanFit the dub to the original timing, default true
videoAutoratebooleanFit the video timing to the dub, default true
appendVideobooleanLoop the footage when it runs short, default true
isSeparatebooleanOutput voice and background audio separately, default false
onlyVideobooleanProduce only the video, no subtitle files, default false
fontsizenumberSubtitle font size, default 14
fontnamestringSubtitle font name; omit for the server default
fontcolorstringSubtitle text color, #RRGGBB or an ASS color
fontboldbooleanBold subtitles
subtitlePosYnumberDistance from the bottom edge, 0-90 percent; omit for bottom
subtitlePosXnumberHorizontal center from the left edge, 5-95 percent; 50 is centered
fontbordercolorstringSubtitle outline color, #RRGGBB / #RRGGBBAA / ASS color
backgroundcolorstringSubtitle background box color, #RRGGBB / #RRGGBBAA / ASS color
outlinenumberOutline width 0-10; 0 turns the outline off
shadownumberShadow size 0-10; 0 turns the shadow off
borderStylenumberBorder style: 1 outline/shadow, 3 per-line background box

Response · data

FieldTypeDescription
videoTranslateRewriteOrderNostringSubtitle re-render order number
statusnumberTask status — see the legend above
targetFileUrlstringTranslated file URL
09

Check re-render progress

POST

/external/videoTranslate/getVideoTranslateRewriteDetail

Read the status of a subtitle re-render job.

Parameters

FieldTypeReq.Description
videoTranslateRewriteOrderNostringrequiredSubtitle re-render order number

Response · data

FieldTypeDescription
statusnumberTask status — see the legend above
targetFileUrlstringTranslated file URL
targetSubtitlesUrlstringTranslated subtitle file URL
errorMessagestringFailure reason when the task fails
10

Estimate re-render cost

POST

/external/videoTranslate/videoTranslateRewriteQuotaCalculate

Estimate the quota cost of a subtitle re-render.

Parameters

FieldTypeReq.Description
videoTranslateRewriteOrderNostringrequiredSubtitle re-render order number

Response · data

FieldTypeDescription
translateQuotanumberTotal quota this job costs
quotaCoefficientnumberMultiplier applied to the base cost
/external/user2 endpoints

Account

The quota and the plan sitting behind the key, so your integration can check what is left before it submits instead of learning it from an error.

  • subscriptionStatus: 1 pending · 2 active · 3 unsubscribed · 4 cancelled
  • interval: 1 day · 2 week · 3 month · 4 year
01

Check your quota

POST

/external/user/getMyWalletInfo

Read the wallet behind this key: page quota, OCR quota, watermark removals and referral balance.

Parameters

No parameters — send an empty JSON body.

Response · data

FieldTypeDescription
userIdnumberAccount the key belongs to
translateQuotanumberPage quota still available
advancedTranslateQuotanumberAdvanced-model quota still available
ocrTranslateQuotanumberOCR quota still available
accelerationCardNumbernumberAcceleration cards still available
totalFreeTranslateQuotanumberFree pages granted this period
useFreeTranslateQuotanumberFree pages already used this period
totalFreeOcrTranslateQuotanumberFree OCR pages granted this period
useFreeOcrTranslateQuotanumberFree OCR pages already used this period
freeWatermarkQuotanumberWatermark removals still available
daysFreeWatermarkQuotanumberWatermark removals granted per day
usedDaysFreeWatermarkQuotanumberWatermark removals already used today
rewardBalancenumberReferral reward balance
rewardTotalnumberReferral reward earned in total
Example
request
{}
response
{
  "code": "200",
  "data": {
    "userId": 10086,
    "translateQuota": 12000,
    "advancedTranslateQuota": 0,
    "ocrTranslateQuota": 800,
    "totalFreeTranslateQuota": 500,
    "useFreeTranslateQuota": 132
  }
}
02

Check your plan

POST

/external/user/getMySubscriptionInfo

Read the plan behind this key: tier, current period, and the limits it grants — concurrency, file size, video length.

Parameters

No parameters — send an empty JSON body.

Response · data

FieldTypeDescription
vipNamestringPlan name
vipTypenumberPlan tier
subscriptionStatusnumberSubscription state — see the legend above
intervalnumberBilling cycle — see the legend above
startTimenumberPeriod start, epoch milliseconds
endTimenumberPeriod end, epoch milliseconds
translateQuotanumberPages granted per period
advancedTranslateQuotanumberAdvanced-model pages granted per period
freeTranslateQuotanumberFree pages granted per cycle
freeTranslateQuotaIntervalnumberCycle the free pages reset on: 1 day · 2 week · 3 month
concurrenceTasknumberDocument tasks allowed to run at once
uploadFileSizenumberUpload size limit, in MB
videoDurationLimitnumberVideo length limit, in minutes
videoTranslateConcurrencynumberVideo tasks allowed to run at once
videoFileSizenumberVideo size limit, in MB
Reference

Error codes

Key-level failures come back with HTTP 200 and a business code in the envelope. These are the ones your integration has to handle.

CodeMeaningWhat to do
30306Invalid API keyCheck the key was copied whole, including the ft_ prefix. Deleted keys return this too.
30307Key disabledRe-enable it in the Developer Center, or switch to another key.
30308Key expiredPush the expiry date out, or create a new key.
30309Caller IP is not in the allowlistAdd the server's outbound IP to the key's allowlist, or clear the allowlist.
30312Key blocked by an administratorContact support — this one cannot be lifted from the Developer Center.

Errors from the translation itself — insufficient quota, unsupported file, duplicate submission — use their own codes and always come with a localized msg. Branch on code, never on msg.

Reference

Quotas & limits

The API is another way in, not another product. These are the rules it inherits from the web app.

Same quota, no separate billing
API calls draw on the same page and video quota as the web app, at the same model coefficients. There is no API-only price.
Same watermark rules
Translated PDFs carry a watermark on the free tier, exactly as they do in the browser. Going through the API does not remove it.
Only submissions count as calls
A key's call counter moves on batchSubmitTranslateTask, submitVideoTranslate and submitVideoRewrite. Status and detail lookups are free to poll.
One submission at a time
Submissions are serialized per account. A second submit while the first is still being accepted comes back as a duplicate-task error — retry after a moment instead of firing them in parallel.
OCR is off by default
Set isOcr only for scanned documents. OCR draws on the OCR sub-quota on top of the page quota, so leaving it on for text PDFs spends quota twice — call the isOcr endpoint first when you are not sure.

Prefer to skip the plumbing?

The same capabilities are exposed as MCP tools, so an AI agent can translate a document without you writing a single HTTP call.