Document Directory

Query Texts

Get system-extracted one-to-one correspondence of original text and translation, returned in JSON format

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

Request Parameters

ParametersTypeDescription
*taskIdStringID corresponding to the text task

Response

ParametersTypeDescription
textsJSONSystem-extracted one-to-one correspondence of original text and translation
revisedTextsJSONUser-initiated upload of revised translations for document regeneration

Update Texts

Add translation modifications and save them to the task's revisedTexts field. If startTranslation is set to true, it will simultaneously modify and retranslate the content.

Re-translation does not require spending credits.

curl
1curl -X POST 'https://otranslator.com/api/v1/translation/updateTexts' \
2--header 'Authorization: [yourSecretKey]' \
3--header 'Content-Type: application/json' \
4--data  '{ "taskId": "[update taskId]", "revisedTexts": {"example":"样例"}, "startTranslation": [true or false] }'

Request Parameters

ParametersTypeDescription
*taskIdStringTranslation Task ID to be Modified
*revisedTextsJSON ObjectRevised translation, key is the original text, value is the translation
startTranslationBooleanWhether to restart translation, default is false

Response

ParametersTypeDescription
successBooleanUpdate successful, or failed