Document Directory

Translation Task API

Restart translation task

POST/v1/translation/start

Used for restarting terminated tasks, or paying credits for full document translation

Complete address
https://otranslator.com/api/v1/translation/start
Authentication
API Key needs to be passed in the Authorization request header
Content-Type
application/json
Invalid format
{ "error": "Invalid API key." }

Precautions

This API can be used to restart Terminated tasks, or to pay with credits via payWithCredits and start full text translation after the preview task is completed.

Paid tasks will not be charged twice. When passing the model parameter, it is only used to recalculate fees when payWithCredits is true and the task has not been paid.

Example

curl
1curl -X POST 'https://otranslator.com/api/v1/translation/start' \
2--header 'Authorization: [yourSecretKey]' \
3--header 'Content-Type: application/json' \
4--data '{
5  "taskId": "[string]"
6}'

Request Parameters

ParametersTypeDefaultDescriptionExample
*taskIdString-

Translation Task ID

-
payWithCreditsBoolean-

Process payment for translation task (only applicable to unpaid documents; paid documents will not incur duplicate charges)

-
modelString-
  • When payWithCredits is true, specifies the model used for full document translation
  • Supported models: Query
-

Response

ParametersTypeDefaultDescriptionExample
successBoolean-

Startup successful

-

Common Errors

401 Missing API key.

The Authorization request header is required.

401 Invalid API key.

The API key does not exist, has been deleted, or is no longer valid.

400 Missing required parameter: taskId.

Provide the taskId returned by the create translation task API.

402 Insufficient credits balance.

The account does not have enough credits to start the full translation.

404 Task not found.

The task does not exist or does not belong to the current API account.

Translation Task API
Revise Translation
Translation Task API
Translation text