summaryrefslogtreecommitdiff
path: root/data/zh_cn/realtranslationagent
diff options
context:
space:
mode:
authorZhineng Li <im@zhineng.li>2026-07-12 17:11:17 +0800
committerZhineng Li <im@zhineng.li>2026-07-12 17:11:17 +0800
commit1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634 (patch)
tree5f0857666365b7e40cdaa3733ebe1f3ba9e13c67 /data/zh_cn/realtranslationagent
parent7347bac4ab7e136157fc94777e6cf87ef9e08599 (diff)
downloadafterglow-metadata-full-1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634.tar.gz
afterglow-metadata-full-1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634.zip
update APIs 20260712
Diffstat (limited to 'data/zh_cn/realtranslationagent')
-rw-r--r--data/zh_cn/realtranslationagent/2026-06-22/api-docs.php863
1 files changed, 863 insertions, 0 deletions
diff --git a/data/zh_cn/realtranslationagent/2026-06-22/api-docs.php b/data/zh_cn/realtranslationagent/2026-06-22/api-docs.php
new file mode 100644
index 0000000..eb8d3d1
--- /dev/null
+++ b/data/zh_cn/realtranslationagent/2026-06-22/api-docs.php
@@ -0,0 +1,863 @@
+<?php return [
+ 'version' => '1.0',
+ 'info' => ['style' => 'RPC', 'product' => 'RealTranslationAgent', 'version' => '2026-06-22'],
+ 'directories' => ['UploadTranslationFile', 'CancelTranslationTask', 'GetOriginalFileUrl', 'GetTranslatedFileUrl', 'GetTranslationTask', 'ListTranslationTasks', 'SubmitTranslationTask'],
+ 'components' => [
+ 'schemas' => [],
+ ],
+ 'apis' => [
+ 'CancelTranslationTask' => [
+ 'summary' => '本接口用于取消正在运行中的翻译任务。',
+ 'methods' => ['post'],
+ 'schemes' => ['https'],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'operationType' => 'write',
+ 'deprecated' => false,
+ 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'],
+ 'parameters' => [
+ [
+ 'name' => 'TaskId',
+ 'in' => 'formData',
+ 'schema' => ['description' => '任务ID。'."\n"
+ .'- SubmitTranslationTask任务提交后会返回TaskId。'."\n"
+ .'- 仅可取消正在运行的任务。', 'type' => 'string', 'required' => true, 'example' => 'f9c35b0453b'],
+ ],
+ [
+ 'name' => 'APIKey',
+ 'in' => 'query',
+ 'schema' => ['title' => 'API密钥,标识成员账号身份,可通过睿译宝工作台获取', 'description' => 'API密钥,标识成员账号身份,可通过睿译宝工作台获取', 'type' => 'string', 'required' => false, 'example' => 'sk-5****7'],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'PlainResult<TranslationSubmitResultDTO>',
+ 'description' => '\\-',
+ 'type' => 'object',
+ 'properties' => [
+ 'Success' => ['title' => '是否成功', 'description' => '是否成功', 'type' => 'boolean', 'example' => 'True'],
+ 'Code' => ['title' => '返回码', 'description' => '返回码', 'type' => 'string', 'example' => 'success'],
+ 'Message' => ['title' => '返回消息', 'description' => '返回消息', 'type' => 'string', 'example' => 'successful'],
+ 'RequestId' => ['title' => '请求ID', 'description' => '请求ID', 'type' => 'string', 'example' => 'F22CA868-601F-50D1-99B2-520491F25EB7'],
+ 'Data' => [
+ 'title' => '业务数据',
+ 'description' => '业务数据',
+ 'type' => 'object',
+ 'properties' => [
+ 'TaskId' => ['description' => '任务ID。', 'type' => 'string', 'example' => 'f9c35b0453b'],
+ 'Status' => [
+ 'description' => '任务状态。',
+ 'type' => 'string',
+ 'enumValueTitles' => ['CANCELLED' => '已取消', 'COMPLETED' => '已完成', 'FAILED' => '失败', 'PROCESSING' => '处理中', 'PENDING' => '待处理', 'ANALYZED' => '已分析'],
+ 'example' => 'CANCEL',
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Success\\": true,\\n \\"Code\\": \\"success\\",\\n \\"Message\\": \\"successful\\",\\n \\"RequestId\\": \\"F22CA868-601F-50D1-99B2-520491F25EB7\\",\\n \\"Data\\": {\\n \\"TaskId\\": \\"f9c35b0453b\\",\\n \\"Status\\": \\"CANCEL\\"\\n }\\n}","type":"json"}]',
+ 'title' => '取消翻译任务',
+ 'description' => '**计费说明**'."\n"
+ ."\n"
+ .'取消成功后,本次翻译任务冻结的 Credits 将全额返还至您的账户。'."\n"
+ ."\n"
+ .'**注意事项**'."\n"
+ ."\n"
+ .'- 本接口仅支持取消状态为处理中的翻译任务,已完成或已失败的任务无法取消。',
+ 'changeSet' => [],
+ ],
+ 'GetOriginalFileUrl' => [
+ 'summary' => '获取翻译任务的原始文件下载URL。',
+ 'methods' => ['post'],
+ 'schemes' => ['https'],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'operationType' => 'read',
+ 'deprecated' => false,
+ 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'],
+ 'parameters' => [
+ [
+ 'name' => 'TaskId',
+ 'in' => 'formData',
+ 'schema' => ['description' => '任务ID。'."\n"
+ .'- SubmitTranslationTask任务提交后会返回TaskId。', 'type' => 'string', 'required' => true, 'example' => 'f9c35b0453b'],
+ ],
+ [
+ 'name' => 'APIKey',
+ 'in' => 'query',
+ 'schema' => ['title' => 'API密钥,标识成员账号身份,可通过睿译宝工作台获取', 'description' => 'API密钥,标识成员账号身份,可通过睿译宝工作台获取', 'type' => 'string', 'required' => false, 'example' => '***'],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'PlainResult<FileDownloadUrlDTO>',
+ 'description' => '\\-',
+ 'type' => 'object',
+ 'properties' => [
+ 'Success' => ['title' => '是否成功', 'description' => '是否成功。', 'type' => 'boolean', 'example' => 'True'],
+ 'Code' => ['title' => '返回码', 'description' => '返回码。', 'type' => 'string', 'example' => 'success'],
+ 'Message' => ['title' => '返回消息', 'description' => '返回消息。', 'type' => 'string', 'example' => 'success'],
+ 'RequestId' => ['title' => '请求ID', 'description' => '请求ID。', 'type' => 'string', 'example' => '9F80A58B-DFBA-55A1-B9D2-819B32904127'],
+ 'Data' => [
+ 'title' => '业务数据',
+ 'description' => '业务数据。',
+ 'type' => 'object',
+ 'properties' => [
+ 'DownloadUrl' => ['description' => '文件下载URL。', 'type' => 'string', 'example' => 'https://gtm-translate-service-prod.oss-cn-zhangjiakou.aliyuncs.com/translations/replaced/a_file_992736840.pptx?Expires=1782738716&OSSAccessKeyId=STS.NZm6TgFWU2sgpBxs2UD154B9w&Signature=uPORIIsYjiwRFzoyNUN8Htnwdfc%3D&security-token=CAIS3gJ1q6Ft5B2yfSjIr5nYfe7Tq4h0hbGMcmTJlzIASL4Z24eSlTz2IHhMf3FtAuwft%2FU0mWFW7foSlrp6SJtIXleCZtF94oxN9h2gb4fb4woBanWd08%2FLI3OaLjKm9u2wCryLYbGwU%2FOpbE%2B%2B5U0X6LDmdDKkckW4OJmS8%2FBOZcgWWQ%2FKBlgvRq0hRG1YpdQdKGHaONu0LxfumRCwNkdzvRdmgm4NgsbWgO%2Fks0OC1ACnmrdM%2FdupesL0MPMBZskvD42Hu8VtbbfE3SJq7BxHybx7lqQs%2B02c5onGWwQKv0zfYrGJo4M0cF9jLqcmHutYtvH6jvlxpuGWjInt1RdGMKRHXj7YAZy63dDYCHRtm2ect12R0R3spTPvXvGd22tMCfkrqw7Ahz2PACvRGM5dh0AbW042tZHwaHNHYcJrPu9YH1QLobvGc7TkCSYBIdG7lRJ8EPtayyu0U3F2gASJGhqAATkIHCzHZWyr%2F8WJFcinsIxuI8iYoH3pOTZ2HJgDW38Zbu0NqMZmH%2BbRahVPiN7s4ckYmF50hCbgXt%2BdD9R6jB%2BkNufrVtN%2FAVgRMLOeEn2FZF0CCLlyjaIqq8QIxaPpDSLxpV6wZSh5enenoKm%2B1wunWRdd0gwG03k%2F4RCcDbb%2FIAA%3D'],
+ 'FileName' => ['description' => '文件名称。', 'type' => 'string', 'example' => 'translated_a_file.pptx'],
+ 'ExpireTime' => ['description' => '过期时间(单位:毫秒)。', 'type' => 'integer', 'format' => 'int64', 'example' => '1774147442'],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Success\\": true,\\n \\"Code\\": \\"success\\",\\n \\"Message\\": \\"success\\",\\n \\"RequestId\\": \\"9F80A58B-DFBA-55A1-B9D2-819B32904127\\",\\n \\"Data\\": {\\n \\"DownloadUrl\\": \\"https://gtm-translate-service-prod.oss-cn-zhangjiakou.aliyuncs.com/translations/replaced/a_file_992736840.pptx?Expires=1782738716&OSSAccessKeyId=STS.NZm6TgFWU2sgpBxs2UD154B9w&Signature=uPORIIsYjiwRFzoyNUN8Htnwdfc%3D&security-token=CAIS3gJ1q6Ft5B2yfSjIr5nYfe7Tq4h0hbGMcmTJlzIASL4Z24eSlTz2IHhMf3FtAuwft%2FU0mWFW7foSlrp6SJtIXleCZtF94oxN9h2gb4fb4woBanWd08%2FLI3OaLjKm9u2wCryLYbGwU%2FOpbE%2B%2B5U0X6LDmdDKkckW4OJmS8%2FBOZcgWWQ%2FKBlgvRq0hRG1YpdQdKGHaONu0LxfumRCwNkdzvRdmgm4NgsbWgO%2Fks0OC1ACnmrdM%2FdupesL0MPMBZskvD42Hu8VtbbfE3SJq7BxHybx7lqQs%2B02c5onGWwQKv0zfYrGJo4M0cF9jLqcmHutYtvH6jvlxpuGWjInt1RdGMKRHXj7YAZy63dDYCHRtm2ect12R0R3spTPvXvGd22tMCfkrqw7Ahz2PACvRGM5dh0AbW042tZHwaHNHYcJrPu9YH1QLobvGc7TkCSYBIdG7lRJ8EPtayyu0U3F2gASJGhqAATkIHCzHZWyr%2F8WJFcinsIxuI8iYoH3pOTZ2HJgDW38Zbu0NqMZmH%2BbRahVPiN7s4ckYmF50hCbgXt%2BdD9R6jB%2BkNufrVtN%2FAVgRMLOeEn2FZF0CCLlyjaIqq8QIxaPpDSLxpV6wZSh5enenoKm%2B1wunWRdd0gwG03k%2F4RCcDbb%2FIAA%3D\\",\\n \\"FileName\\": \\"translated_a_file.pptx\\",\\n \\"ExpireTime\\": 1774147442\\n }\\n}","type":"json"}]',
+ 'title' => '获取翻译任务的原始文件',
+ 'changeSet' => [],
+ ],
+ 'GetTranslatedFileUrl' => [
+ 'summary' => '获取翻译任务的译文文件下载URL。',
+ 'methods' => ['post'],
+ 'schemes' => ['https'],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'operationType' => 'read',
+ 'deprecated' => false,
+ 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'],
+ 'parameters' => [
+ [
+ 'name' => 'TaskId',
+ 'in' => 'formData',
+ 'schema' => ['description' => '任务ID。'."\n"
+ .'- SubmitTranslationTask任务提交后会返回TaskId。', 'type' => 'string', 'required' => true, 'example' => 'f9c35b0453b'],
+ ],
+ [
+ 'name' => 'APIKey',
+ 'in' => 'query',
+ 'schema' => ['title' => 'API密钥,标识成员账号身份,可通过睿译宝工作台获取', 'description' => 'API密钥,标识成员账号身份,可通过睿译宝工作台获取', 'type' => 'string', 'required' => false, 'example' => 'sk-1***s'],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'PlainResult<FileDownloadUrlDTO>',
+ 'description' => '\\-',
+ 'type' => 'object',
+ 'properties' => [
+ 'Success' => ['title' => '是否成功', 'description' => '是否成功。', 'type' => 'boolean', 'example' => 'True'],
+ 'Code' => ['title' => '返回码', 'description' => '返回码。', 'type' => 'string', 'example' => 'success'],
+ 'Message' => ['title' => '返回消息', 'description' => '返回消息。', 'type' => 'string', 'example' => 'success'],
+ 'RequestId' => ['title' => '请求ID', 'description' => '请求ID。', 'type' => 'string', 'example' => '18D108E8-9625-5A26-BF0C-23EA0A2646B3'],
+ 'Data' => [
+ 'title' => '业务数据',
+ 'description' => '业务数据。',
+ 'type' => 'object',
+ 'properties' => [
+ 'DownloadUrl' => ['description' => '文件下载URL。', 'type' => 'string', 'example' => 'https://gtm-translate-service-prod.oss-cn-zhangjiakou.aliyuncs.com/translations/replaced/a_file_992736840.pptx?Expires=1782738716&OSSAccessKeyId=STS.NZm6TgFWU2sgpBxs2UD154B9w&Signature=uPORIIsYjiwRFzoyNUN8Htnwdfc%3D&security-token=CAIS3gJ1q6Ft5B2yfSjIr5nYfe7Tq4h0hbGMcmTJlzIASL4Z24eSlTz2IHhMf3FtAuwft%2FU0mWFW7foSlrp6SJtIXleCZtF94oxN9h2gb4fb4woBanWd08%2FLI3OaLjKm9u2wCryLYbGwU%2FOpbE%2B%2B5U0X6LDmdDKkckW4OJmS8%2FBOZcgWWQ%2FKBlgvRq0hRG1YpdQdKGHaONu0LxfumRCwNkdzvRdmgm4NgsbWgO%2Fks0OC1ACnmrdM%2FdupesL0MPMBZskvD42Hu8VtbbfE3SJq7BxHybx7lqQs%2B02c5onGWwQKv0zfYrGJo4M0cF9jLqcmHutYtvH6jvlxpuGWjInt1RdGMKRHXj7YAZy63dDYCHRtm2ect12R0R3spTPvXvGd22tMCfkrqw7Ahz2PACvRGM5dh0AbW042tZHwaHNHYcJrPu9YH1QLobvGc7TkCSYBIdG7lRJ8EPtayyu0U3F2gASJGhqAATkIHCzHZWyr%2F8WJFcinsIxuI8iYoH3pOTZ2HJgDW38Zbu0NqMZmH%2BbRahVPiN7s4ckYmF50hCbgXt%2BdD9R6jB%2BkNufrVtN%2FAVgRMLOeEn2FZF0CCLlyjaIqq8QIxaPpDSLxpV6wZSh5enenoKm%2B1wunWRdd0gwG03k%2F4RCcDbb%2FIAA%3D'],
+ 'FileName' => ['description' => '文件的名称。', 'type' => 'string', 'example' => 'translated_a_file.pptx'],
+ 'ExpireTime' => ['description' => '过期时间(单位:毫秒)。', 'type' => 'integer', 'format' => 'int64', 'example' => '1774147442'],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Success\\": true,\\n \\"Code\\": \\"success\\",\\n \\"Message\\": \\"success\\",\\n \\"RequestId\\": \\"18D108E8-9625-5A26-BF0C-23EA0A2646B3\\",\\n \\"Data\\": {\\n \\"DownloadUrl\\": \\"https://gtm-translate-service-prod.oss-cn-zhangjiakou.aliyuncs.com/translations/replaced/a_file_992736840.pptx?Expires=1782738716&OSSAccessKeyId=STS.NZm6TgFWU2sgpBxs2UD154B9w&Signature=uPORIIsYjiwRFzoyNUN8Htnwdfc%3D&security-token=CAIS3gJ1q6Ft5B2yfSjIr5nYfe7Tq4h0hbGMcmTJlzIASL4Z24eSlTz2IHhMf3FtAuwft%2FU0mWFW7foSlrp6SJtIXleCZtF94oxN9h2gb4fb4woBanWd08%2FLI3OaLjKm9u2wCryLYbGwU%2FOpbE%2B%2B5U0X6LDmdDKkckW4OJmS8%2FBOZcgWWQ%2FKBlgvRq0hRG1YpdQdKGHaONu0LxfumRCwNkdzvRdmgm4NgsbWgO%2Fks0OC1ACnmrdM%2FdupesL0MPMBZskvD42Hu8VtbbfE3SJq7BxHybx7lqQs%2B02c5onGWwQKv0zfYrGJo4M0cF9jLqcmHutYtvH6jvlxpuGWjInt1RdGMKRHXj7YAZy63dDYCHRtm2ect12R0R3spTPvXvGd22tMCfkrqw7Ahz2PACvRGM5dh0AbW042tZHwaHNHYcJrPu9YH1QLobvGc7TkCSYBIdG7lRJ8EPtayyu0U3F2gASJGhqAATkIHCzHZWyr%2F8WJFcinsIxuI8iYoH3pOTZ2HJgDW38Zbu0NqMZmH%2BbRahVPiN7s4ckYmF50hCbgXt%2BdD9R6jB%2BkNufrVtN%2FAVgRMLOeEn2FZF0CCLlyjaIqq8QIxaPpDSLxpV6wZSh5enenoKm%2B1wunWRdd0gwG03k%2F4RCcDbb%2FIAA%3D\\",\\n \\"FileName\\": \\"translated_a_file.pptx\\",\\n \\"ExpireTime\\": 1774147442\\n }\\n}","type":"json"}]',
+ 'title' => '获取翻译任务的译文文件',
+ 'changeSet' => [],
+ ],
+ 'GetTranslationTask' => [
+ 'summary' => '获取翻译任务详情。',
+ 'methods' => ['post'],
+ 'schemes' => ['https'],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'operationType' => 'read',
+ 'deprecated' => false,
+ 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'],
+ 'parameters' => [
+ [
+ 'name' => 'TaskId',
+ 'in' => 'formData',
+ 'schema' => ['description' => '翻译任务 ID,由UploadTranslationFile获取的TaskId。', 'type' => 'string', 'required' => true, 'example' => 'f9c35b0453b'],
+ ],
+ [
+ 'name' => 'APIKey',
+ 'in' => 'query',
+ 'schema' => ['title' => 'API密钥,标识成员账号身份,可通过睿译宝工作台获取', 'description' => 'API密钥,标识成员账号身份,可通过睿译宝工作台获取', 'type' => 'string', 'required' => false, 'example' => '***'],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'PlainResult<TranslationTaskDetailDTO>',
+ 'description' => '\\-',
+ 'type' => 'object',
+ 'properties' => [
+ 'Success' => ['title' => '是否成功', 'description' => '是否成功。', 'type' => 'boolean', 'example' => 'True'],
+ 'Code' => ['title' => '返回码', 'description' => '返回码。', 'type' => 'string', 'example' => 'success'],
+ 'Message' => ['title' => '返回消息', 'description' => '返回消息', 'type' => 'string', 'example' => 'successful'],
+ 'RequestId' => ['title' => '请求ID', 'description' => '请求ID', 'type' => 'string', 'example' => 'EDD51FD8-93E0-5161-BCA6-38A8393F26D9'],
+ 'Data' => [
+ 'title' => '业务数据',
+ 'description' => '业务数据。',
+ 'type' => 'object',
+ 'properties' => [
+ 'TaskId' => ['description' => '翻译任务ID。', 'type' => 'string', 'example' => 'f9c35b0453b'],
+ 'BaseTaskId' => ['description' => '重新提交翻译任务时传入,是已经提交过翻译任务的翻译任务ID。', 'type' => 'string', 'example' => 'f9c35b0453b'],
+ 'OriginalFileName' => ['description' => '源文件地址。', 'type' => 'string', 'example' => 'translated_a_file.pptx'],
+ 'Status' => [
+ 'description' => '任务状态。',
+ 'type' => 'string',
+ 'enumValueTitles' => ['CANCELLED' => '已取消', 'COMPLETED' => '已完成', 'FAILED' => '失败', 'PROCESSING' => '处理中', 'PENDING' => '待处理', 'ANALYZED' => '已分析'],
+ 'example' => 'PROCESSING',
+ ],
+ 'Progress' => ['description' => '进度,百分比数字。', 'type' => 'integer', 'format' => 'int32', 'example' => '90'],
+ 'Config' => [
+ 'description' => '翻译配置。',
+ 'type' => 'object',
+ 'properties' => [
+ 'SourceLanguage' => ['description' => '源文件语种。', 'type' => 'string', 'example' => 'zh'],
+ 'TargetLanguage' => ['description' => '目标语种。', 'type' => 'string', 'example' => 'en'],
+ 'Style' => ['description' => '翻译风格,仅当翻译文件是PPT时生效。'."\n"
+ .'- normal(常规-原文信息完整保留)。'."\n"
+ .'- minimal(信息更凝练,布局更美观)。', 'type' => 'string', 'example' => 'minimal'],
+ 'SecurityLevel' => ['description' => '保密级别。'."\n"
+ .'- public(普通保密)。', 'type' => 'string', 'example' => 'public'],
+ 'Template' => ['description' => '翻译模板。'."\n"
+ .'- common(通用)。', 'type' => 'string', 'example' => 'common'],
+ ],
+ ],
+ 'WordCount' => ['description' => '本次上传文档的字数统计。', 'type' => 'integer', 'format' => 'int64', 'example' => '1600'],
+ 'PageCount' => ['description' => '本次上传文件的页数统计。', 'type' => 'integer', 'format' => 'int64', 'example' => '0'],
+ 'FileFormat' => ['description' => '解析的文件格式。', 'type' => 'string', 'example' => 'PPTX'],
+ 'FileName' => ['description' => '文件名称。', 'type' => 'string', 'example' => 'translated_a_file.pptx'],
+ 'TaskType' => [
+ 'description' => '任务类型。'."\n"
+ ."\n"
+ .'- DOCUMENT 文档类型。',
+ 'type' => 'string',
+ 'enumValueTitles' => ['DOCUMENT' => '文档类型'],
+ 'example' => 'DOCUMENT',
+ ],
+ 'EstimatedCostCredits' => ['description' => '预测需要消耗的credits。', 'type' => 'number', 'format' => 'double', 'example' => '2.5510'],
+ 'EstimatedTime' => ['description' => '预估需要花费的翻译时间,单位**秒**。', 'type' => 'integer', 'format' => 'int64', 'example' => '40000'],
+ 'CostCredits' => ['description' => '本次任务消耗的credits。', 'type' => 'number', 'format' => 'double', 'example' => '2.5510'],
+ 'CostTime' => ['description' => '耗时,毫秒。', 'type' => 'integer', 'format' => 'int64', 'example' => '43'],
+ 'FinishedAt' => ['description' => '任务完成时间,13 位时间戳。', 'type' => 'string', 'example' => '1774147442'],
+ 'ErrorMessage' => ['description' => '任务失败时的错误信息。', 'type' => 'string', 'example' => 'error'],
+ 'Fonts' => [
+ 'description' => '返回支持修改字体的语言和对应的字体列表,Map的Key标识语言种类。当前支持的字体有:英语、法语、印尼语、日语。',
+ 'type' => 'object',
+ 'additionalProperties' => [
+ 'type' => 'array',
+ 'items' => ['type' => 'string', 'example' => '{'."\n"
+ .' "default": ['."\n"
+ .' "Arial",'."\n"
+ .' "Calibri",'."\n"
+ .' "Times New Roman"'."\n"
+ .' ],'."\n"
+ .' "ja": ['."\n"
+ .' "MS Mincho",'."\n"
+ .' "Yu Mincho",'."\n"
+ .' "Meiryo"'."\n"
+ .' ],'."\n"
+ .' "en": ['."\n"
+ .' "Times New Roman",'."\n"
+ .' "Calibri",'."\n"
+ .' "Arial"'."\n"
+ .' ],'."\n"
+ .' "id": ['."\n"
+ .' "Arial",'."\n"
+ .' "Calibri",'."\n"
+ .' "Times New Roman"'."\n"
+ .' ],'."\n"
+ .' "fr": ['."\n"
+ .' "Calibri",'."\n"
+ .' "Arial",'."\n"
+ .' "Marianne"'."\n"
+ .' ]'."\n"
+ .'}', 'description' => '字体名称。'],
+ 'description' => '语言种类对应支持的字体列表。',
+ ],
+ ],
+ 'WorkSpaceId' => ['description' => '所属空间ID。', 'type' => 'string', 'example' => 'c2b898f******c985c'],
+ 'OrgId' => ['description' => '所属组织ID。', 'type' => 'string', 'example' => 'org_e5b74*****9c94209'],
+ 'ExtractedTerms' => [
+ 'description' => '本次任务使用的术语。',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '\\-',
+ 'type' => 'object',
+ 'properties' => [
+ 'SourceTerm' => ['description' => '原文。', 'type' => 'string', 'example' => '小狗'],
+ 'TargetTerm' => ['description' => '译文。', 'type' => 'string', 'example' => 'dog'],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Success\\": true,\\n \\"Code\\": \\"success\\",\\n \\"Message\\": \\"successful\\",\\n \\"RequestId\\": \\"EDD51FD8-93E0-5161-BCA6-38A8393F26D9\\",\\n \\"Data\\": {\\n \\"TaskId\\": \\"f9c35b0453b\\",\\n \\"BaseTaskId\\": \\"f9c35b0453b\\",\\n \\"OriginalFileName\\": \\"translated_a_file.pptx\\",\\n \\"Status\\": \\"PROCESSING\\",\\n \\"Progress\\": 90,\\n \\"Config\\": {\\n \\"SourceLanguage\\": \\"zh\\",\\n \\"TargetLanguage\\": \\"en\\",\\n \\"Style\\": \\"minimal\\",\\n \\"SecurityLevel\\": \\"public\\",\\n \\"Template\\": \\"common\\"\\n },\\n \\"WordCount\\": 1600,\\n \\"PageCount\\": 0,\\n \\"FileFormat\\": \\"PPTX\\",\\n \\"FileName\\": \\"translated_a_file.pptx\\",\\n \\"TaskType\\": \\"DOCUMENT\\",\\n \\"EstimatedCostCredits\\": 2.551,\\n \\"EstimatedTime\\": 40000,\\n \\"CostCredits\\": 2.551,\\n \\"CostTime\\": 43,\\n \\"FinishedAt\\": \\"1774147442\\",\\n \\"ErrorMessage\\": \\"error\\",\\n \\"Fonts\\": {\\n \\"key\\": [\\n \\"{\\\\n \\\\\\"default\\\\\\": [\\\\n \\\\\\"Arial\\\\\\",\\\\n \\\\\\"Calibri\\\\\\",\\\\n \\\\\\"Times New Roman\\\\\\"\\\\n ],\\\\n \\\\\\"ja\\\\\\": [\\\\n \\\\\\"MS Mincho\\\\\\",\\\\n \\\\\\"Yu Mincho\\\\\\",\\\\n \\\\\\"Meiryo\\\\\\"\\\\n ],\\\\n \\\\\\"en\\\\\\": [\\\\n \\\\\\"Times New Roman\\\\\\",\\\\n \\\\\\"Calibri\\\\\\",\\\\n \\\\\\"Arial\\\\\\"\\\\n ],\\\\n \\\\\\"id\\\\\\": [\\\\n \\\\\\"Arial\\\\\\",\\\\n \\\\\\"Calibri\\\\\\",\\\\n \\\\\\"Times New Roman\\\\\\"\\\\n ],\\\\n \\\\\\"fr\\\\\\": [\\\\n \\\\\\"Calibri\\\\\\",\\\\n \\\\\\"Arial\\\\\\",\\\\n \\\\\\"Marianne\\\\\\"\\\\n ]\\\\n}\\"\\n ]\\n },\\n \\"WorkSpaceId\\": \\"c2b898f******c985c\\",\\n \\"OrgId\\": \\"org_e5b74*****9c94209\\",\\n \\"ExtractedTerms\\": [\\n {\\n \\"SourceTerm\\": \\"小狗\\",\\n \\"TargetTerm\\": \\"dog\\"\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => '获取翻译任务详情',
+ 'changeSet' => [],
+ ],
+ 'ListTranslationTasks' => [
+ 'summary' => '分页查询翻译任务。',
+ 'methods' => ['post'],
+ 'schemes' => ['https'],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'operationType' => 'read',
+ 'deprecated' => false,
+ 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'],
+ 'parameters' => [
+ [
+ 'name' => 'MaxResults',
+ 'in' => 'query',
+ 'schema' => ['description' => '使用NextToken方式查询时,每次最多返回的结果数。'."\n"
+ ."\n"
+ .'取值范围:1~100。'."\n"
+ ."\n"
+ .'默认值:10。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'maximum' => '100', 'minimum' => '0', 'exclusiveMinimum' => true, 'example' => '10', 'default' => '10'],
+ ],
+ [
+ 'name' => 'NextToken',
+ 'in' => 'query',
+ 'schema' => ['description' => '分页令牌。', 'type' => 'string', 'required' => false, 'example' => 'AAAAAV3MpHK1AP0pfERHZN5pu6lkCoZlXVoygoU1omMcKBVc'],
+ ],
+ [
+ 'name' => 'TaskId',
+ 'in' => 'query',
+ 'schema' => ['description' => '翻译任务 ID,由UploadTranslationFile获取的TaskId。', 'type' => 'string', 'required' => false, 'example' => 'f9c35b0453b'],
+ ],
+ [
+ 'name' => 'OriginalFileName',
+ 'in' => 'query',
+ 'schema' => ['description' => '源文件名称。', 'type' => 'string', 'required' => false, 'example' => 'translated_a_file.pptx'],
+ ],
+ [
+ 'name' => 'SourceLanguage',
+ 'in' => 'query',
+ 'schema' => ['description' => '源文件语种。', 'type' => 'string', 'required' => false, 'example' => 'zh'],
+ ],
+ [
+ 'name' => 'TargetLanguage',
+ 'in' => 'query',
+ 'schema' => ['description' => '目标语种。', 'type' => 'string', 'required' => false, 'example' => 'en'],
+ ],
+ [
+ 'name' => 'Status',
+ 'in' => 'query',
+ 'schema' => ['description' => '任务状态。'."\n"
+ .'- CANCELLED(已取消)。'."\n"
+ .'- COMPLETED(已完成)。'."\n"
+ .'- FAILED(失败)。'."\n"
+ .'- PROCESSING(处理中)。'."\n"
+ .'- PENDING(待处理)。'."\n"
+ .'- ANALYZED(已分析)。', 'type' => 'string', 'required' => false, 'example' => 'PROCESSING'],
+ ],
+ [
+ 'name' => 'StartTime',
+ 'in' => 'query',
+ 'schema' => ['description' => '任务开始时间。'."\n"
+ .'- 格式:YYYY-MM-dd HH:mm:ss。', 'type' => 'string', 'required' => false, 'example' => '2026-06-26 00:00:00'],
+ ],
+ [
+ 'name' => 'EndTime',
+ 'in' => 'query',
+ 'schema' => ['description' => '任务结束时间。'."\n"
+ .'- 格式:YYYY-MM-dd HH:mm:ss。', 'type' => 'string', 'required' => false, 'example' => '2026-06-27 00:00:00'],
+ ],
+ [
+ 'name' => 'APIKey',
+ 'in' => 'query',
+ 'schema' => ['title' => 'API密钥,标识成员账号身份,可通过睿译宝工作台获取', 'description' => 'API密钥,标识成员账号身份,可通过睿译宝工作台获取。', 'type' => 'string', 'required' => false, 'example' => 'sk-1***s'],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'PlainResult<PageResult<TranslationTaskItemDTO>>',
+ 'description' => '\\-',
+ 'type' => 'object',
+ 'properties' => [
+ 'Success' => ['title' => '是否成功', 'description' => '是否成功。', 'type' => 'boolean', 'example' => 'True'],
+ 'Code' => ['title' => '返回码', 'description' => '返回码。', 'type' => 'string', 'example' => 'success'],
+ 'Message' => ['title' => '返回消息', 'description' => '返回消息。', 'type' => 'string', 'example' => 'success'],
+ 'RequestId' => ['title' => '请求ID', 'description' => '请求ID。', 'type' => 'string', 'example' => '50ABF118-2F9D-51DF-B1FB-1E389817DC47'],
+ 'Data' => [
+ 'title' => '业务数据',
+ 'description' => '业务数据。',
+ 'type' => 'object',
+ 'properties' => [
+ 'List' => [
+ 'title' => '数据列表',
+ 'description' => '数据列表',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '任务简略信息。',
+ 'type' => 'object',
+ 'properties' => [
+ 'TaskId' => ['description' => '翻译任务 ID。', 'type' => 'string', 'example' => 'f9c35b0453b'],
+ 'OriginalFileName' => ['description' => '源文件地址。', 'type' => 'string', 'example' => 'translated_a_file.pptx'],
+ 'Template' => ['description' => '翻译模板。'."\n"
+ .'- common(通用)。', 'type' => 'string', 'example' => 'common'],
+ 'SourceLanguage' => ['description' => '源文件语种', 'type' => 'string', 'example' => 'zh'],
+ 'TargetLanguage' => ['description' => '目标语种', 'type' => 'string', 'example' => 'en'],
+ 'Creator' => ['description' => '创建人ID。', 'type' => 'string', 'example' => 'acc_93****c936'],
+ 'CreatorName' => ['description' => '创建者名称。', 'type' => 'string', 'example' => 'tes_account@test.com'],
+ 'StartTime' => ['description' => '任务开始时间,13位时间戳。', 'type' => 'string', 'example' => '1782459562000'],
+ 'GmtCreate' => ['description' => '任务创建时间,13位时间戳。', 'type' => 'string', 'example' => '1782459562000'],
+ 'CompleteTime' => ['description' => '任务完成时间,13 位时间戳。', 'type' => 'string', 'example' => '1782459562000'],
+ 'CostTime' => ['description' => '耗时,毫秒。', 'type' => 'integer', 'format' => 'int64', 'example' => '196'],
+ 'Status' => ['description' => '任务状态'."\n"
+ .'- CANCELLED(已取消)。'."\n"
+ .'- COMPLETED(已完成)。'."\n"
+ .'- FAILED(失败)。'."\n"
+ .'- PROCESSING(处理中)。'."\n"
+ .'- PENDING(待处理)。'."\n"
+ .'- ANALYZED(已分析)。', 'type' => 'string', 'example' => 'CANCELLED'],
+ 'Progress' => ['description' => '任务进度。', 'type' => 'integer', 'format' => 'int32', 'example' => '61'],
+ 'ErrorMessage' => ['description' => '任务失败的错误提示。', 'type' => 'string', 'example' => 'device offline'],
+ 'WorkSpaceId' => ['description' => '工作空间id', 'type' => 'string', 'example' => '6458351*****0cc5'],
+ 'OrgId' => ['description' => '组织 ID。', 'type' => 'string', 'example' => 'org_c6******cdc2ce7'],
+ 'CostCredits' => ['description' => '本次任务消耗的 credits。', 'type' => 'number', 'format' => 'double', 'example' => '81.2992'],
+ 'WordCount' => ['description' => '本次上传文件的字数统计。', 'type' => 'integer', 'format' => 'int64', 'example' => '1600'],
+ 'PageCount' => ['description' => '本次上传文件的页数统计。', 'type' => 'integer', 'format' => 'int64', 'example' => '21'],
+ 'FileFormat' => ['description' => '解析的文件格式。', 'type' => 'string', 'example' => 'PPTX'],
+ 'FileName' => ['description' => '文件名称。', 'type' => 'string', 'example' => 'translated_a_file.pptx'],
+ 'TaskType' => ['description' => '任务类型。'."\n"
+ ."\n"
+ .'- DOCUMENT 文档类型。', 'type' => 'string', 'example' => 'DOCUMENT'],
+ ],
+ ],
+ ],
+ 'Total' => ['title' => '总条数', 'description' => '总条数', 'type' => 'integer', 'format' => 'int64', 'example' => '5'],
+ 'MaxResults' => ['description' => '使用NextToken方式查询时,每次最多返回的结果数。', 'type' => 'integer', 'format' => 'int32', 'example' => '20'],
+ 'NextToken' => ['description' => '是否拥有下一次查询的令牌(Token)。取值:'."\n"
+ .'- 如果**NextToken**为空表示没有下一次查询。'."\n"
+ .'- 如果**NextToken**有返回值,该取值表示下一次查询开始的令牌。', 'type' => 'string', 'example' => 'AAAAAVpfrV4aVmra0dxbtRB74lmSGzegoejeIqxIET/WdX50'],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Success\\": true,\\n \\"Code\\": \\"success\\",\\n \\"Message\\": \\"success\\",\\n \\"RequestId\\": \\"50ABF118-2F9D-51DF-B1FB-1E389817DC47\\",\\n \\"Data\\": {\\n \\"List\\": [\\n {\\n \\"TaskId\\": \\"f9c35b0453b\\",\\n \\"OriginalFileName\\": \\"translated_a_file.pptx\\",\\n \\"Template\\": \\"common\\",\\n \\"SourceLanguage\\": \\"zh\\",\\n \\"TargetLanguage\\": \\"en\\",\\n \\"Creator\\": \\"acc_93****c936\\",\\n \\"CreatorName\\": \\"tes_account@test.com\\",\\n \\"StartTime\\": \\"1782459562000\\",\\n \\"GmtCreate\\": \\"1782459562000\\",\\n \\"CompleteTime\\": \\"1782459562000\\",\\n \\"CostTime\\": 196,\\n \\"Status\\": \\"CANCELLED\\",\\n \\"Progress\\": 61,\\n \\"ErrorMessage\\": \\"device offline\\",\\n \\"WorkSpaceId\\": \\"6458351*****0cc5\\",\\n \\"OrgId\\": \\"org_c6******cdc2ce7\\",\\n \\"CostCredits\\": 81.2992,\\n \\"WordCount\\": 1600,\\n \\"PageCount\\": 21,\\n \\"FileFormat\\": \\"PPTX\\",\\n \\"FileName\\": \\"translated_a_file.pptx\\",\\n \\"TaskType\\": \\"DOCUMENT\\"\\n }\\n ],\\n \\"Total\\": 5,\\n \\"MaxResults\\": 20,\\n \\"NextToken\\": \\"AAAAAVpfrV4aVmra0dxbtRB74lmSGzegoejeIqxIET/WdX50\\"\\n }\\n}","type":"json"}]',
+ 'title' => '分页查询翻译任务',
+ 'changeSet' => [],
+ 'ramActions' => [],
+ ],
+ 'SubmitTranslationTask' => [
+ 'summary' => '本接口用于提交翻译任务。您可通过传入 TaskId 提交新翻译任务,或通过传入 BaseTaskId 对历史任务重新发起翻译。提交成功后将返回翻译任务 ID 及当前任务状态,您可通过任务 ID 调用后续接口查询翻译进度及结果。',
+ 'methods' => ['post'],
+ 'schemes' => ['https'],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'operationType' => 'write',
+ 'deprecated' => false,
+ 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'],
+ 'parameters' => [
+ [
+ 'name' => 'TaskId',
+ 'in' => 'formData',
+ 'schema' => ['description' => '翻译任务 ID'."\n"
+ .'- 由UploadTranslationFile获取的TaskId'."\n"
+ .'- 与BaseTaskId二者选其一', 'type' => 'string', 'required' => false, 'example' => 'f9c35b0453b'],
+ ],
+ [
+ 'name' => 'BaseTaskId',
+ 'in' => 'formData',
+ 'schema' => ['description' => '重新提交翻译任务时传入,是已经提交过翻译任务的翻译任务ID。'."\n"
+ .'- 与TaskId二者选其一', 'type' => 'string', 'required' => false, 'example' => 'f9c35b0453b'],
+ ],
+ [
+ 'name' => 'Config',
+ 'in' => 'formData',
+ 'style' => 'json',
+ 'schema' => [
+ 'description' => '翻译配置',
+ 'type' => 'object',
+ 'properties' => [
+ 'SourceLanguage' => ['description' => '源文件语种', 'type' => 'string', 'required' => true, 'example' => 'zh'],
+ 'TargetLanguage' => ['description' => '目标语种', 'type' => 'string', 'required' => true, 'example' => 'en'],
+ 'Style' => [
+ 'description' => '翻译风格,仅当翻译文件是PPT时生效。',
+ 'type' => 'string',
+ 'required' => false,
+ 'enumValueTitles' => ['normal' => '常规-原文信息完整保留', 'minimal' => '信息更凝练,布局更美观'],
+ 'example' => 'minimal',
+ ],
+ 'Font' => ['description' => '字体'."\n"
+ .'- 新任务通过UploadTranslationFile获取'."\n"
+ .'- 历史任务重新翻译可以通过GerTranslationTask获取', 'type' => 'string', 'required' => false, 'example' => 'Arial'],
+ ],
+ 'required' => true,
+ 'example' => '{'."\n"
+ .' "SourceLanguage": "zh",'."\n"
+ .' "TargetLanguage": "en",'."\n"
+ .' "Style": "minimal",'."\n"
+ .' "Font": "Arial"'."\n"
+ .' }',
+ ],
+ ],
+ [
+ 'name' => 'APIKey',
+ 'in' => 'query',
+ 'schema' => ['title' => 'API密钥,标识成员账号身份,可通过睿译宝工作台获取', 'description' => 'API密钥,标识成员账号身份,可通过睿译宝工作台获取', 'type' => 'string', 'required' => false, 'example' => '***'],
+ ],
+ [
+ 'name' => 'CustomTerms',
+ 'in' => 'query',
+ 'style' => 'json',
+ 'schema' => [
+ 'description' => '自定义术语。'."\n"
+ .'><notice>自定义术语仅供参考,实际翻译结果可能存在差异,请以最终输出为准。</notice>',
+ 'type' => 'array',
+ 'items' => [
+ 'description' => '\\-',
+ 'type' => 'object',
+ 'properties' => [
+ 'SourceTerm' => ['description' => '原文。', 'type' => 'string', 'required' => false, 'example' => '狗'],
+ 'TargetTerm' => ['description' => '译文。', 'type' => 'string', 'required' => false, 'example' => 'dog'],
+ ],
+ 'required' => false,
+ ],
+ 'required' => false,
+ 'example' => '[{"SourceTerm":"狗", "TargetTerm":"dog"}]',
+ ],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'PlainResult<TranslationSubmitResultDTO>',
+ 'description' => '\\-',
+ 'type' => 'object',
+ 'properties' => [
+ 'Success' => ['title' => '是否成功', 'description' => '是否成功。', 'type' => 'boolean', 'example' => 'True'],
+ 'Code' => ['title' => '返回码', 'description' => '返回码。', 'type' => 'string', 'example' => 'success'],
+ 'Message' => ['title' => '返回消息', 'description' => '返回消息。', 'type' => 'string', 'example' => 'success'],
+ 'RequestId' => ['title' => '请求ID', 'description' => '请求ID。', 'type' => 'string', 'example' => 'F6E6D23C-D6FC-5AD4-B90B-1E32850393AB'],
+ 'Data' => [
+ 'title' => '业务数据',
+ 'description' => '业务数据。',
+ 'type' => 'object',
+ 'properties' => [
+ 'TaskId' => ['description' => '翻译任务ID。', 'type' => 'string', 'example' => 'f9c35b0453b'],
+ 'Status' => [
+ 'description' => '任务状态。',
+ 'type' => 'string',
+ 'enumValueTitles' => ['CANCELLED' => '已取消', 'COMPLETED' => '已完成', 'FAILED' => '失败', 'PROCESSING' => '处理中', 'PENDING' => '待处理', 'ANALYZED' => '已分析'],
+ 'example' => 'COMPLETED',
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Success\\": true,\\n \\"Code\\": \\"success\\",\\n \\"Message\\": \\"success\\",\\n \\"RequestId\\": \\"F6E6D23C-D6FC-5AD4-B90B-1E32850393AB\\",\\n \\"Data\\": {\\n \\"TaskId\\": \\"f9c35b0453b\\",\\n \\"Status\\": \\"COMPLETED\\"\\n }\\n}","type":"json"}]',
+ 'title' => '提交翻译任务',
+ 'description' => '**计费说明**'."\n"
+ ."\n"
+ .'本接口涉及 Credits 消耗,提交翻译任务前请确保账户内 Credits 余额充足。您可在调用 `UploadTranslationFile` 后通过返回结果中的 `CreditsAvailable` 字段确认当前余额是否满足本次翻译任务所需,具体计费明细可参考 `CreditBreakdown` 字段。'."\n"
+ ."\n"
+ .'**任务提交说明**'."\n"
+ ."\n"
+ .'- 提交新翻译任务时,请传入由 `UploadTranslationFile` 接口返回的 `TaskId`。'."\n"
+ .'- 对历史任务重新发起翻译时,请传入已提交过翻译任务的任务 ID,即 `BaseTaskId`。'."\n"
+ .'- `TaskId` 与 `BaseTaskId` 二者必须选其一传入,不可同时传入。'."\n"
+ ."\n"
+ .'**注意事项**'."\n"
+ ."\n"
+ .'- `Style` 参数仅当翻译文件为 PPT 时生效,其他格式文件传入该参数将不产生效果。'."\n"
+ .'- 新任务的可用字体列表可通过 `UploadTranslationFile` 返回结果中的 `Fonts` 字段获取;历史任务重新翻译时,可通过 `GetTranslationTask` 接口获取可用字体列表。',
+ 'changeSet' => [],
+ 'ramActions' => [],
+ ],
+ 'UploadTranslationFile' => [
+ 'summary' => '本接口用于上传文档并解析文档相关信息,生成翻译任务。上传成功后将返回任务 ID 及文档解析结果,包含字数统计、页数统计、预估消耗 Credits、预估翻译时间、检测语言类型及字体列表等信息。同时,系统将对上传的文档进行敏感信息检测,您可根据检测结果决定是否继续提交翻译任务。',
+ 'methods' => ['post'],
+ 'schemes' => ['https'],
+ 'security' => [
+ [
+ 'AK' => [],
+ ],
+ ],
+ 'operationType' => 'readAndWrite',
+ 'deprecated' => false,
+ 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'],
+ 'parameters' => [
+ [
+ 'name' => 'APIKey',
+ 'in' => 'query',
+ 'schema' => ['title' => 'API密钥,标识成员账号身份,可通过睿译宝工作台获取', 'description' => 'API密钥,标识成员账号身份,可通过睿译宝工作台获取。', 'type' => 'string', 'required' => false, 'example' => 'sk-2***s'],
+ ],
+ [
+ 'name' => 'File',
+ 'in' => 'query',
+ 'schema' => ['description' => '文件,SDK支持直接上传和临时授权上传。'."\n"
+ .'- **直接上传**:使用SDK中的UploadTranslationFileAdvance实现直接上传。Java字段类型是InputStream,Python是BinaryIO。'."\n"
+ .'- **临时授权上传**:使用SDK中的AuthorizeFileUpload和UploadTranslationFile实现临时授权上传。'."\n"
+ .' - 第一步,需要用户先调用AuthorizeFileUpload获取oss临时上传凭证,然后自行上传获取完整的文件URL。'."\n"
+ .' - 第二步,用户调用UploadTranslationFile,将URL传入File字段。'."\n"
+ ."\n"
+ .'> 临时授权上传提醒'."\n"
+ .'> - 您需要额外引入OpenPlatform(2019-12-19) - AuthorizeFileUpload 以获取临时OssPolicy。上传文件的方式,请您参考[客户端直传OSS方案](https://help.aliyun.com/zh/oss/user-guide/uploading-objects-to-oss-directly-from-clients/?spm=a2c4g.11186623.6.1732.1eb1733frjHbM7)。'."\n"
+ ."\n"
+ .'> 文件大小说明'."\n"
+ .'> - 最大不超过500MB。', 'type' => 'string', 'required' => true, 'example' => 'http://gtm-pop-file-upload-zhangjiakou.oss-cn-zhangjiakou.aliyuncs.com/467a_208353582454045230_c8a22285d0b14873aefdcb7eaa7f9046', 'isFileTransferUrl' => true],
+ ],
+ [
+ 'name' => 'FileName',
+ 'in' => 'query',
+ 'schema' => ['description' => '上传文件的名称。'."\n"
+ ."\n"
+ .'<notice>请确保传入正确的文件名称(含后缀),否则会导致文件解析失败。></notice>', 'type' => 'string', 'required' => true, 'example' => 'testfile_202511.txt'],
+ ],
+ ],
+ 'responses' => [
+ 200 => [
+ 'schema' => [
+ 'title' => 'PlainResult<AnalyzeDocumentResultDTO>',
+ 'description' => '\\-',
+ 'type' => 'object',
+ 'properties' => [
+ 'Success' => ['title' => '是否成功', 'description' => '是否成功。', 'type' => 'boolean', 'example' => 'True'],
+ 'Code' => ['title' => '返回码', 'description' => '返回码。', 'type' => 'string', 'example' => 'success'],
+ 'Message' => ['title' => '返回消息', 'description' => '返回消息。', 'type' => 'string', 'example' => 'success'],
+ 'RequestId' => ['title' => '请求ID', 'description' => '请求ID。', 'type' => 'string', 'example' => 'F60AC23C-27A7-5376-9A68-0B6EF2D4F9E4'],
+ 'Data' => [
+ 'title' => '业务数据',
+ 'description' => '业务数据。',
+ 'type' => 'object',
+ 'properties' => [
+ 'TaskId' => ['description' => '翻译任务ID,用于后续的任务提交。', 'type' => 'string', 'example' => 'f9c35b0453b'],
+ 'WordCount' => ['description' => '本次上传文件的字数统计。', 'type' => 'integer', 'format' => 'int64', 'example' => '2000'],
+ 'PageCount' => ['description' => '本次上传文件的页数统计。', 'type' => 'integer', 'format' => 'int64', 'example' => '10'],
+ 'EstimatedCostCredits' => ['description' => '预测需要消耗的credits。', 'type' => 'number', 'format' => 'double', 'example' => '3.0021'],
+ 'EstimatedTime' => ['description' => '预估需要花费的翻译时间,单位**秒**。', 'type' => 'integer', 'format' => 'int64', 'example' => '60000'],
+ 'DetectedLang' => [
+ 'description' => '检测到的语言类型。',
+ 'type' => 'string',
+ 'enumValueTitles' => ['de' => '德文', 'ko' => '韩文', 'ja' => '日文', 'en' => '英文', 'fr' => '法文', 'zh' => '中文'],
+ 'example' => 'zh',
+ ],
+ 'CreditBreakdown' => ['description' => '任务预估credits计费、耗时的描述。', 'type' => 'string', 'example' => 'docx: 0.002 creadits/word × 1000 words (original 2 characters rounded up to nearest thousand) / 1000 = 0.002'."\n"
+ ."\n"],
+ 'CreditsAvailable' => ['description' => 'creadits是否足够本次翻译任务。'."\n"
+ .'- 预估可能受到各种因素影响有偏差,实际以提交任务接口为主。', 'type' => 'boolean', 'example' => 'True'],
+ 'Fonts' => [
+ 'description' => '返回支持修改字体的语言和对应的字体列表,Map的Key标识语言种类。'."\n"
+ .'- 当前支持的字体有:英语、法语、印尼语、日语。',
+ 'type' => 'object',
+ 'additionalProperties' => [
+ 'type' => 'array',
+ 'items' => ['type' => 'string', 'example' => '{'."\n"
+ .' "default": ['."\n"
+ .' "Arial",'."\n"
+ .' "Calibri",'."\n"
+ .' "Times New Roman"'."\n"
+ .' ],'."\n"
+ .' "ja": ['."\n"
+ .' "MS Mincho",'."\n"
+ .' "Yu Mincho",'."\n"
+ .' "Meiryo"'."\n"
+ .' ],'."\n"
+ .' "en": ['."\n"
+ .' "Times New Roman",'."\n"
+ .' "Calibri",'."\n"
+ .' "Arial"'."\n"
+ .' ],'."\n"
+ .' "id": ['."\n"
+ .' "Arial",'."\n"
+ .' "Calibri",'."\n"
+ .' "Times New Roman"'."\n"
+ .' ],'."\n"
+ .' "fr": ['."\n"
+ .' "Calibri",'."\n"
+ .' "Arial",'."\n"
+ .' "Marianne"'."\n"
+ .' ]'."\n"
+ .'}', 'description' => '字体名称。'],
+ 'description' => '语言种类对应支持的字体列表。',
+ ],
+ ],
+ 'SensitiveDetected' => ['description' => '是否探测到了敏感信息。', 'type' => 'boolean', 'example' => 'True'],
+ 'SensitiveTags' => [
+ 'description' => '命中敏感信息的关键词。',
+ 'type' => 'array',
+ 'items' => ['description' => '关键词。', 'type' => 'string', 'example' => '["Trade Secrets", "Account Credentials"]'."\n"
+ ."\n"],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Success\\": true,\\n \\"Code\\": \\"success\\",\\n \\"Message\\": \\"success\\",\\n \\"RequestId\\": \\"F60AC23C-27A7-5376-9A68-0B6EF2D4F9E4\\",\\n \\"Data\\": {\\n \\"TaskId\\": \\"f9c35b0453b\\",\\n \\"WordCount\\": 2000,\\n \\"PageCount\\": 10,\\n \\"EstimatedCostCredits\\": 3.0021,\\n \\"EstimatedTime\\": 60000,\\n \\"DetectedLang\\": \\"zh\\",\\n \\"CreditBreakdown\\": \\"docx: 0.002 creadits/word × 1000 words (original 2 characters rounded up to nearest thousand) / 1000 = 0.002\\\\n\\\\n\\",\\n \\"CreditsAvailable\\": true,\\n \\"Fonts\\": {\\n \\"key\\": [\\n \\"{\\\\n \\\\\\"default\\\\\\": [\\\\n \\\\\\"Arial\\\\\\",\\\\n \\\\\\"Calibri\\\\\\",\\\\n \\\\\\"Times New Roman\\\\\\"\\\\n ],\\\\n \\\\\\"ja\\\\\\": [\\\\n \\\\\\"MS Mincho\\\\\\",\\\\n \\\\\\"Yu Mincho\\\\\\",\\\\n \\\\\\"Meiryo\\\\\\"\\\\n ],\\\\n \\\\\\"en\\\\\\": [\\\\n \\\\\\"Times New Roman\\\\\\",\\\\n \\\\\\"Calibri\\\\\\",\\\\n \\\\\\"Arial\\\\\\"\\\\n ],\\\\n \\\\\\"id\\\\\\": [\\\\n \\\\\\"Arial\\\\\\",\\\\n \\\\\\"Calibri\\\\\\",\\\\n \\\\\\"Times New Roman\\\\\\"\\\\n ],\\\\n \\\\\\"fr\\\\\\": [\\\\n \\\\\\"Calibri\\\\\\",\\\\n \\\\\\"Arial\\\\\\",\\\\n \\\\\\"Marianne\\\\\\"\\\\n ]\\\\n}\\"\\n ]\\n },\\n \\"SensitiveDetected\\": true,\\n \\"SensitiveTags\\": [\\n \\"[\\\\\\"Trade Secrets\\\\\\", \\\\\\"Account Credentials\\\\\\"]\\\\n\\\\n\\"\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => '上传待翻译文件',
+ 'description' => '> - 本接口仅涉及文档上传与信息预估,**不产生任何费用**,Credits 消耗将在您**正式提交翻译**任务后开始计算。'."\n"
+ ."\n\n"
+ .'**语种检测**'."\n"
+ ."\n"
+ .'系统将自动检测上传文档的语言类型,当前支持中文。'."\n"
+ ."\n"
+ .'**敏感信息检测**'."\n"
+ ."\n"
+ .'系统将对上传的文档进行敏感信息检测。若检测到敏感信息,返回结果中 `SensitiveDetected` 字段值为 `true`,并通过 `SensitiveTags` 字段返回命中的关键词列表。'."\n"
+ .'> - 您可根据实际情况决定是否继续提交翻译任务。'."\n"
+ .'> - 若您提交任务时的翻译效果设置为极致模式,系统会自动将涉及敏感信息**部分的内容**调整为 auto 模式。'."\n"
+ ."\n\n"
+ .'**注意事项**'."\n"
+ ."\n"
+ .'- 请确保上传的文档格式受系统支持,否则可能导致解析失败。'."\n"
+ .'- 返回结果中的 `EstimatedCostCredits` 为预估消耗 Credits,实际消耗以正式提交翻译任务后的结算为准。'."\n"
+ .'- 返回结果中的 `EstimatedTime` 为预估翻译时长,单位为毫秒,实际翻译时长可能因文档复杂度存在差异。'."\n"
+ .'- 返回结果中的 `Fonts` 字段为支持修改字体的语言及对应字体列表,您可根据目标语言选择合适的字体。',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [],
+ ],
+ 'ramActions' => [],
+ ],
+ ],
+ 'endpoints' => [
+ ['regionId' => 'public', 'regionName' => '公网', 'areaId' => 'other', 'areaName' => '其它', 'public' => 'realtranslationagent.aliyuncs.com', 'endpoint' => 'realtranslationagent.aliyuncs.com', 'vpc' => ''],
+ ],
+ 'errorCodes' => [],
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [],
+ ],
+ 'ram' => [
+ 'productCode' => 'RealTranslationAgent',
+ 'productName' => '创新应用产品',
+ 'ramCodes' => ['realtranslationagent'],
+ 'ramLevel' => '操作级',
+ 'ramConditions' => [],
+ 'ramActions' => [
+ [
+ 'apiName' => 'SubmitTranslationTask',
+ 'description' => '提交翻译任务',
+ 'operationType' => 'none',
+ 'ramAction' => [
+ 'action' => 'realtranslationagent:SubmitTranslationTask',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'RealTranslationAgent', 'resourceType' => '全部资源', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'CancelTranslationTask',
+ 'description' => '取消翻译任务',
+ 'operationType' => 'none',
+ 'ramAction' => [
+ 'action' => 'realtranslationagent:CancelTranslationTask',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'RealTranslationAgent', 'resourceType' => '全部资源', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'GetTranslatedFileUrl',
+ 'description' => '获取翻译任务的译文文件',
+ 'operationType' => 'none',
+ 'ramAction' => [
+ 'action' => 'realtranslationagent:GetTranslatedFileUrl',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'RealTranslationAgent', 'resourceType' => '全部资源', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'UploadTranslationFile',
+ 'description' => '上传待翻译文件',
+ 'operationType' => 'none',
+ 'ramAction' => [
+ 'action' => 'realtranslationagent:UploadTranslationFile',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'RealTranslationAgent', 'resourceType' => '全部资源', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'ListTranslationTasks',
+ 'description' => '分页查询翻译任务',
+ 'operationType' => 'none',
+ 'ramAction' => [
+ 'action' => 'realtranslationagent:ListTranslationTasks',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'RealTranslationAgent', 'resourceType' => '全部资源', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'GetOriginalFileUrl',
+ 'description' => '获取翻译任务的原始文件',
+ 'operationType' => 'none',
+ 'ramAction' => [
+ 'action' => 'realtranslationagent:GetOriginalFileUrl',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'RealTranslationAgent', 'resourceType' => '全部资源', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'GetTranslationTask',
+ 'description' => '获取翻译任务详情',
+ 'operationType' => 'none',
+ 'ramAction' => [
+ 'action' => 'realtranslationagent:GetTranslationTask',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'RealTranslationAgent', 'resourceType' => '全部资源', 'arn' => '*'],
+ ],
+ ],
+ ],
+ ],
+ 'resourceTypes' => [],
+ ],
+];