文档目录

翻译任务 API

删除翻译任务

POST/v1/translation/delete

通过ID删除翻译任务。

完整地址
https://otranslator.com/api/v1/translation/delete
认证
需要在 Authorization 请求头中传入 API Key
Content-Type
application/json
错误格式
{ "error": "Invalid API key." }

注意事项

删除后任务会被标记为已删除,并会调用翻译服务清理任务相关资源。

示例

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

请求参数

参数类型默认描述示例
*taskIdString-

翻译任务ID

-

响应

参数类型默认描述示例
successBoolean-

是否删除成功

-

常见错误

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.

404 Task not found.

The task does not exist, has been deleted, does not belong to the current API account, or was not created through the API.

翻译任务 API
查询翻译任务
翻译任务 API
获取译文