Query Texts
Obtain the original and translated text extracted by the system in a one-to-one correspondence, and return it 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
- *taskId - String - ID of the task corresponding to the text
Response
- texts - JSON - Original text and translation extracted by the system in a one-to-one correspondence
- revisedTexts - JSON - User actively uploads revised translations for regenerating the document
Modify Translation
Upload the translation that needs manual modification. If you choose to retranslate, the document will be retranslated; otherwise, it will only be saved to revisedTexts.
This interface enables Post Editing capabilities.
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
- *taskId - String - Translation task ID that needs modification
- *revisedTexts - JSON Object - Revised translation, key is the original text, value is the translation
- startTranslation - Boolean - Whether to initiate retranslation, default is false
Response
- success - Boolean - Update successful, or failed