From 1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634 Mon Sep 17 00:00:00 2001 From: Zhineng Li Date: Sun, 12 Jul 2026 17:11:17 +0800 Subject: update APIs 20260712 --- data/zh_cn/alimt/2018-10-12/api-docs.php | 6410 ++++++++++++------------------ 1 file changed, 2619 insertions(+), 3791 deletions(-) (limited to 'data/zh_cn/alimt/2018-10-12/api-docs.php') diff --git a/data/zh_cn/alimt/2018-10-12/api-docs.php b/data/zh_cn/alimt/2018-10-12/api-docs.php index c80da6e..75ae696 100644 --- a/data/zh_cn/alimt/2018-10-12/api-docs.php +++ b/data/zh_cn/alimt/2018-10-12/api-docs.php @@ -1,98 +1,60 @@ '1.0', - 'info' => [ - 'style' => 'RPC', - 'product' => 'alimt', - 'version' => '2018-10-12', - ], + 'info' => ['style' => 'RPC', 'product' => 'alimt', 'version' => '2018-10-12'], 'directories' => [ [ - 'id' => 87656, - 'title' => '文本翻译', + 'children' => ['TranslateGeneral', 'Translate', 'TranslateECommerce', 'GetBatchTranslate', 'CreateAsyncTranslate', 'GetAsyncTranslate', 'GetDetectLanguage'], 'type' => 'directory', - 'children' => [ - 'TranslateGeneral', - 'Translate', - 'TranslateECommerce', - 'GetBatchTranslate', - 'CreateAsyncTranslate', - 'GetAsyncTranslate', - 'GetDetectLanguage', - ], + 'title' => '文本翻译', + 'id' => 330266, ], [ - 'id' => 87669, - 'title' => '多模态翻译', - 'type' => 'directory', 'children' => [ [ - 'id' => 184530, - 'title' => '图片翻译', + 'children' => ['TranslateImage', 'TranslateImageBatch', 'GetTranslateImageBatchResult'], 'type' => 'directory', - 'children' => [ - 'TranslateImage', - 'TranslateImageBatch', - 'GetTranslateImageBatchResult', - ], + 'title' => '图片翻译', + 'id' => 330276, ], [ - 'id' => 184531, - 'title' => '文档翻译', + 'children' => ['CreateDocTranslateTask', 'GetDocTranslateTask'], 'type' => 'directory', - 'children' => [ - 'CreateDocTranslateTask', - 'GetDocTranslateTask', - ], + 'title' => '文档翻译', + 'id' => 330280, ], 'TranslateCertificate', ], + 'type' => 'directory', + 'title' => '多模态翻译', + 'id' => 330274, ], [ - 'id' => 87651, - 'title' => '跨境电商语言工具', + 'children' => ['GetImageTranslate', 'CreateImageTranslateTask', 'GetImageTranslateTask', 'GetImageDiagnose', 'GetTitleDiagnose', 'GetTitleGenerate', 'GetTitleIntelligence'], 'type' => 'directory', - 'children' => [ - 'GetImageTranslate', - 'CreateImageTranslateTask', - 'GetImageTranslateTask', - 'GetImageDiagnose', - 'GetTitleDiagnose', - 'GetTitleGenerate', - 'GetTitleIntelligence', - ], + 'title' => '跨境电商语言工具', + 'id' => 330255, ], [ - 'id' => 87654, - 'title' => '管理', + 'children' => ['OpenAlimtService', 'GetTranslateReport'], 'type' => 'directory', - 'children' => [ - 'OpenAlimtService', - 'GetTranslateReport', - ], + 'title' => '管理', + 'id' => 330263, ], [ - 'id' => 221262, - 'title' => '其他', + 'children' => ['TranslateSearch'], 'type' => 'directory', - 'children' => [ - 'TranslateSearch', - ], + 'title' => '其他', + 'id' => 330283, ], ], 'components' => [ 'schemas' => [], ], 'apis' => [ - 'TranslateGeneral' => [ - 'summary' => '通用翻译接口调用说明。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'CreateAsyncTranslate' => [ + 'summary' => '机器异步翻译创建任务接口,支持100万以下字符翻译。', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -101,123 +63,61 @@ 'BearerToken' => [], ], ], - 'operationType' => 'read', + 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'none', - 'riskType' => 'none', - 'chargeType' => 'free', - 'tenantRelevance' => 'publicInformation', - ], + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'], 'parameters' => [ - [ - 'name' => 'FormatType', - 'in' => 'formData', - 'schema' => [ - 'description' => '翻译文本的格式,html( 网页格式。设置此参数将对待翻译文本以及翻译后文本按照html格式进行处理)、text(文本格式。设置此参数将对传入待翻译文本以及翻译后结果不做文本格式处理,统一按纯文本格式处理。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'text', - ], - ], [ 'name' => 'SourceLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '原文语言,[参考语言code](https://help.aliyun.com/document_detail/215387.html)[参考语言code](https://www.alibabacloud.com/help/zh/machine-translation/latest/machine-translation-language-code-list)', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'zh', - ], + 'schema' => ['description' => '原文语言,[语言code参考](https://help.aliyun.com/document_detail/158269.html?spm=a2c4g.11186623.6.542.7da22b9fayuNoj)', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'en'], ], [ 'name' => 'TargetLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '译文语言,[参考语言code](https://help.aliyun.com/document_detail/215387.html)[参考语言code](https://www.alibabacloud.com/help/zh/machine-translation/latest/machine-translation-language-code-list)', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'en', - ], + 'schema' => ['description' => '目标语言,语言code参考', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'zh'], ], [ 'name' => 'SourceText', 'in' => 'formData', - 'schema' => [ - 'description' => '需要翻译的内容', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => '你好', - ], + 'schema' => ['description' => '需要翻译的内容', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'Opinion: We have finally gotten some relief at the pump. But it may not last long'], ], [ 'name' => 'Scene', 'in' => 'formData', - 'schema' => [ - 'description' => '通用版本默认是:general', - 'type' => 'string', - 'required' => false, - 'docRequired' => true, - 'example' => 'general', - 'default' => 'general', - ], + 'schema' => ['description' => '场景,支持:通用(general)、商品标题(title)、商品详情(description)、买卖家沟通(message)、医疗(medical)、社交(social)、科技(tech)。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'general'], ], [ - 'name' => 'Context', - 'in' => 'query', - 'schema' => [ - 'title' => 'context信息', - 'description' => '上下文信息,可选填', - 'type' => 'string', - 'required' => false, - 'example' => '早上我在家里吃了面包', - ], + 'name' => 'FormatType', + 'in' => 'formData', + 'schema' => ['description' => '翻译文本的格式,**html**( 网页格式。设置此参数将对待翻译文本以及翻译后文本按照html格式进行处理)、**text**(文本格式。设置此参数将对传入待翻译文本以及翻译后结果不做文本格式处理,统一按纯文本格式处理。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'text'], + ], + [ + 'name' => 'ApiType', + 'in' => 'formData', + 'schema' => ['description' => '- 版本类型,必须选择一个版本'."\n" + ."\n" + .'- 通用版本:translate_standard'."\n" + ."\n" + .'- 专业版本:translate_ecommerce', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'translate_standard'], ], ], 'responses' => [ 200 => [ 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '错误码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '返回信息', - 'type' => 'string', - 'example' => 'success', - ], - 'RequestId' => [ - 'description' => '请求ID', - 'type' => 'string', - 'example' => '86D18195-D89C-4C8C-9DC4-5FCE789CE6D5', - ], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求的唯一id,用于后续排查问题使用', 'type' => 'string', 'example' => 'DC2DCCC9-C3DF-4F59-8D8E-78185729F16D'], + 'Code' => ['description' => '错误码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '返回信息', 'type' => 'string', 'example' => 'success'], 'Data' => [ - 'description' => '翻译结果', + 'description' => '返回数据', 'type' => 'object', 'properties' => [ - 'Translated' => [ - 'description' => '翻译后的结果', - 'type' => 'string', - 'example' => 'Hello', - ], - 'WordCount' => [ - 'description' => '总单词数', - 'type' => 'string', - 'example' => '10', - ], - 'DetectedLanguage' => [ - 'description' => '源语言传入auto时,语种识别后的源语言代码', - 'type' => 'string', - 'example' => 'zh', - ], + 'JobId' => ['description' => '异步任务ID。', 'type' => 'string', 'required' => true, 'example' => '98bbb007-71bb-448b-bab0-2695ce8f8599'], + 'Status' => ['description' => '任务状态', 'type' => 'string', 'required' => true, 'example' => 'ready'], ], ], ], @@ -226,194 +126,200 @@ ], 'errorCodes' => [ 101 => [ - [ - 'errorCode' => '10001', - 'errorMessage' => 'The request has timed out.', - ], - ], - [ - [ - 'errorCode' => '10002', - 'errorMessage' => 'A system error occurred.', - ], - ], - [ - [ - 'errorCode' => '10003', - 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', - ], + ['errorCode' => '10001', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], - [ - [ - 'errorCode' => '10004', - 'errorMessage' => 'Some required parameters are missing.', - ], + 103 => [ + ['errorCode' => '10003', 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', 'description' => ''], ], [ - [ - 'errorCode' => '10005', - 'errorMessage' => 'The specified language pair is not supported.', - ], + ['errorCode' => '10004', 'errorMessage' => 'Some required parameters are missing.', 'description' => ''], ], [ - [ - 'errorCode' => '10006', - 'errorMessage' => 'An error occurred while detecting the language.', - ], + ['errorCode' => '10005', 'errorMessage' => 'The specified language pair is not supported.', 'description' => ''], ], [ - [ - 'errorCode' => '10007', - 'errorMessage' => 'An error occurred while translating.', - ], + ['errorCode' => '10006', 'errorMessage' => 'An error occurred while detecting the language.', 'description' => ''], ], [ - [ - 'errorCode' => '10008', - 'errorMessage' => 'The specified string is too long.', - ], + ['errorCode' => '10007', 'errorMessage' => 'An error occurred while translating.', 'description' => ''], ], [ - [ - 'errorCode' => '10009', - 'errorMessage' => '子账号没有权限', - ], + ['errorCode' => '10008', 'errorMessage' => 'The specified string is too long.', 'description' => ''], ], - [ - [ - 'errorCode' => '10010', - 'errorMessage' => '账号没有开通服务', - ], + 400 => [ + ['errorCode' => '10010', 'errorMessage' => 'You have not activated this service.', 'description' => '账号没有开通服务'], + ['errorCode' => '10013', 'errorMessage' => 'You have not activated the account service or the account service has overdue bills.', 'description' => '账号服务没有开通或者欠费'], + ['errorCode' => '10021', 'errorMessage' => 'The parameter is invalid.', 'description' => '参数无效。'], + ['errorCode' => '10026', 'errorMessage' => 'Failed to translate the certificate. Please check the parameters.', 'description' => '证件翻译失败,请检查提交的参数。'], ], - [ - [ - 'errorCode' => '10011', - 'errorMessage' => '子账号服务失败', - ], + 403 => [ + ['errorCode' => '10009', 'errorMessage' => 'The RAM user is not authorized to perform this operation.', 'description' => '子账号没有权限'], ], [ - [ - 'errorCode' => '10012', - 'errorMessage' => '翻译服务调用失败', - ], + ['errorCode' => '10025', 'errorMessage' => 'The specified task does not exist.', 'description' => '指定的任务不存在。'], ], - [ - [ - 'errorCode' => '10013', - 'errorMessage' => '账号服务没有开通或者欠费', - ], + 500 => [ + ['errorCode' => '10002', 'errorMessage' => 'A system error occurred.', 'description' => '系统错误'], + ['errorCode' => '10011', 'errorMessage' => 'An error occurred while invoking the RAM user service.', 'description' => '子账号服务失败'], + ['errorCode' => '10012', 'errorMessage' => 'An error occurred while calling the translation service.', 'description' => '翻译服务调用失败'], ], - 199 => [ - [ - 'errorCode' => '19999', - 'errorMessage' => 'An unknown error occurred.', + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"DC2DCCC9-C3DF-4F59-8D8E-78185729F16D\\",\\n \\"Code\\": 200,\\n \\"Message\\": \\"success\\",\\n \\"Data\\": {\\n \\"JobId\\": \\"98bbb007-71bb-448b-bab0-2695ce8f8599\\",\\n \\"Status\\": \\"ready\\"\\n }\\n}","type":"json"}]', + 'title' => '创建文本异步翻译任务', + 'description' => '1、机器异步翻译字符长度上限是100万字符 2、文本异步翻译创建接口参考阿里云OpenAPI开发者门户调试调用', + 'responseParamsDescription' => '示例'."\n" + .'正常返回示例'."\n" + ."\n" + .'JSON格式'."\n" + ."\n" + .'{'."\n" + .' "RequestId": "3AD51F66-4829-1E47-93F7-03BE3C0428F3",'."\n" + .' "Data": {'."\n" + .' "Status": "ready",'."\n" + .' "JobId": "2ff1e8b1-3842-4f1a-9bba-b8eea6b9720b"'."\n" + .' },'."\n" + .' "Code": "200"'."\n" + .'}', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:CreateAsyncTranslate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"success\\",\\n \\"RequestId\\": \\"86D18195-D89C-4C8C-9DC4-5FCE789CE6D5\\",\\n \\"Data\\": {\\n \\"Translated\\": \\"Hello\\",\\n \\"WordCount\\": \\"10\\",\\n \\"DetectedLanguage\\": \\"zh\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n 14E447CA-B93B-4526-ACD7-42AE13CC2AF6\\n \\n Hello\\n \\n 200\\n","errorExample":""}]', - 'title' => '机器翻译通用版调用', - 'description' => '注意事项'."\n" - .'1、QPS限制50,如有扩展需求,请与我们联系。钉钉群号:23369411'."\n" - .'2、请确保在使用该接口前,已充分了解通用版翻译产品的收费方式和价格'."\n" - .'2、字符长度上限是5000字符,若超出上限,可以保存成文件,使用[文档翻译](https://help.aliyun.com/document_detail/164151.html)'."\n" - .'3、请确保在使用该接口前,已充分了解通用版翻译产品的收费方式和价格', - 'requestParamsDescription' => ' ', - 'responseParamsDescription' => '公共请求参数参见[《RPC 调用机制》公共请求参数组装方案](https://help.aliyun.com/document_detail/315526.html?spm=a2c4g.158244.0.0.34b627b5qv5gmt#sectiondiv-qq5-utu-r7a)', - 'extraInfo' => ' ', ], - 'Translate' => [ - 'summary' => '调用机器翻译专业版获取翻译结果。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'CreateDocTranslateTask' => [ + 'summary' => '创建文档翻译任务。', + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], - [ - 'BearerToken' => [], - ], ], - 'operationType' => 'read', + 'operationType' => 'write', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'none', - 'riskType' => 'none', - 'chargeType' => 'free', - 'tenantRelevance' => 'publicInformation', - ], + 'systemTags' => ['operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'FormatType', + 'name' => 'SourceLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '翻译文本的格式,**html**( 网页格式。设置此参数将对待翻译文本以及翻译后文本按照html格式进行处理)、**text**(文本格式。设置此参数将对传入待翻译文本以及翻译后结果不做文本格式处理,统一按纯文本格式处理。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'text', - ], + 'schema' => ['description' => '原文语言,[语言code参考](https://help.aliyun.com/document_detail/158269.html?spm=a2c4g.11186623.6.542.7da22b9fayuNoj)', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'en'], ], [ 'name' => 'TargetLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '译文语言,[参考语言code](https://help.aliyun.com/document_detail/215387.html)[参考语言code](https://www.alibabacloud.com/help/zh/machine-translation/latest/machine-translation-language-code-list)', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'en', - ], + 'schema' => ['description' => '目标语言,[语言code参考](https://help.aliyun.com/document_detail/158269.html?spm=a2c4g.11186623.6.542.7da22b9fayuNoj)', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'zh'], ], [ - 'name' => 'SourceLanguage', + 'name' => 'FileUrl', 'in' => 'formData', - 'schema' => [ - 'description' => '原文语言,[参考语言code](https://help.aliyun.com/document_detail/215387.html)[参考语言code](https://www.alibabacloud.com/help/zh/machine-translation/latest/machine-translation-language-code-list)', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'zh', - ], + 'schema' => ['description' => '文档URL。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'http://fileUrl', 'isFileTransferUrl' => true], ], [ - 'name' => 'SourceText', + 'name' => 'Scene', 'in' => 'formData', - 'schema' => [ - 'description' => '待翻译内容', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => '你好', - 'maxLength' => 256000, - ], + 'schema' => ['description' => '场景,支持:通用(general)、商品标题(title)、商品详情(description)、买卖家沟通(message)、医疗(medical)、社交(social)、科技(tech)。', 'type' => 'string', 'required' => false, 'docRequired' => false, 'example' => 'general', 'default' => 'general'], ], [ - 'name' => 'Scene', + 'name' => 'CallbackUrl', 'in' => 'formData', - 'schema' => [ - 'description' => '场景可选取值:商品标题(title),商品描述(description),商品沟通(communication),医疗(medical),社交(social),金融(finance)', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'title', - ], + 'schema' => ['description' => '翻译结果回调URL,服务器会向回调地址发起post请求'."\n" + ."\n" + .'请求body'."\n" + ."\n" + .'raw json'."\n" + ."\n" + .'- 参数名 说明'."\n" + ."\n" + .'- task_id 任务id'."\n" + ."\n" + .'- status 状态'."\n" + ."\n" + .'- errCode 错误码'."\n" + ."\n" + .'- errMsg 错误信息'."\n" + ."\n" + .'- translateFileUrl 文件下载地址,过期时间1小时'."\n" + ."\n" + .'IP白名单'."\n" + ."\n" + .'59.82.61.52'."\n" + ."\n" + .'203.119.241.30'."\n" + ."\n" + .'203.119.241.98'."\n" + ."\n" + .'59.82.84.90'."\n" + ."\n" + .'203.119.241.56'."\n" + ."\n" + .'59.82.61.75'."\n" + ."\n" + .'回调服务示例:该服务用于回调方式获取翻译结果'."\n" + ."\n" + .'```'."\n" + .'import com.alibaba.fastjson.JSON;'."\n" + ."\n" + .'import com.alibaba.fastjson.JSONObject;'."\n" + ."\n" + .'import org.springframework.web.bind.annotation.RequestBody;'."\n" + ."\n" + .'import org.springframework.web.bind.annotation.RequestMapping;'."\n" + ."\n" + .'import org.springframework.web.bind.annotation.RequestMethod;'."\n" + ."\n" + .'import org.springframework.web.bind.annotation.RestController;'."\n" + ."\n" + .'@RestController'."\n" + ."\n" + .'public class CallbackController {'."\n" + ."\n" + .' @RequestMapping(value = "callback", method = RequestMethod.POST)'."\n" + ."\n" + .' public void callback(@RequestBody String body) {'."\n" + ."\n" + .' try {'."\n" + ."\n" + .' JSONObject result = JSON.parseObject(body);'."\n" + ."\n" + .' if (200 != result.getInteger("errCode")) {'."\n" + ."\n" + .' System.out.println("fail " + result.getString("erMsg"));'."\n" + ."\n" + .' return;'."\n" + ."\n" + .' }'."\n" + ."\n" + .' System.out.println("task_id:" + result.getString("task_id"));'."\n" + ."\n" + .' System.out.println("status:" + result.getString("status"));'."\n" + ."\n" + .' System.out.println("translateFileUrl:" + result.getString("translateFileUrl"));'."\n" + ."\n" + .' } catch (Exception e) {'."\n" + ."\n" + .' e.printStackTrace();'."\n" + ."\n" + .' }'."\n" + ."\n" + .' }'."\n" + ."\n" + .'}'."\n" + .'```', 'type' => 'string', 'required' => false, 'docRequired' => false, 'example' => 'http://callbackUrl'], ], [ - 'name' => 'Context', - 'in' => 'query', - 'schema' => [ - 'title' => '新增context', - 'description' => '上下文信息,可选填', - 'type' => 'string', - 'required' => false, - 'example' => '早上我在家里吃了面包', - ], + 'name' => 'ClientToken', + 'in' => 'formData', + 'schema' => ['description' => '提供幂等能力,3分钟内,相同的值只会生效一次。', 'type' => 'string', 'required' => false, 'docRequired' => false, 'example' => 'token'], ], ], 'responses' => [ @@ -421,265 +327,123 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '错误码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '错误信息', - 'type' => 'string', - 'example' => 'success', - ], - 'RequestId' => [ - 'description' => '请求ID', - 'type' => 'string', - 'example' => '86D18195-D89C-4C8C-9DC4-5FCE789CE6D5', - ], - 'Data' => [ - 'description' => '返回数据', - 'type' => 'object', - 'properties' => [ - 'Translated' => [ - 'description' => '翻译结果', - 'type' => 'string', - 'example' => 'Hello', - ], - 'WordCount' => [ - 'description' => '总单词数', - 'type' => 'string', - 'example' => '10', - ], - 'DetectedLanguage' => [ - 'description' => '源语言传入auto时,语种识别后的源语言代码', - 'type' => 'string', - 'example' => 'zh', - ], - ], - ], + 'Status' => ['description' => '任务状态。', 'type' => 'string', 'example' => 'ready'], + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => 'D3920BC3-A395-4CAD-9E84-7C39EB07507B'], + 'TaskId' => ['description' => '任务ID。', 'type' => 'string', 'example' => '0586df512c8b4bb382d7d9a6a01b5854'], ], + 'description' => '', ], ], ], 'errorCodes' => [ - 101 => [ - [ - 'errorCode' => '10001', - 'errorMessage' => 'The request has timed out.', - ], + 109 => [ + ['errorCode' => '10009', 'errorMessage' => '子账号没有权限', 'description' => ''], ], [ - [ - 'errorCode' => '10002', - 'errorMessage' => 'A system error occurred.', - ], + ['errorCode' => '10010', 'errorMessage' => '账号没有开通服务', 'description' => ''], ], [ - [ - 'errorCode' => '10003', - 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', - ], + ['errorCode' => '10011', 'errorMessage' => '子账号服务失败', 'description' => ''], ], [ - [ - 'errorCode' => '10004', - 'errorMessage' => 'Some required parameters are missing.', - ], + ['errorCode' => '10012', 'errorMessage' => '翻译服务调用失败', 'description' => ''], ], [ - [ - 'errorCode' => '10005', - 'errorMessage' => 'The specified language pair is not supported.', - ], + ['errorCode' => '10013', 'errorMessage' => '账号服务没有开通或者欠费', 'description' => ''], ], - [ - [ - 'errorCode' => '10006', - 'errorMessage' => 'An error occurred while detecting the language.', - ], + 199 => [ + ['errorCode' => '19999', 'errorMessage' => 'An unknown error occurred.', 'description' => ''], ], - [ - [ - 'errorCode' => '10007', - 'errorMessage' => 'An error occurred while translating.', - ], + 400 => [ + ['errorCode' => '10021', 'errorMessage' => 'The parameter is invalid.', 'description' => '参数无效。'], + ['errorCode' => '10022', 'errorMessage' => 'The parameter fileUrl is invalid.', 'description' => '参数fileUrl非法。'], + ['errorCode' => '10023', 'errorMessage' => 'The parameter fileUrl is not accessible.', 'description' => '参数fileUrl无法访问。'], + ['errorCode' => '10024', 'errorMessage' => 'The parameter callbackUrl is invalid.', 'description' => '参数callbackUrl非法。'], + ['errorCode' => '10031', 'errorMessage' => 'The specified file type is invalid.', 'description' => '文件类型不支持。'], + ['errorCode' => 'InvalidAccountStatus', 'errorMessage' => 'The Machine Translation service has not been activated.', 'description' => '用户未开通机器翻译服务。'], + ['errorCode' => 'RepeatInvoke', 'errorMessage' => 'Repeated calls.', 'description' => '重复调用'], ], - [ - [ - 'errorCode' => '10008', - 'errorMessage' => 'The specified string is too long.', - ], + 403 => [ + ['errorCode' => '10029', 'errorMessage' => 'The number of calls per day exceeds the limit.', 'description' => '超出单日调用次数限制。'], ], - [ - [ - 'errorCode' => '10009', - 'errorMessage' => '子账号没有权限', + 429 => [ + ['errorCode' => 'REQUESTS.OVER.LIMIT', 'errorMessage' => 'The request is too frequent, please try again later.', 'description' => '请求过于频繁,请稍后重试'], + ], + ], + 'title' => '创建文档翻译任务', + 'description' => '> 仅支持通过POST方式调用', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => ' ', + 'extraInfo' => ' ', + 'changeSet' => [ + ['createdAt' => '2024-07-29T03:16:52.000Z', 'description' => '错误码发生变更'], + ['createdAt' => '2024-05-09T02:35:40.000Z', 'description' => '错误码发生变更'], + ['createdAt' => '2022-11-11T08:44:01.000Z', 'description' => '错误码发生变更'], + ], + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'alimt:CreateDocTranslateTask', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"Status\\": \\"ready\\",\\n \\"RequestId\\": \\"D3920BC3-A395-4CAD-9E84-7C39EB07507B\\",\\n \\"TaskId\\": \\"0586df512c8b4bb382d7d9a6a01b5854\\"\\n}","errorExample":""},{"type":"xml","example":"\\n D3920BC3-A395-4CAD-9E84-7C39EB07507B\\n 0586df512c8b4bb382d7d9a6a01b5854\\n ready\\n","errorExample":""}]', + ], + 'CreateImageTranslateTask' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], + 'security' => [ [ - [ - 'errorCode' => '10010', - 'errorMessage' => '账号没有开通服务', - ], + 'AK' => [], ], + ], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'create', 'riskType' => 'high', 'chargeType' => 'paid', 'tenantRelevance' => 'publicInformation'], + 'parameters' => [ [ - [ - 'errorCode' => '10011', - 'errorMessage' => '子账号服务失败', - ], + 'name' => 'UrlList', + 'in' => 'formData', + 'schema' => ['description' => '图片翻译链接,多张图片通过英文逗号分隔,图片数量不能超过20张', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'http://xxx,http://yyy'], ], [ - [ - 'errorCode' => '10012', - 'errorMessage' => '翻译服务调用失败', - ], - ], - [ - [ - 'errorCode' => '10013', - 'errorMessage' => '账号服务没有开通或者欠费', - ], - ], - 199 => [ - [ - 'errorCode' => '19999', - 'errorMessage' => 'An unknown error occurred.', - ], - ], - ], - 'eventInfo' => [ - 'enable' => false, - 'eventNames' => [], - ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"success\\",\\n \\"RequestId\\": \\"86D18195-D89C-4C8C-9DC4-5FCE789CE6D5\\",\\n \\"Data\\": {\\n \\"Translated\\": \\"Hello\\",\\n \\"WordCount\\": \\"10\\",\\n \\"DetectedLanguage\\": \\"zh\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"success\\n86D18195-D89C-4C8C-9DC4-5FCE789CE6D5\\n\\n Hello\\n\\n200","errorExample":""}]', - 'title' => '机器翻译专业版调用', - 'description' => '注意事项'."\n" - .'1、QPS限制50,如有扩展需求,请与我们联系。钉钉群号:23369411'."\n" - .'2、请确保在使用该接口前,已充分了解专业版翻译产品的收费方式和价格'."\n" - .'2、字符长度上限是5000字符,若超出上限,可以保存成文件,使用[文档翻译](https://help.aliyun.com/document_detail/164151.html)'."\n" - .'3、请确保在使用该接口前,已充分了解专业版翻译产品的收费方式和价格', - 'requestParamsDescription' => '### 场景说明'."\n" - .'我们在针对不同场景,都有不同的引擎,每个引擎都是特别优化过的,可以通过scene参数控制(场景可选取值:商品标题(title),商品描述(description),商品沟通(communication),医疗(medical),社交(social)) ,金融(finance)'."\n" - ."\n" - .'商品标题:运用阿里电商标题数据,单独训练出来的,翻译标题特别好'."\n" - ."\n" - .'商品详描:运用阿里商品详描数据,单独训练出来,专门翻译商品详描比较好'."\n" - ."\n" - .'商品沟通:在电商买卖家沟通场景下,翻译效果会很好'."\n" - ."\n" - .'医疗:是针对医疗文献、术语、药品单独训练出来的引擎,在这个场景下翻译效果会很好'."\n" - ."\n" - .'社交:面向口语化的翻译,在这个场景下翻译结果会比较好'."\n" - ."\n" - .'金融:面向金融领域的翻译', - 'responseParamsDescription' => ' 公共请求参数参见[《RPC 调用机制》公共请求参数组装方案](https://help.aliyun.com/document_detail/315526.html?spm=a2c4g.158244.0.0.34b627b5qv5gmt#sectiondiv-qq5-utu-r7a)', - 'extraInfo' => ' ', - ], - 'TranslateECommerce' => [ - 'summary' => '调用机器翻译专业版获取翻译结果。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], - 'security' => [ - [ - 'AK' => [], - ], - [ - 'BearerToken' => [], - ], - ], - 'operationType' => 'read', - 'deprecated' => true, - 'systemTags' => [ - 'operationType' => 'none', - 'riskType' => 'none', - 'chargeType' => 'free', - 'tenantRelevance' => 'publicInformation', - ], - 'parameters' => [ - [ - 'name' => 'FormatType', - 'in' => 'formData', - 'schema' => [ - 'description' => '翻译文本的格式,**html**( 网页格式。设置此参数将对待翻译文本以及翻译后文本按照html格式进行处理)、**text**(文本格式。设置此参数将对传入待翻译文本以及翻译后结果不做文本格式处理,统一按纯文本格式处理。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'enumValueTitles' => [ - 'html' => 'html', - 'text' => 'text', - ], - 'example' => 'text', - ], + 'name' => 'SourceLanguage', + 'in' => 'formData', + 'schema' => ['description' => '图片原始语种', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'zh'], ], [ 'name' => 'TargetLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '目标语种,支持的[语种参考](https://help.aliyun.com/document_detail/163584.html)。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'zh', - ], - ], - [ - 'name' => 'SourceLanguage', - 'in' => 'formData', - 'schema' => [ - 'description' => '原文语言[参考语言code](https://help.aliyun.com/document_detail/158269.html?spm=a2c4g.11186623.2.8.53746614hvrF2G)[参考语言code](https://www.alibabacloud.com/help/zh/doc-detail/158269.html)'."\n", - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'en', - ], + 'schema' => ['description' => '图片翻译目标语种', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'en'], ], [ - 'name' => 'SourceText', + 'name' => 'Extra', 'in' => 'formData', - 'schema' => [ - 'description' => '待翻译内容', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'Hello', - ], + 'schema' => ['description' => '- 以下JSON内容格式,不关注的都可以不用传递,都是可选参数'."\n" + .'- 样例JSON格式内容:'."\n" + .'```'."\n" + .'{'."\n" + .' "have_ocr": "false",'."\n" + .' "without_text": "false",'."\n" + .' "have_psd": "true",'."\n" + .' "ignore_entity": "false"'."\n" + .'}'."\n" + .'```'."\n" + .'- `have_ocr`,控制是否返回 OCR 结果,true:需要,false:不需要'."\n" + .'- `without_text`,控制是否需要擦除图片中的文字,true:需要,false:不需要'."\n" + .'- `have_psd`,控制是否返回图片编辑器数据,渲染编辑器,true:需要,false:不需要'."\n" + .'- `ignore_entity`,是否忽略实体识别,true:忽略,false:不忽略', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => '{"have_ocr":"false","without_text":"false","have_psd":"true","ignore_entity":"false"}'], ], [ - 'name' => 'Scene', + 'name' => 'ClientToken', 'in' => 'formData', - 'schema' => [ - 'description' => '场景可选取值:商品标题(title),商品描述(description),商品沟通(communication),医疗(medical),社交(social),金融(finance)', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'enumValueTitles' => [ - 'medical' => 'medical', - 'social' => 'social', - 'description' => 'description', - 'communication' => 'communication', - 'title' => 'title', - 'finance' => 'finance', - ], - 'example' => 'social', - ], - ], - [ - 'name' => 'Context', - 'in' => 'query', - 'schema' => [ - 'title' => 'context信息', - 'description' => 'context信息', - 'type' => 'string', - 'required' => false, - 'example' => 'context信息', - ], + 'schema' => ['description' => '提供幂等能力,3分钟内,相同的值只会生效一次', 'type' => 'string', 'required' => false, 'example' => '1'], ], ], 'responses' => [ @@ -687,152 +451,174 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '状态码,200 表示正常'."\n", - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '请求错误信息,如果正确则空', - 'type' => 'string', - 'example' => 'An error occurred while translating.', - ], - 'RequestId' => [ - 'description' => '请求唯一串,方便后期排查定位问题', - 'type' => 'string', - 'example' => 'CC93BB5C-EAB5-579B-AA44-F61528F48FF8', - ], + 'Code' => ['description' => '状态码,200 表示正常'."\n", 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '错误的时候,返回的错误信息'."\n", 'type' => 'string', 'example' => 'ok'], + 'RequestId' => ['description' => '请求的唯一串'."\n", 'type' => 'string', 'example' => 'A41F6E25-8520-4AF0-90EF-AF7E32840108'], 'Data' => [ - 'description' => '返回数据', + 'description' => '返回的数据内容'."\n", 'type' => 'object', 'properties' => [ - 'Translated' => [ - 'description' => '翻译结果', - 'type' => 'string', - 'example' => '你好', - ], - 'WordCount' => [ - 'description' => '原文的字符数', - 'type' => 'string', - 'example' => '10', - ], - 'DetectedLanguage' => [ - 'type' => 'string', - ], + 'TaskId' => ['description' => '异步图片翻译返回的任务ID,后面根据这个ID获取翻译结果', 'type' => 'string', 'example' => 'A41F6E25-8520-4AF0-90EF-111111'], ], ], ], + 'description' => '', ], ], ], 'errorCodes' => [ 101 => [ - [ - 'errorCode' => '10001', - 'errorMessage' => 'The request has timed out.', - ], + ['errorCode' => 'System.RequestTimeOut', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], [ - [ - 'errorCode' => '10002', - 'errorMessage' => 'A system error occurred.', - ], + ['errorCode' => 'System.Error', 'errorMessage' => 'A system error occurred.', 'description' => ''], ], [ - [ - 'errorCode' => '10003', - 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', - ], + ['errorCode' => 'System.UrlDecodingError', 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', 'description' => ''], ], [ - [ - 'errorCode' => '10004', - 'errorMessage' => 'Some required parameters are missing.', - ], + ['errorCode' => 'System.ParameterError', 'errorMessage' => 'Some required parameters are missing.', 'description' => ''], ], [ - [ - 'errorCode' => '10005', - 'errorMessage' => 'The specified language pair is not supported.', - ], + ['errorCode' => 'System.LanguageNotSupported', 'errorMessage' => 'The specified language pair is not supported.', 'description' => ''], ], [ - [ - 'errorCode' => '10006', - 'errorMessage' => 'An error occurred while detecting the language.', - ], + ['errorCode' => 'System.LanguageDetectError', 'errorMessage' => 'An error occurred while detecting the language.', 'description' => ''], ], [ - [ - 'errorCode' => '10007', - 'errorMessage' => 'An error occurred while translating.', - ], + ['errorCode' => 'System.TranslateError', 'errorMessage' => 'An error occurred while translating.', 'description' => ''], ], [ - [ - 'errorCode' => '10008', - 'errorMessage' => 'The specified string is too long.', - ], + ['errorCode' => 'System.StringTooLong', 'errorMessage' => 'The maximum length of the specified string is exceeded.', 'description' => ''], + ], + 110 => [ + ['errorCode' => 'System.AccountNotActivated', 'errorMessage' => 'The account has not activated the service.', 'description' => ''], ], [ - [ - 'errorCode' => '10009', - 'errorMessage' => '子账号没有权限', - ], + ['errorCode' => 'System.SubServiceFailed', 'errorMessage' => 'Sub-account service failed.', 'description' => ''], ], [ - [ - 'errorCode' => '10010', - 'errorMessage' => '账号没有开通服务', - ], + ['errorCode' => 'System.TranslateServiceCallFailed', 'errorMessage' => 'Failed to call the translation service.', 'description' => ''], ], [ - [ - 'errorCode' => '10011', - 'errorMessage' => '子账号服务失败', + ['errorCode' => 'System.AccountNotActivatedOrInArrears', 'errorMessage' => 'The service is not activated or the account has an outstanding balance.', 'description' => ''], + ], + ], + 'title' => '创建异步图片翻译调用指南', + 'summary' => '创建异步图片翻译,图片翻译包含文字识别、文本翻译、文字回填等能力。', + 'description' => '>该接口已计划下线,不建议继续调用。>', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => ' ', + 'extraInfo' => ' ', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'alimt:CreateImageTranslateTask', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"ok\\",\\n \\"RequestId\\": \\"A41F6E25-8520-4AF0-90EF-AF7E32840108\\",\\n \\"Data\\": {\\n \\"TaskId\\": \\"A41F6E25-8520-4AF0-90EF-111111\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"ok\\nA41F6E25-8520-4AF0-90EF-AF7E32840108\\n\\n A41F6E25-8520-4AF0-90EF-111111\\n\\n200","errorExample":""}]', + ], + 'GetAsyncTranslate' => [ + 'summary' => '获取文本异步翻译任务内容。', + 'methods' => ['post'], + 'schemes' => ['https'], + 'security' => [ [ - [ - 'errorCode' => '10012', - 'errorMessage' => '翻译服务调用失败', - ], + 'AK' => [], ], + ], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'none'], + 'parameters' => [ [ - [ - 'errorCode' => '10013', - 'errorMessage' => '账号服务没有开通或者欠费', - ], + 'name' => 'JobId', + 'in' => 'formData', + 'schema' => ['description' => '异步任务ID。您调用CreateAsyncTranslate创建异步任务返回的JobId', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '77056ab7-7be1-4c2a-91a1-f20f63894048'], ], - 199 => [ - [ - 'errorCode' => '19999', - 'errorMessage' => 'An unknown error occurred.', + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求的唯一id,用于后续排查问题使用', 'type' => 'string', 'example' => 'DC2DCCC9-C3DF-4F59-8D8E-78185729F16D'], + 'Code' => ['description' => '状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '返回信息。', 'type' => 'string', 'example' => 'ok'], + 'Data' => [ + 'description' => '数据内容', + 'type' => 'object', + 'properties' => [ + 'Status' => ['description' => '任务状态', 'type' => 'string', 'example' => 'ready'], + 'TranslatedText' => ['description' => '翻译内容', 'type' => 'string', 'example' => 'hello'], + 'WordCount' => ['description' => '原文的字符数', 'type' => 'string', 'example' => '2'], + 'DetectedLanguage' => ['description' => '源语言传入auto时,语种识别后的源语言代码', 'type' => 'string', 'example' => 'zh'], + ], + ], + ], ], ], ], - 'staticInfo' => [ - 'substitutions' => [ - 'alimt::2018-10-12::Translate', + 'errorCodes' => [ + 109 => [ + ['errorCode' => 'System.SubNotPermission', 'errorMessage' => 'The sub account is not authorized to perform the operation.', 'description' => ''], + ], + 400 => [ + ['errorCode' => 'Parameter.SourceLangError', 'errorMessage' => 'Source languages are not supported.', 'description' => '源语种不支持。'], + ['errorCode' => 'Parameter.TargetLangError', 'errorMessage' => 'Target languages are not supported.', 'description' => '目标语种不支持。'], + ['errorCode' => 'System.AccountNotActivated', 'errorMessage' => 'The account has not activated the service.', 'description' => '账号没有开通服务'], + ['errorCode' => 'System.AccountNotActivatedOrInArrears', 'errorMessage' => 'The service is not activated or the account has an outstanding balance.', 'description' => '账号服务没有开通或者欠费'], + ['errorCode' => 'System.LanguageNotSupported', 'errorMessage' => 'The specified language pair is not supported.', 'description' => '该语向不支持'], + ['errorCode' => 'System.ParameterError', 'errorMessage' => 'Some required parameters are missing.', 'description' => '参数错误'], + ['errorCode' => 'System.StringTooLong', 'errorMessage' => 'The maximum length of the specified string is exceeded.', 'description' => '字符过长'], + ], + 403 => [ + ['errorCode' => 'System.subNotPermission', 'errorMessage' => 'The sub-account is not authorized to perform the operation.', 'description' => '子账号没有权限'], + ], + 500 => [ + ['errorCode' => 'System.Error', 'errorMessage' => 'A system error occurred.', 'description' => '系统错误'], + ['errorCode' => 'System.LanguageDetectError', 'errorMessage' => 'An error occurred while detecting the language.', 'description' => '语种识别错误'], + ['errorCode' => 'System.RequestTimeOut', 'errorMessage' => 'The request has timed out.', 'description' => '请求超时'], + ['errorCode' => 'System.SubServiceFailed', 'errorMessage' => 'Sub-account service failed.', 'description' => '子账号服务失败'], + ['errorCode' => 'System.TranslateError', 'errorMessage' => 'An error occurred while translating.', 'description' => '翻译错误'], + ['errorCode' => 'System.TranslateServiceCallFailed', 'errorMessage' => 'Failed to call the translation service.', 'description' => '翻译服务调用失败'], + ['errorCode' => 'System.unknownError', 'errorMessage' => 'An unknown error occurred.', 'description' => '未知错误'], + ['errorCode' => 'System.UrlDecodingError', 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', 'description' => 'URL编码错误'], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"DC2DCCC9-C3DF-4F59-8D8E-78185729F16D\\",\\n \\"Code\\": 200,\\n \\"Message\\": \\"ok\\",\\n \\"Data\\": {\\n \\"Status\\": \\"ready\\",\\n \\"TranslatedText\\": \\"hello\\",\\n \\"WordCount\\": \\"2\\",\\n \\"DetectedLanguage\\": \\"zh\\"\\n }\\n}","type":"json"}]', + 'title' => '获取文本异步翻译任务', + 'description' => '通过jobID获取对应的异步任务翻译内容', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:GetAsyncTranslate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"An error occurred while translating.\\",\\n \\"RequestId\\": \\"CC93BB5C-EAB5-579B-AA44-F61528F48FF8\\",\\n \\"Data\\": {\\n \\"Translated\\": \\"你好\\",\\n \\"WordCount\\": \\"10\\",\\n \\"DetectedLanguage\\": \\"\\"\\n }\\n}","type":"json"}]', - 'title' => '机器翻译电商版调用', - 'description' => '1、字符长度限制5000,调用接口QPS限制50;如有扩展需求,请与我们联系钉钉群号:23369411'."\n" - ."\n" - .'2、请确保在使用该接口前,已充分了解专业版翻译产品的收费方式和价格', ], 'GetBatchTranslate' => [ 'summary' => '机器批量翻译,支持多段文本进行翻译。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -840,104 +626,62 @@ ], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'high', - 'chargeType' => 'paid', - 'tenantRelevance' => 'publicInformation', - ], + 'systemTags' => ['operationType' => 'get', 'riskType' => 'high', 'chargeType' => 'paid', 'tenantRelevance' => 'publicInformation'], 'parameters' => [ [ 'name' => 'FormatType', 'in' => 'formData', - 'schema' => [ - 'description' => '翻译文本的格式,html( 网页格式。设置此参数将对待翻译文本以及翻译后文本按照html格式进行处理)、text(文本格式。设置此参数将对传入待翻译文本以及翻译后结果不做文本格式处理,统一按纯文本格式处理。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'text ', - ], + 'schema' => ['description' => '翻译文本的格式,html( 网页格式。设置此参数将对待翻译文本以及翻译后文本按照html格式进行处理)、text(文本格式。设置此参数将对传入待翻译文本以及翻译后结果不做文本格式处理,统一按纯文本格式处理。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'text '], ], [ 'name' => 'TargetLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '译文语言[参考语言code](https://help.aliyun.com/document_detail/158269.html?spm=a2c4g.11186623.2.8.53746614hvrF2G)[参考语言code](https://www.alibabacloud.com/help/zh/doc-detail/158269.html)'."\n", - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'zh', - ], + 'schema' => ['description' => '译文语言[参考语言code](https://help.aliyun.com/document_detail/158269.html?spm=a2c4g.11186623.2.8.53746614hvrF2G)[参考语言code](https://www.alibabacloud.com/help/zh/doc-detail/158269.html)'."\n", 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'zh'], ], [ 'name' => 'SourceLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '原文语言[参考语言code](https://help.aliyun.com/document_detail/158269.html?spm=a2c4g.11186623.2.8.53746614hvrF2G)[参考语言code](https://www.alibabacloud.com/help/zh/doc-detail/158269.html)'."\n", - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'en', - ], + 'schema' => ['description' => '原文语言[参考语言code](https://help.aliyun.com/document_detail/158269.html?spm=a2c4g.11186623.2.8.53746614hvrF2G)[参考语言code](https://www.alibabacloud.com/help/zh/doc-detail/158269.html)'."\n", 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'en'], ], [ 'name' => 'Scene', 'in' => 'formData', - 'schema' => [ - 'description' => '- 专业版本支持的场景:商品标题(title),商品描述(description),商品沟通(communication),医疗(medical),社交(social)'."\n" - ."\n" - .'- 通用版本支持的场景:general', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'general', - ], + 'schema' => ['description' => '- 专业版本支持的场景:商品标题(title),商品描述(description),商品沟通(communication),医疗(medical),社交(social)'."\n" + ."\n" + .'- 通用版本支持的场景:general', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'general'], ], [ 'name' => 'ApiType', 'in' => 'formData', - 'schema' => [ - 'description' => '- 版本类型,必须选择一个版本'."\n" - ."\n" - .'- 通用版本:translate_standard'."\n" - ."\n" - .'- 专业版本:translate_ecommerce', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'translate_standard', - ], + 'schema' => ['description' => '- 版本类型,必须选择一个版本'."\n" + ."\n" + .'- 通用版本:translate_standard'."\n" + ."\n" + .'- 专业版本:translate_ecommerce', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'translate_standard'], ], [ 'name' => 'SourceText', 'in' => 'formData', - 'schema' => [ - 'description' => 'json 数据格式'."\n" - ."\n" - .'key:唯一的标记id,用于翻译结果拿到对应的id,对应上原文'."\n" - ."\n" - .'value:待翻译的内容'."\n" - ."\n" - .'具体格式如下:'."\n" - .'`'."\n" - .'{'."\n" - .' "11": "hello boy",'."\n" - .' "12": "go home",'."\n" - .' "13": "we can"'."\n" - .'}'."\n" - .'`'."\n" - ."\n" - .'> 待翻译的条数不能超过50'."\n" - .'> 单条翻译字符数不能超过1000字符'."\n" - .'> 总字符数不能超过8000字符'."\n" - .'>key不会计入翻译的字符'."\n" - .'>待翻译的内容中,标点、空格、html标签均会计入字符', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => '{"11":"hello boy","12":"go home","13":"we can"}', - 'isFileTransferUrl' => false, - ], + 'schema' => ['description' => 'json 数据格式'."\n" + ."\n" + .'key:唯一的标记id,用于翻译结果拿到对应的id,对应上原文'."\n" + ."\n" + .'value:待翻译的内容'."\n" + ."\n" + .'具体格式如下:'."\n" + .'`'."\n" + .'{'."\n" + .' "11": "hello boy",'."\n" + .' "12": "go home",'."\n" + .' "13": "we can"'."\n" + .'}'."\n" + .'`'."\n" + ."\n" + .'> 待翻译的条数不能超过50'."\n" + .'> 单条翻译字符数不能超过1000字符'."\n" + .'> 总字符数不能超过8000字符'."\n" + .'>key不会计入翻译的字符'."\n" + .'>待翻译的内容中,标点、空格、html标签均会计入字符', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '{"11":"hello boy","12":"go home","13":"we can"}', 'isFileTransferUrl' => false], ], ], 'responses' => [ @@ -945,158 +689,95 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '错误码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '返回信息', - 'type' => 'string', - 'example' => 'success', - ], - 'RequestId' => [ - 'description' => '请求的唯一id,用于后续排查问题使用', - 'type' => 'string', - 'example' => '86D18195-D89C-4C8C-9DC4-5FCE789CE6D5', - ], + 'Code' => ['description' => '错误码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '返回信息', 'type' => 'string', 'example' => 'success'], + 'RequestId' => ['description' => '请求的唯一id,用于后续排查问题使用', 'type' => 'string', 'example' => '86D18195-D89C-4C8C-9DC4-5FCE789CE6D5'], 'TranslatedList' => [ 'type' => 'array', - 'items' => [ - 'description' => '返回结果,json格式'."\n" - ."\n" - .'code:单条翻译的状态码'."\n" - ."\n" - .'wordCount:原文的字符数'."\n" - ."\n" - .'detectedLanguage:源语言传入auto时,语种识别后的源语言代码'."\n" - ."\n" - .'index:入参时候的key,唯一id,用于对应到原文'."\n" - ."\n" - .'translated:翻译结果', - 'type' => 'object', - 'example' => '['."\n" - .' {'."\n" - .' "code": "200",'."\n" - .' "wordCount": "9",'."\n" - .' "detectedLanguage": "en"'."\n" - .' "index": "11",'."\n" - .' "translated": "你好男孩"'."\n" - .' },'."\n" - .' {'."\n" - .' "code": "200",'."\n" - .' "wordCount": "7",'."\n" - .' "detectedLanguage": "en"'."\n" - .' "index": "12",'."\n" - .' "translated": "回家"'."\n" - .' },'."\n" - .' {'."\n" - .' "code": "200",'."\n" - .' "wordCount": "6",'."\n" - .' "detectedLanguage": "en"'."\n" - .' "index": "13",'."\n" - .' "translated": "我们可以"'."\n" - .' }'."\n" - .']', - ], + 'items' => ['description' => '返回结果,json格式'."\n" + ."\n" + .'code:单条翻译的状态码'."\n" + ."\n" + .'wordCount:原文的字符数'."\n" + ."\n" + .'detectedLanguage:源语言传入auto时,语种识别后的源语言代码'."\n" + ."\n" + .'index:入参时候的key,唯一id,用于对应到原文'."\n" + ."\n" + .'translated:翻译结果', 'type' => 'object', 'example' => '['."\n" + .' {'."\n" + .' "code": "200",'."\n" + .' "wordCount": "9",'."\n" + .' "detectedLanguage": "en"'."\n" + .' "index": "11",'."\n" + .' "translated": "你好男孩"'."\n" + .' },'."\n" + .' {'."\n" + .' "code": "200",'."\n" + .' "wordCount": "7",'."\n" + .' "detectedLanguage": "en"'."\n" + .' "index": "12",'."\n" + .' "translated": "回家"'."\n" + .' },'."\n" + .' {'."\n" + .' "code": "200",'."\n" + .' "wordCount": "6",'."\n" + .' "detectedLanguage": "en"'."\n" + .' "index": "13",'."\n" + .' "translated": "我们可以"'."\n" + .' }'."\n" + .']'], + 'description' => '', ], ], + 'description' => '', ], ], ], 'errorCodes' => [ 101 => [ - [ - 'errorCode' => 'System.RequestTimeOut', - 'errorMessage' => 'The request has timed out.', - ], + ['errorCode' => 'System.RequestTimeOut', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.Error', - 'errorMessage' => 'A system error occurred.', - ], + ['errorCode' => 'System.Error', 'errorMessage' => 'A system error occurred.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.UrlDecodingError', - 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', - ], + ['errorCode' => 'System.UrlDecodingError', 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.ParameterError', - 'errorMessage' => 'Some required parameters are missing.', - ], + ['errorCode' => 'System.ParameterError', 'errorMessage' => 'Some required parameters are missing.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.LanguageNotSupported', - 'errorMessage' => 'The specified language pair is not supported.', - ], + ['errorCode' => 'System.LanguageNotSupported', 'errorMessage' => 'The specified language pair is not supported.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.LanguageDetectError', - 'errorMessage' => 'An error occurred while detecting the language.', - ], + ['errorCode' => 'System.LanguageDetectError', 'errorMessage' => 'An error occurred while detecting the language.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.TranslateError', - 'errorMessage' => 'An error occurred while translating.', - ], + ['errorCode' => 'System.TranslateError', 'errorMessage' => 'An error occurred while translating.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.StringTooLong', - 'errorMessage' => 'The maximum length of the specified string is exceeded.', - ], + ['errorCode' => 'System.StringTooLong', 'errorMessage' => 'The maximum length of the specified string is exceeded.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.SubNotPermission', - 'errorMessage' => 'The sub account is not authorized to perform the operation.', - ], - [ - 'errorCode' => 'System.subNotPermission', - 'errorMessage' => 'The sub-account is not authorized to perform the operation.', - ], + ['errorCode' => 'System.SubNotPermission', 'errorMessage' => 'The sub account is not authorized to perform the operation.', 'description' => ''], + ['errorCode' => 'System.subNotPermission', 'errorMessage' => 'The sub-account is not authorized to perform the operation.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.AccountNotActivated', - 'errorMessage' => 'The account has not activated the service.', - ], + ['errorCode' => 'System.AccountNotActivated', 'errorMessage' => 'The account has not activated the service.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.SubServiceFailed', - 'errorMessage' => 'Sub-account service failed.', - ], + ['errorCode' => 'System.SubServiceFailed', 'errorMessage' => 'Sub-account service failed.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.TranslateServiceCallFailed', - 'errorMessage' => 'Failed to call the translation service.', - ], + ['errorCode' => 'System.TranslateServiceCallFailed', 'errorMessage' => 'Failed to call the translation service.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.AccountNotActivatedOrInArrears', - 'errorMessage' => 'The service is not activated or the account has an outstanding balance.', - ], + ['errorCode' => 'System.AccountNotActivatedOrInArrears', 'errorMessage' => 'The service is not activated or the account has an outstanding balance.', 'description' => ''], ], 199 => [ - [ - 'errorCode' => 'System.unknownError', - 'errorMessage' => 'An unknown error occurred.', - ], - [ - 'errorCode' => 'System.UnknownError', - 'errorMessage' => 'An unknown system error occurred.', - ], + ['errorCode' => 'System.unknownError', 'errorMessage' => 'An unknown error occurred.', 'description' => ''], + ['errorCode' => 'System.UnknownError', 'errorMessage' => 'An unknown system error occurred.', 'description' => ''], ], ], 'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"success\\",\\n \\"RequestId\\": \\"86D18195-D89C-4C8C-9DC4-5FCE789CE6D5\\",\\n \\"TranslatedList\\": [\\n {\\n \\"test\\": \\"test\\",\\n \\"test2\\": 1\\n }\\n ]\\n}","errorExample":""},{"type":"xml","example":"success\\n86D18195-D89C-4C8C-9DC4-5FCE789CE6D5\\n[{\\"code\\":\\"200\\",\\"wordCount\\":\\"9\\",\\"index\\":\\"11\\",\\"translated\\":\\"你好男孩\\"},{\\"code\\":\\"200\\",\\"wordCount\\":\\"7\\",\\"index\\":\\"12\\",\\"translated\\":\\"回家\\"},{\\"code\\":\\"200\\",\\"wordCount\\":\\"6\\",\\"index\\":\\"13\\",\\"translated\\":\\"我们可以\\"}]\\n200","errorExample":""}]', @@ -1109,266 +790,132 @@ 'requestParamsDescription' => ' ', 'responseParamsDescription' => ' ', 'extraInfo' => ' ', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetBatchTranslate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + ], ], - 'CreateAsyncTranslate' => [ - 'summary' => '机器异步翻译创建任务接口,支持100万以下字符翻译。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', - ], + 'GetDetectLanguage' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], - [ - 'BearerToken' => [], - ], - ], - 'operationType' => 'readAndWrite', - 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'none', - 'riskType' => 'none', - 'chargeType' => 'free', - 'tenantRelevance' => 'publicInformation', ], + 'operationType' => 'read', + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'], 'parameters' => [ - [ - 'name' => 'SourceLanguage', - 'in' => 'formData', - 'schema' => [ - 'description' => '原文语言,[语言code参考](https://help.aliyun.com/document_detail/158269.html?spm=a2c4g.11186623.6.542.7da22b9fayuNoj)', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'en', - ], - ], - [ - 'name' => 'TargetLanguage', - 'in' => 'formData', - 'schema' => [ - 'description' => '目标语言,语言code参考', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'zh', - ], - ], [ 'name' => 'SourceText', 'in' => 'formData', - 'schema' => [ - 'description' => '需要翻译的内容', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'Opinion: We have finally gotten some relief at the pump. But it may not last long', - ], - ], - [ - 'name' => 'Scene', - 'in' => 'formData', - 'schema' => [ - 'description' => '场景,支持:通用(general)、商品标题(title)、商品详情(description)、买卖家沟通(message)、医疗(medical)、社交(social)、科技(tech)。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'general', - ], - ], - [ - 'name' => 'FormatType', - 'in' => 'formData', - 'schema' => [ - 'description' => '翻译文本的格式,**html**( 网页格式。设置此参数将对待翻译文本以及翻译后文本按照html格式进行处理)、**text**(文本格式。设置此参数将对传入待翻译文本以及翻译后结果不做文本格式处理,统一按纯文本格式处理。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'text', - ], - ], - [ - 'name' => 'ApiType', - 'in' => 'formData', - 'schema' => [ - 'description' => '- 版本类型,必须选择一个版本'."\n" - ."\n" - .'- 通用版本:translate_standard'."\n" - ."\n" - .'- 专业版本:translate_ecommerce', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'translate_standard', - ], + 'schema' => ['description' => '待识别的语种', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '你好'], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求的唯一id,用于后续排查问题使用', - 'type' => 'string', - 'example' => 'DC2DCCC9-C3DF-4F59-8D8E-78185729F16D', - ], - 'Code' => [ - 'description' => '错误码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '返回信息', - 'type' => 'string', - 'example' => 'success', - ], - 'Data' => [ - 'description' => '返回数据', - 'type' => 'object', - 'properties' => [ - 'JobId' => [ - 'description' => '异步任务ID。', - 'type' => 'string', - 'required' => true, - 'example' => '98bbb007-71bb-448b-bab0-2695ce8f8599', - ], - 'Status' => [ - 'description' => '任务状态', - 'type' => 'string', - 'required' => true, - 'example' => 'ready', - ], - ], - ], + 'DetectedLanguage' => ['description' => '识别成功的语种', 'type' => 'string', 'example' => 'zh'], + 'RequestId' => ['description' => '请求ID', 'type' => 'string', 'example' => '0C5EC1EC-1A06-4D60-97E6-4D41350945E4'], + 'LanguageProbabilities' => ['type' => 'string', 'description' => ''], ], + 'description' => '', ], ], ], 'errorCodes' => [ 101 => [ - [ - 'errorCode' => '10001', - 'errorMessage' => 'The request has timed out.', - ], + ['errorCode' => '10001', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], - 103 => [ - [ - 'errorCode' => '10003', - 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', - ], + [ + ['errorCode' => '10002', 'errorMessage' => 'A system error occurred.', 'description' => ''], ], [ - [ - 'errorCode' => '10004', - 'errorMessage' => 'Some required parameters are missing.', - ], + ['errorCode' => '10003', 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', 'description' => ''], ], [ - [ - 'errorCode' => '10005', - 'errorMessage' => 'The specified language pair is not supported.', - ], + ['errorCode' => '10004', 'errorMessage' => 'Some required parameters are missing.', 'description' => ''], ], [ - [ - 'errorCode' => '10006', - 'errorMessage' => 'An error occurred while detecting the language.', - ], + ['errorCode' => '10005', 'errorMessage' => 'The specified language pair is not supported.', 'description' => ''], ], [ - [ - 'errorCode' => '10007', - 'errorMessage' => 'An error occurred while translating.', - ], + ['errorCode' => '10006', 'errorMessage' => 'An error occurred while detecting the language.', 'description' => ''], ], [ - [ - 'errorCode' => '10008', - 'errorMessage' => 'The specified string is too long.', - ], + ['errorCode' => '10007', 'errorMessage' => 'An error occurred while translating.', 'description' => ''], ], - 400 => [ - [ - 'errorCode' => '10010', - 'errorMessage' => 'You have not activated this service.', - ], - [ - 'errorCode' => '10013', - 'errorMessage' => 'You have not activated the account service or the account service has overdue bills.', - ], - [ - 'errorCode' => '10021', - 'errorMessage' => 'The parameter is invalid.', - ], - [ - 'errorCode' => '10026', - 'errorMessage' => 'Failed to translate the certificate. Please check the parameters.', - ], + [ + ['errorCode' => '10008', 'errorMessage' => 'The specified string is too long.', 'description' => ''], ], - 403 => [ - [ - 'errorCode' => '10009', - 'errorMessage' => 'The RAM user is not authorized to perform this operation.', - ], + [ + ['errorCode' => '10009', 'errorMessage' => '子账号没有权限', 'description' => ''], ], [ - [ - 'errorCode' => '10025', - 'errorMessage' => 'The specified task does not exist.', - ], + ['errorCode' => '10010', 'errorMessage' => '账号没有开通服务', 'description' => ''], ], - 500 => [ - [ - 'errorCode' => '10002', - 'errorMessage' => 'A system error occurred.', - ], - [ - 'errorCode' => '10011', - 'errorMessage' => 'An error occurred while invoking the RAM user service.', - ], - [ - 'errorCode' => '10012', - 'errorMessage' => 'An error occurred while calling the translation service.', - ], + [ + ['errorCode' => '10011', 'errorMessage' => '子账号服务失败', 'description' => ''], + ], + [ + ['errorCode' => '10012', 'errorMessage' => '翻译服务调用失败', 'description' => ''], + ], + [ + ['errorCode' => '10013', 'errorMessage' => '账号服务没有开通或者欠费', 'description' => ''], + ], + 199 => [ + ['errorCode' => '19999', 'errorMessage' => 'An unknown error occurred.', 'description' => ''], + ], + 400 => [ + ['errorCode' => 'System.ParameterError', 'errorMessage' => 'Some required parameters are missing.', 'description' => '参数错误'], + ], + 503 => [ + ['errorCode' => 'System.Error', 'errorMessage' => 'A system error occurred.', 'description' => ''], + ['errorCode' => 'Internal.Error', 'errorMessage' => 'The internal service connection timeout, please try again later.', 'description' => '后端服务超时,请稍后重试'], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"DC2DCCC9-C3DF-4F59-8D8E-78185729F16D\\",\\n \\"Code\\": 200,\\n \\"Message\\": \\"success\\",\\n \\"Data\\": {\\n \\"JobId\\": \\"98bbb007-71bb-448b-bab0-2695ce8f8599\\",\\n \\"Status\\": \\"ready\\"\\n }\\n}","type":"json"}]', - 'title' => '创建文本异步翻译任务', - 'description' => '1、机器异步翻译字符长度上限是100万字符 2、文本异步翻译创建接口参考阿里云OpenAPI开发者门户调试调用', - 'responseParamsDescription' => '示例'."\n" - .'正常返回示例'."\n" - ."\n" - .'JSON格式'."\n" + 'title' => '语种识别', + 'summary' => '语种识别API说明文档。', + 'description' => '1、字符长度限制5000,调用接口QPS限制50;如有扩展需求,请与我们联系,钉钉群号:23369411'."\n" ."\n" - .'{'."\n" - .' "RequestId": "3AD51F66-4829-1E47-93F7-03BE3C0428F3",'."\n" - .' "Data": {'."\n" - .' "Status": "ready",'."\n" - .' "JobId": "2ff1e8b1-3842-4f1a-9bba-b8eea6b9720b"'."\n" - .' },'."\n" - .' "Code": "200"'."\n" - .'}', - ], - 'GetAsyncTranslate' => [ - 'summary' => '获取文本异步翻译任务内容。', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'https', + .'2、请确保在使用该接口前,已充分了解通用版翻译产品的收费方式和价格', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => '公共请求参数参见[《RPC 调用机制》公共请求参数组装方案](https://help.aliyun.com/document_detail/315526.html?spm=a2c4g.158244.0.0.34b627b5qv5gmt#sectiondiv-qq5-utu-r7a)', + 'extraInfo' => ' ', + 'changeSet' => [ + ['createdAt' => '2024-06-06T08:37:37.000Z', 'description' => '响应参数发生变更'], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetDetectLanguage', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"DetectedLanguage\\": \\"zh\\",\\n \\"RequestId\\": \\"0C5EC1EC-1A06-4D60-97E6-4D41350945E4\\",\\n \\"LanguageProbabilities\\": \\"\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 0C5EC1EC-1A06-4D60-97E6-4D41350945E4\\n zh\\n","errorExample":""}]', + ], + 'GetDocTranslateTask' => [ + 'summary' => '查询文档翻译任务。', + 'methods' => ['get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -1376,194 +923,108 @@ ], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'none', - ], + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'JobId', - 'in' => 'formData', - 'schema' => [ - 'description' => '异步任务ID。您调用CreateAsyncTranslate创建异步任务返回的JobId', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => '77056ab7-7be1-4c2a-91a1-f20f63894048', - ], + 'name' => 'TaskId', + 'in' => 'query', + 'schema' => ['description' => '任务ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '0586df512c8b4bb382d7d9a6a01b5854'], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求的唯一id,用于后续排查问题使用', - 'type' => 'string', - 'example' => 'DC2DCCC9-C3DF-4F59-8D8E-78185729F16D', - ], - 'Code' => [ - 'description' => '状态码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '返回信息。', - 'type' => 'string', - 'example' => 'ok', - ], - 'Data' => [ - 'description' => '数据内容', - 'type' => 'object', - 'properties' => [ - 'Status' => [ - 'description' => '任务状态', - 'type' => 'string', - 'example' => 'ready', - ], - 'TranslatedText' => [ - 'description' => '翻译内容', - 'type' => 'string', - 'example' => 'hello', - ], - 'WordCount' => [ - 'description' => '原文的字符数', - 'type' => 'string', - 'example' => '2', - ], - 'DetectedLanguage' => [ - 'description' => '源语言传入auto时,语种识别后的源语言代码', - 'type' => 'string', - 'example' => 'zh', - ], - ], - ], + 'Status' => ['description' => '任务状态。', 'type' => 'string', 'example' => 'translated'], + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => '12952E92-FDF3-4D3C-88E3-242D72BA7150'], + 'TranslateFileUrl' => ['description' => '翻译后的文件下载地址。', 'type' => 'string', 'example' => 'http://translateFileUrl'], + 'TranslateErrorCode' => ['description' => '任务错误码。', 'type' => 'string', 'example' => 'Error'], + 'PageCount' => ['description' => '文档页数。', 'type' => 'integer', 'format' => 'int32', 'example' => '20'], + 'TaskId' => ['description' => '任务ID。', 'type' => 'string', 'example' => '0586df512c8b4bb382d7d9a6a01b5854'], + 'TranslateErrorMessage' => ['description' => '任务错误信息。', 'type' => 'string', 'example' => 'Fail to get the page number of document.'], ], + 'description' => '', ], ], ], 'errorCodes' => [ 109 => [ - [ - 'errorCode' => 'System.SubNotPermission', - 'errorMessage' => 'The sub account is not authorized to perform the operation.', - ], + ['errorCode' => '10009', 'errorMessage' => '子账号没有权限', 'description' => ''], + ], + [ + ['errorCode' => '10010', 'errorMessage' => '账号没有开通服务', 'description' => ''], + ], + [ + ['errorCode' => '10011', 'errorMessage' => '子账号服务失败', 'description' => ''], + ], + [ + ['errorCode' => '10012', 'errorMessage' => '翻译服务调用失败', 'description' => ''], + ], + [ + ['errorCode' => '10013', 'errorMessage' => '账号服务没有开通或者欠费', 'description' => ''], + ], + 199 => [ + ['errorCode' => '19999', 'errorMessage' => 'An unknown error occurred.', 'description' => ''], ], 400 => [ - [ - 'errorCode' => 'Parameter.SourceLangError', - 'errorMessage' => 'Source languages are not supported.', - ], - [ - 'errorCode' => 'Parameter.TargetLangError', - 'errorMessage' => 'Target languages are not supported.', - ], - [ - 'errorCode' => 'System.AccountNotActivated', - 'errorMessage' => 'The account has not activated the service.', - ], - [ - 'errorCode' => 'System.AccountNotActivatedOrInArrears', - 'errorMessage' => 'The service is not activated or the account has an outstanding balance.', - ], - [ - 'errorCode' => 'System.LanguageNotSupported', - 'errorMessage' => 'The specified language pair is not supported.', - ], - [ - 'errorCode' => 'System.ParameterError', - 'errorMessage' => 'Some required parameters are missing.', - ], - [ - 'errorCode' => 'System.StringTooLong', - 'errorMessage' => 'The maximum length of the specified string is exceeded.', - ], + ['errorCode' => '10021', 'errorMessage' => 'The parameter is invalid.', 'description' => '参数无效。'], + ['errorCode' => 'InvalidAccountStatus', 'errorMessage' => 'The Machine Translation service has not been activated.', 'description' => '用户未开通机器翻译服务。'], ], - 403 => [ - [ - 'errorCode' => 'System.subNotPermission', - 'errorMessage' => 'The sub-account is not authorized to perform the operation.', - ], + 404 => [ + ['errorCode' => '10025', 'errorMessage' => 'The specified task does not exist.', 'description' => '指定的任务不存在。'], ], - 500 => [ - [ - 'errorCode' => 'System.Error', - 'errorMessage' => 'A system error occurred.', - ], - [ - 'errorCode' => 'System.LanguageDetectError', - 'errorMessage' => 'An error occurred while detecting the language.', - ], - [ - 'errorCode' => 'System.RequestTimeOut', - 'errorMessage' => 'The request has timed out.', - ], - [ - 'errorCode' => 'System.SubServiceFailed', - 'errorMessage' => 'Sub-account service failed.', - ], - [ - 'errorCode' => 'System.TranslateError', - 'errorMessage' => 'An error occurred while translating.', - ], - [ - 'errorCode' => 'System.TranslateServiceCallFailed', - 'errorMessage' => 'Failed to call the translation service.', - ], - [ - 'errorCode' => 'System.unknownError', - 'errorMessage' => 'An unknown error occurred.', - ], - [ - 'errorCode' => 'System.UrlDecodingError', - 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', + ], + 'title' => '查询文档翻译任务', + 'description' => '请确保在使用该接口前,已充分了解文档翻译产品的收费方式和价格'."\n" + .'> 仅支持通过GET方式调用', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => ' ', + 'extraInfo' => ' ', + 'changeSet' => [ + ['createdAt' => '2022-11-11T08:44:01.000Z', 'description' => '错误码发生变更'], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetDocTranslateTask', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"DC2DCCC9-C3DF-4F59-8D8E-78185729F16D\\",\\n \\"Code\\": 200,\\n \\"Message\\": \\"ok\\",\\n \\"Data\\": {\\n \\"Status\\": \\"ready\\",\\n \\"TranslatedText\\": \\"hello\\",\\n \\"WordCount\\": \\"2\\",\\n \\"DetectedLanguage\\": \\"zh\\"\\n }\\n}","type":"json"}]', - 'title' => '获取文本异步翻译任务', - 'description' => '通过jobID获取对应的异步任务翻译内容', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"Status\\": \\"translated\\",\\n \\"RequestId\\": \\"12952E92-FDF3-4D3C-88E3-242D72BA7150\\",\\n \\"TranslateFileUrl\\": \\"http://translateFileUrl\\",\\n \\"TranslateErrorCode\\": \\"Error\\",\\n \\"PageCount\\": 20,\\n \\"TaskId\\": \\"0586df512c8b4bb382d7d9a6a01b5854\\",\\n \\"TranslateErrorMessage\\": \\"Fail to get the page number of document.\\"\\n}","errorExample":""},{"type":"xml","example":"\\n translated\\n Fail to get the page number of document.\\n 0586df512c8b4bb382d7d9a6a01b5854\\n 12952E92-FDF3-4D3C-88E3-242D72BA7150\\n 20\\n http://translateFileUrl\\n Error\\n","errorExample":""}]', ], - 'GetDetectLanguage' => [ - 'summary' => '语种识别API说明文档。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'GetImageDiagnose' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], 'operationType' => 'read', - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - 'tenantRelevance' => 'publicInformation', - ], + 'deprecated' => false, + 'systemTags' => ['operationType' => 'get'], 'parameters' => [ [ - 'name' => 'SourceText', + 'name' => 'Url', 'in' => 'formData', - 'schema' => [ - 'description' => '待识别的语种', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => '你好', - ], + 'schema' => ['description' => '图片链接', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'http://xxxxx.oss-cn-shenzhen.aliyuncs.com/jd/41209/xxxxx.jpg'], + ], + [ + 'name' => 'Extra', + 'in' => 'formData', + 'schema' => ['description' => '- 格式内容:{'."\n" + .' "product_id": "1",'."\n" + .' "platform": "ae"'."\n" + .'}'."\n" + .'- product_id 商品id'."\n" + .'- platform 商品所属平台,支持ae/icbu/lazada', 'type' => 'string', 'required' => false, 'example' => '{ "product_id": "1", "platform": "ae" }'], ], ], 'responses' => [ @@ -1571,589 +1032,349 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'DetectedLanguage' => [ - 'description' => '识别成功的语种', - 'type' => 'string', - 'example' => 'zh', - ], - 'RequestId' => [ - 'description' => '请求ID', - 'type' => 'string', - 'example' => '0C5EC1EC-1A06-4D60-97E6-4D41350945E4', - ], - 'LanguageProbabilities' => [ - 'type' => 'string', + 'Code' => ['description' => '状态码,正常请求返回200', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '错误的时候返回错误信息', 'type' => 'string', 'example' => 'ok'], + 'RequestId' => ['description' => '请求唯一串', 'type' => 'string', 'example' => 'DC2DCCC9-C3DF-4F59-8D8E-78185729F16D'], + 'Data' => [ + 'description' => '返回的结果', + 'type' => 'object', + 'properties' => [ + 'Language' => ['description' => '图片中的文字识别后的语种', 'type' => 'string', 'example' => 'zh'], + ], ], ], + 'description' => '', ], ], ], 'errorCodes' => [ 101 => [ - [ - 'errorCode' => '10001', - 'errorMessage' => 'The request has timed out.', - ], + ['errorCode' => 'System.RequestTimeOut', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], [ - [ - 'errorCode' => '10002', - 'errorMessage' => 'A system error occurred.', - ], + ['errorCode' => 'System.Error', 'errorMessage' => 'A system error occurred.', 'description' => ''], ], [ - [ - 'errorCode' => '10003', - 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', - ], + ['errorCode' => 'System.UrlDecodingError', 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', 'description' => ''], ], [ - [ - 'errorCode' => '10004', - 'errorMessage' => 'Some required parameters are missing.', - ], + ['errorCode' => 'System.ParameterError', 'errorMessage' => 'Some required parameters are missing.', 'description' => ''], ], [ - [ - 'errorCode' => '10005', - 'errorMessage' => 'The specified language pair is not supported.', - ], + ['errorCode' => 'System.LanguageNotSupported', 'errorMessage' => 'The specified language pair is not supported.', 'description' => ''], ], [ - [ - 'errorCode' => '10006', - 'errorMessage' => 'An error occurred while detecting the language.', - ], + ['errorCode' => 'System.LanguageDetectError', 'errorMessage' => 'An error occurred while detecting the language.', 'description' => ''], ], [ - [ - 'errorCode' => '10007', - 'errorMessage' => 'An error occurred while translating.', - ], + ['errorCode' => 'System.TranslateError', 'errorMessage' => 'An error occurred while translating.', 'description' => ''], ], [ - [ - 'errorCode' => '10008', - 'errorMessage' => 'The specified string is too long.', - ], + ['errorCode' => 'System.StringTooLong', 'errorMessage' => 'The maximum length of the specified string is exceeded.', 'description' => ''], ], [ - [ - 'errorCode' => '10009', - 'errorMessage' => '子账号没有权限', - ], + ['errorCode' => 'System.subNotPermission', 'errorMessage' => 'The sub-account is not authorized to perform the operation.', 'description' => ''], ], [ - [ - 'errorCode' => '10010', - 'errorMessage' => '账号没有开通服务', - ], + ['errorCode' => 'System.AccountNotActivated', 'errorMessage' => 'The account has not activated the service.', 'description' => ''], ], [ - [ - 'errorCode' => '10011', - 'errorMessage' => '子账号服务失败', - ], + ['errorCode' => 'System.SubServiceFailed', 'errorMessage' => 'Sub-account service failed.', 'description' => ''], ], [ - [ - 'errorCode' => '10012', - 'errorMessage' => '翻译服务调用失败', - ], + ['errorCode' => 'System.TranslateServiceCallFailed', 'errorMessage' => 'Failed to call the translation service.', 'description' => ''], ], [ - [ - 'errorCode' => '10013', - 'errorMessage' => '账号服务没有开通或者欠费', - ], + ['errorCode' => 'System.AccountNotActivatedOrInArrears', 'errorMessage' => 'The service is not activated or the account has an outstanding balance.', 'description' => ''], ], 199 => [ - [ - 'errorCode' => '19999', - 'errorMessage' => 'An unknown error occurred.', - ], - ], - 400 => [ - [ - 'errorCode' => 'System.ParameterError', - 'errorMessage' => 'Some required parameters are missing.', - ], - ], - 503 => [ - [ - 'errorCode' => 'System.Error', - 'errorMessage' => 'A system error occurred.', - ], - [ - 'errorCode' => 'Internal.Error', - 'errorMessage' => 'The internal service connection timeout, please try again later.', - ], + ['errorCode' => 'System.unknownError', 'errorMessage' => 'An unknown error occurred.', 'description' => ''], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"DetectedLanguage\\": \\"zh\\",\\n \\"RequestId\\": \\"0C5EC1EC-1A06-4D60-97E6-4D41350945E4\\",\\n \\"LanguageProbabilities\\": \\"\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 0C5EC1EC-1A06-4D60-97E6-4D41350945E4\\n zh\\n","errorExample":""}]', - 'title' => '语种识别', - 'description' => '1、字符长度限制5000,调用接口QPS限制50;如有扩展需求,请与我们联系,钉钉群号:23369411'."\n" - ."\n" - .'2、请确保在使用该接口前,已充分了解通用版翻译产品的收费方式和价格', + 'title' => '图片诊断', + 'summary' => '能够识别图片中的文字的语种。', + 'description' => '>该接口已计划下线,不建议继续调用。>', 'requestParamsDescription' => ' ', - 'responseParamsDescription' => '公共请求参数参见[《RPC 调用机制》公共请求参数组装方案](https://help.aliyun.com/document_detail/315526.html?spm=a2c4g.158244.0.0.34b627b5qv5gmt#sectiondiv-qq5-utu-r7a)', + 'responseParamsDescription' => ' ', 'extraInfo' => ' ', - ], - 'TranslateImage' => [ - 'summary' => '将图片上的文字从一种语言翻译成另一种语言,并输出一张尽可能忠于原图的新图片。', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetImageDiagnose', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"ok\\",\\n \\"RequestId\\": \\"DC2DCCC9-C3DF-4F59-8D8E-78185729F16D\\",\\n \\"Data\\": {\\n \\"Language\\": \\"zh\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"DC2DCCC9-C3DF-4F59-8D8E-78185729F16D\\nok\\n\\n zh\\n\\n200","errorExample":""}]', + ], + 'GetImageTranslate' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], - [ - 'BearerToken' => [], - ], ], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'none', - 'riskType' => 'none', - 'chargeType' => 'free', - 'tenantRelevance' => 'publicInformation', - ], + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'ImageUrl', - 'in' => 'formData', - 'schema' => [ - 'description' => '原图 URL,跟 Base64 不能同时为空,优先取 Base64。', - 'type' => 'string', - 'required' => false, - 'example' => 'https://example.com/example.jpg', - ], - ], - [ - 'name' => 'ImageBase64', + 'name' => 'Url', 'in' => 'formData', - 'schema' => [ - 'description' => '原图 Base64,跟 URL 不能同时为空,优先取 Base64。', - 'type' => 'string', - 'required' => false, - 'example' => '/9j/4...H/9k=', - ], + 'schema' => ['description' => '需要翻译的图片链接', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'http://xxxxxxx.oss-cn-shenzhen.aliyuncs.com/xxxxxx.jpg'], ], [ 'name' => 'SourceLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '源语种,支持的[语种参考](https://help.aliyun.com/document_detail/163584.html),必填(请忽略表格中“是否必填”中的“否”)', - 'type' => 'string', - 'required' => false, - 'example' => 'zh', - ], + 'schema' => ['description' => '图片中的文字语种,[语向支持以及语言代码](https://www.alibabacloud.com/help/zh/doc-detail/182310.html)'."\n" + .'[语向支持以及语言代码](https://help.aliyun.com/document_detail/182310.html?spm=a2c4g.11186623.6.543.106340eblV3QUo)', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'zh'], ], [ 'name' => 'TargetLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '目标语种,支持的[语种参考](https://help.aliyun.com/document_detail/163584.html),必填(请忽略表格中“是否必填”中的“否”)', - 'type' => 'string', - 'required' => false, - 'example' => 'en', - ], - ], - [ - 'name' => 'Field', - 'in' => 'formData', - 'schema' => [ - 'description' => '翻译领域, 可选值如下。'."\n" - .'- `general`: 通用图片翻译'."\n" - .'- `e-commerce`: 电商领域图片翻译'."\n" - ."\n" - .'默认及未识别领域均按通用图片翻译处理。', - 'type' => 'string', - 'required' => false, - 'enumValueTitles' => [], - 'example' => 'general', - ], + 'schema' => ['description' => '图片中文字翻译后的语种,[语向支持以及语言代码](https://www.alibabacloud.com/help/zh/doc-detail/182310.html)'."\n" + .'[语向支持以及语言代码](https://help.aliyun.com/document_detail/182310.html?spm=a2c4g.11186623.6.543.106340eblV3QUo)', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'en'], ], [ - 'name' => 'Ext', + 'name' => 'Extra', 'in' => 'formData', - 'schema' => [ - 'description' => '扩展信息, JSON String 格式,里面可以包含的字段如下。'."\n" - .'- `needEditorData`: 取值为字符串 `true`/`false`,默认为`false`,是否需要在结果中返回图片翻译译后编辑器数据,仅用于[自行接入图片翻译译后编辑器](https://help.aliyun.com/document_detail/2507676.html)时,获取数据使用'."\n" - .'- `ignoreEntityRecognize`:取值为字符串 `true`/`false`,默认为 `false`,电商领域图片翻译会自动判断文字是否在图片中的商品主体上,如果在,则略过翻译;使用本字段来控制是否进行上述判断,本字段对通用图片翻译无效', - 'type' => 'string', - 'required' => false, - 'example' => '{"needEditorData": "false", "ignoreEntityRecognize": "true"}', - ], + 'schema' => ['description' => '- 以下JSON内容格式,不关注的都可以不用传递,都是可选参数'."\n" + ."\n" + .'- JSON 格式内容:'."\n" + .'```'."\n" + .'{'."\n" + .' "have_ocr": "false",'."\n" + .' "without_text":"true",'."\n" + .' "have_psd": "false",'."\n" + .' "ignore_entity": "false"'."\n" + .'}'."\n" + .'```'."\n" + .'- have_ocr 通过true/false 控制是否返回ocr结果,true:需要,false:不需要'."\n" + .'- without_text 控制是否需要擦除图片中的文字,true:需要,false:不需要'."\n" + .'- have_psd 用于图片编辑器,psd数据渲染编辑器'."\n" + .'- ignore_entity 是否忽略实体识别,true:忽略实体识别,false:不忽略', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => '{"have_ocr": "false", "without_text":"true", "have_psd": "false", "ignore_entity": "false"}'], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'description' => '结果', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '请求标识', - 'type' => 'string', - 'example' => 'D774D33D-F1CB-5A2C-A787-E0A2179239CE', - ], - 'Code' => [ - 'description' => '请求结果状态码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '请求错误信息', - 'type' => 'string', - 'example' => 'Error Message', - ], + 'Code' => ['description' => '状态码,200 表示正常', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '错误的时候,返回的错误信息', 'type' => 'string', 'example' => 'ok'], + 'RequestId' => ['description' => '请求的唯一串', 'type' => 'string', 'example' => 'A41F6E25-8520-4AF0-90EF-AF7E32840108'], 'Data' => [ - 'description' => '图片翻译结果结构体', + 'description' => '返回的数据内容', 'type' => 'object', 'properties' => [ - 'InPaintingUrl' => [ - 'description' => '图片译后编辑器背景图', - 'type' => 'string', - 'example' => 'https://example.com/example.jpg', - ], - 'TemplateJson' => [ - 'description' => '图片译后编辑器模版数据', - 'type' => 'string', - 'example' => 'Editor Template Json String', - ], - 'FinalImageUrl' => [ - 'description' => '最终翻译结果图片 URL', - 'type' => 'string', - 'example' => 'https://example.com/example.jpg', - ], + 'Url' => ['description' => '翻译后的图片链接', 'type' => 'string', 'example' => 'https://ae01.alicdn.com/kf/xxxxx.jpeg'], + 'Orc' => ['description' => 'orc 识别后的内容', 'type' => 'string', 'example' => '{"text":"P翼-至草款","width":750,"wordNum":10}'], + 'PictureEditor' => ['description' => '用于图片编辑器渲染的psd数据', 'type' => 'string', 'example' => '{"text":"P翼-至草款","width":750,"wordNum":10}'], ], ], ], + 'description' => '', ], ], ], 'errorCodes' => [ - 400 => [ - [ - 'errorCode' => 'Parameter.SourceLangError', - 'errorMessage' => 'Source languages are not supported.', - ], - [ - 'errorCode' => 'Parameter.TargetLangError', - 'errorMessage' => 'Target languages are not supported.', - ], + 101 => [ + ['errorCode' => 'System.RequestTimeOut', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.subNotPermission', - 'errorMessage' => 'The sub-account is not authorized to perform the operation.', - ], - [ - 'errorCode' => 'System.AccountNotActivated', - 'errorMessage' => 'The account has not activated the service.', - ], + ['errorCode' => 'System.Error', 'errorMessage' => 'A system error occurred.', 'description' => ''], ], - 406 => [ - [ - 'errorCode' => 'System.ParameterError', - 'errorMessage' => 'Some required parameters are missing.', - ], - [ - 'errorCode' => 'Parameter.ImageUrlError', - 'errorMessage' => 'Failed to obtain the image from the URL.', - ], - [ - 'errorCode' => 'Parameter.ImageSizeError', - 'errorMessage' => 'Image size should be within 15px to 8192px.', - ], - [ - 'errorCode' => 'Parameter.ImageFormatError', - 'errorMessage' => 'The image format is not supported.', - ], - [ - 'errorCode' => 'Parameter.ImageFileSizeError', - 'errorMessage' => 'The image file size should be within 10 MB.', - ], + [ + ['errorCode' => 'System.UrlDecodingError', 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', 'description' => ''], ], - 500 => [ - [ - 'errorCode' => 'System.unknownError', - 'errorMessage' => 'An unknown error occurred.', - ], - [ - 'errorCode' => 'ImageTranslate.TranslationError', - 'errorMessage' => 'Image translation error.', - ], - [ - 'errorCode' => 'ImageTranslate.FusionError', - 'errorMessage' => 'Image fusion error.', - ], - [ - 'errorCode' => 'ImageTranslate.EraseError', - 'errorMessage' => 'Image erasing error.', - ], - [ - 'errorCode' => 'ImageTranslate.TextTranslationError', - 'errorMessage' => 'Text translation error.', - ], - [ - 'errorCode' => 'ImageTranslate.TextToParagraphError', - 'errorMessage' => 'Text to paragraph error.', - ], + [ + ['errorCode' => 'System.ParameterError', 'errorMessage' => 'Some required parameters are missing.', 'description' => ''], ], - ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"D774D33D-F1CB-5A2C-A787-E0A2179239CE\\",\\n \\"Code\\": 200,\\n \\"Message\\": \\"Error Message\\",\\n \\"Data\\": {\\n \\"InPaintingUrl\\": \\"https://example.com/example.jpg\\",\\n \\"TemplateJson\\": \\"Editor Template Json String\\",\\n \\"FinalImageUrl\\": \\"https://example.com/example.jpg\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n 200\\n \\n https://example.com/example.jpg\\n \\n D774D33D-F1CB-5A2C-A787-E0A2179239CE\\n","errorExample":""}]', - 'title' => '图片翻译', - 'description' => '请确保在使用该接口前,已充分了解图片翻译产品的[收费方式和价格](https://help.aliyun.com/document_detail/163332.html)。'."\n" - ."\n" - .'该接口适用于**通用图片翻译**和**电商图片翻译**。'."\n" - .'如需调用证件翻译,请参考[证件翻译调用指南](https://help.aliyun.com/document_detail/2505939.html)。'."\n" - ."\n" - .'**图片限制**'."\n" - ."\n" - .'- 文件大小限制:10M'."\n" - .'- 像素限制:长宽比 < 10:1'."\n" - .'- 支持的格式:jpg, jpeg, png, bmp, gif(仅翻译第一帧), webp'."\n" - ."\n" - .'> 仅支持通过POST方式调用', - ], - 'TranslateImageBatch' => [ - 'summary' => '异步将一批图片上的文字从一种语言翻译成另一种语言,并分别输出新的图片。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], - 'security' => [ [ - 'AK' => [], + ['errorCode' => 'System.LanguageNotSupported', 'errorMessage' => 'The specified language pair is not supported.', 'description' => ''], ], - ], - 'operationType' => 'read', - 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'none', - 'riskType' => 'none', - 'chargeType' => 'free', - 'tenantRelevance' => 'publicInformation', - ], - 'parameters' => [ [ - 'name' => 'ImageUrls', - 'in' => 'formData', - 'schema' => [ - 'description' => '原图 URL,多张图片使用半角逗号进行分割;单次请求 URL 总数不能超过 20,且相同的 URL 只会被处理一次', - 'type' => 'string', - 'required' => true, - 'example' => 'https://example.com/1.jpg,https://example.com/2.jpg,https://example.com/3.jpg', - ], + ['errorCode' => 'System.LanguageDetectError', 'errorMessage' => 'An error occurred while detecting the language.', 'description' => ''], ], [ - 'name' => 'SourceLanguage', - 'in' => 'formData', - 'schema' => [ - 'description' => '源语种,支持的语种及对应的代码请参考[语言code](https://help.aliyun.com/document_detail/163584.html)', - 'type' => 'string', - 'required' => true, - 'example' => 'zh', - ], + ['errorCode' => 'System.TranslateError', 'errorMessage' => 'An error occurred while translating.', 'description' => ''], ], [ - 'name' => 'TargetLanguage', - 'in' => 'formData', - 'schema' => [ - 'description' => '目标语种,支持的语种及对应的代码请参考[语言code](https://help.aliyun.com/document_detail/163584.html)', - 'type' => 'string', - 'required' => true, - 'example' => 'en', - ], + ['errorCode' => 'System.StringTooLong', 'errorMessage' => 'The maximum length of the specified string is exceeded.', 'description' => ''], ], [ - 'name' => 'Ext', - 'in' => 'formData', - 'schema' => [ - 'description' => '扩展信息, JSON String 格式,里面可以包含的字段如下。'."\n" - .'- `needEditorData`:取值为字符串 `true`/`false`,默认为`false`,是否需要在结果中返回图片翻译译后编辑器数据,仅用于[自行接入图片翻译译后编辑器](https://help.aliyun.com/document_detail/2507676.html)时,获取数据使用'."\n" - .'- `ignoreEntityRecognize`:取值为字符串 `true`/`false`,默认为 `false`,电商领域图片翻译会自动判断文字是否在图片中的商品主体上,如果在,则略过翻译;使用本字段来控制是否进行上述判断,本字段对通用图片翻译无效', - 'type' => 'string', - 'required' => false, - 'example' => '{"needEditorData": "false", "ignoreEntityRecognize": "true"}', - ], + ['errorCode' => 'System.subNotPermission', 'errorMessage' => 'The sub-account is not authorized to perform the operation.', 'description' => ''], ], [ - 'name' => 'CustomTaskId', - 'in' => 'formData', - 'schema' => [ - 'description' => '自定义任务 ID,用于防止短时间误操作重复请求;3 分钟内,相同自定义任务 ID 的请求只会被处理一次', - 'type' => 'string', - 'required' => false, - 'example' => 'my_awesome_task_1', + ['errorCode' => 'System.AccountNotActivated', 'errorMessage' => 'The account has not activated the service.', 'description' => ''], + ], + [ + ['errorCode' => 'System.SubServiceFailed', 'errorMessage' => 'Sub-account service failed.', 'description' => ''], + ], + [ + ['errorCode' => 'System.TranslateServiceCallFailed', 'errorMessage' => 'Failed to call the translation service.', 'description' => ''], + ], + [ + ['errorCode' => 'System.AccountNotActivatedOrInArrears', 'errorMessage' => 'The service is not activated or the account has an outstanding balance.', 'description' => ''], + ], + 199 => [ + ['errorCode' => 'System.unknownError', 'errorMessage' => 'An unknown error occurred.', 'description' => ''], + ], + ], + 'title' => '商品图片智能翻译', + 'summary' => '包含文字识别、文本翻译、文字回填等能力。', + 'description' => '>该接口已计划下线,不建议继续调用。>'."\n" + .'替代接口为[图片翻译](https://help.aliyun.com/zh/machine-translation/developer-reference/api-alimt-2018-10-12-translateimage?spm=a2c4g.11186623.0.0.625a288aSx2On0)。', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => ' ', + 'extraInfo' => ' ', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetImageTranslate', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"ok\\",\\n \\"RequestId\\": \\"A41F6E25-8520-4AF0-90EF-AF7E32840108\\",\\n \\"Data\\": {\\n \\"Url\\": \\"https://ae01.alicdn.com/kf/xxxxx.jpeg\\",\\n \\"Orc\\": \\"{\\\\\\"text\\\\\\":\\\\\\"P翼-至草款\\\\\\",\\\\\\"width\\\\\\":750,\\\\\\"wordNum\\\\\\":10}\\",\\n \\"PictureEditor\\": \\"{\\\\\\"text\\\\\\":\\\\\\"P翼-至草款\\\\\\",\\\\\\"width\\\\\\":750,\\\\\\"wordNum\\\\\\":10}\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"ok\\nA41F6E25-8520-4AF0-90EF-AF7E32840108\\n\\n {\\"text\\":\\"P翼-至草款\\",\\"width\\":750,\\"wordNum\\":10}\\n {\\"text\\":\\"P翼-至草款\\",\\"width\\":750,\\"wordNum\\":10}\\n https://ae01.alicdn.com/kf/xxxxx.jpeg\\n\\n200","errorExample":""}]', + ], + 'GetImageTranslateTask' => [ + 'summary' => '通过任务ID获取异步图片翻译结果。', + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], + 'security' => [ [ - 'name' => 'Field', + 'AK' => [], + ], + ], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'TaskId', 'in' => 'formData', - 'schema' => [ - 'description' => '翻译领域, 可选值如下。'."\n" - .'- `general`:通用图片翻译'."\n" - .'- `e-commerce`:电商领域图片翻译'."\n" - ."\n" - .'默认及未识别领域均按通用图片翻译处理。', - 'type' => 'string', - 'required' => false, - 'example' => 'general', - ], + 'schema' => ['description' => '异步图片翻译任务Id', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'xxxxxx'], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => '请求结果结构', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求标识', - 'type' => 'string', - 'example' => 'D774D33D-F1CB-5A2C-A787-E0A2179239CE', - ], - 'Message' => [ - 'description' => '请求信息', - 'type' => 'string', - 'example' => 'OK', - ], - 'Code' => [ - 'description' => '请求结果状态码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], + 'Code' => ['description' => '状态码,200 表示正常'."\n", 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '错误的时候,返回的错误信息'."\n", 'type' => 'string', 'example' => 'ok'], + 'RequestId' => ['description' => '请求的唯一串'."\n", 'type' => 'string', 'example' => 'xxxxxxx'], 'Data' => [ - 'description' => '数据内容', + 'description' => '返回的数据内容'."\n", 'type' => 'object', 'properties' => [ - 'TaskId' => [ - 'description' => '任务 ID,用于后续获取翻译结果', - 'type' => 'string', - 'example' => 'EEA28E6D-4828-5031-BD8C-8FF1B3216842', - ], + 'ImageData' => ['description' => '- 图片翻译结构化数据'."\n" + ."\n" + .'```'."\n" + .'['."\n" + .' {'."\n" + .' "errorCode": "200",'."\n" + .' "sourceUrl": "https://img.alicdn.com/imgextra/i3/2838892713/O1CN01AJHAFq1Vub9eKog8t_!!2838892713.jpg",'."\n" + .' "success": true,'."\n" + .' "topRequestId": "of8hp0d9ne81",'."\n" + .' "url": "https://ae01.alicdn.com/kf/H86dc34f146e1488aa55a0435ebd1775cu.jpeg"'."\n" + .' },'."\n" + .' {'."\n" + .' "errorCode": "200",'."\n" + .' "sourceUrl": "https://img.alicdn.com/imgextra/i2/2838892713/O1CN01Ko5Mxu1Vub9Y85K6p_!!2838892713.jpg",'."\n" + .' "success": true,'."\n" + .' "topRequestId": "of8hp0d9ne81",'."\n" + .' "url": "https://ae01.alicdn.com/kf/H1cc74cbdfc554b278dfaa8b2ede33f48D.jpeg"'."\n" + .' }'."\n" + .']'."\n" + .'```'."\n" + ."\n" + .'- sourceURL 原始图片地址'."\n" + .'- URL翻译后的图片地址', 'type' => 'string', 'example' => '[{xxxxxx}]'], ], ], ], + 'description' => '', ], ], ], 'errorCodes' => [ 101 => [ - [ - 'errorCode' => 'System.RequestTimeOut', - 'errorMessage' => 'The request has timed out.', - ], + ['errorCode' => 'System.RequestTimeOut', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.Error', - 'errorMessage' => 'A system error occurred.', - ], + ['errorCode' => 'System.Error', 'errorMessage' => 'A system error occurred.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.UrlDecodingError', - 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', - ], + ['errorCode' => 'System.UrlDecodingError', 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.ParameterError', - 'errorMessage' => 'Some required parameters are missing.', - ], + ['errorCode' => 'System.ParameterError', 'errorMessage' => 'Some required parameters are missing.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.LanguageNotSupported', - 'errorMessage' => 'The specified language pair is not supported.', - ], + ['errorCode' => 'System.LanguageNotSupported', 'errorMessage' => 'The specified language pair is not supported.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.LanguageDetectError', - 'errorMessage' => 'An error occurred while detecting the language.', - ], + ['errorCode' => 'System.LanguageDetectError', 'errorMessage' => 'An error occurred while detecting the language.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.TranslateError', - 'errorMessage' => 'An error occurred while translating.', - ], + ['errorCode' => 'System.TranslateError', 'errorMessage' => 'An error occurred while translating.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.StringTooLong', - 'errorMessage' => 'The maximum length of the specified string is exceeded.', - ], + ['errorCode' => 'System.StringTooLong', 'errorMessage' => 'The maximum length of the specified string is exceeded.', 'description' => ''], ], 110 => [ - [ - 'errorCode' => 'System.AccountNotActivated', - 'errorMessage' => 'The account has not activated the service.', - ], + ['errorCode' => 'System.AccountNotActivated', 'errorMessage' => 'The account has not activated the service.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.SubServiceFailed', - 'errorMessage' => 'Sub-account service failed.', - ], + ['errorCode' => 'System.SubServiceFailed', 'errorMessage' => 'Sub-account service failed.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.TranslateServiceCallFailed', - 'errorMessage' => 'Failed to call the translation service.', - ], + ['errorCode' => 'System.TranslateServiceCallFailed', 'errorMessage' => 'Failed to call the translation service.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.AccountNotActivatedOrInArrears', - 'errorMessage' => 'The service is not activated or the account has an outstanding balance.', - ], + ['errorCode' => 'System.AccountNotActivatedOrInArrears', 'errorMessage' => 'The service is not activated or the account has an outstanding balance.', 'description' => ''], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + 'title' => '获取异步图片翻译结果', + 'description' => '>该接口已计划下线,不建议继续调用。>', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => ' ', + 'extraInfo' => ' ', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetImageTranslateTask', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"D774D33D-F1CB-5A2C-A787-E0A2179239CE\\",\\n \\"Message\\": \\"OK\\",\\n \\"Code\\": 200,\\n \\"Data\\": {\\n \\"TaskId\\": \\"EEA28E6D-4828-5031-BD8C-8FF1B3216842\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n D774D33D-F1CB-5A2C-A787-E0A2179239CE\\n OK\\n 200\\n \\n EEA28E6D-4828-5031-BD8C-8FF1B3216842\\n \\n","errorExample":""}]', - 'title' => '图片异步批量翻译', - 'description' => '请确保在使用该接口前,已充分了解图片翻译产品的[收费方式和价格](https://help.aliyun.com/document_detail/163332.html)。'."\n" - ."\n" - .'该接口适用于**通用图片翻译**和**电商图片翻译**;如需调用证件翻译,请参考[证件翻译调用指南](https://help.aliyun.com/document_detail/163527.html)。'."\n" - ."\n" - .'**图片限制**'."\n" - ."\n" - .'- 文件大小限制:10MB'."\n" - .'- 像素限制:长宽比 < 10:1'."\n" - .'- 支持的格式:jpg, jpeg, png, bmp, gif(仅翻译第一帧), webp', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"ok\\",\\n \\"RequestId\\": \\"xxxxxxx\\",\\n \\"Data\\": {\\n \\"ImageData\\": \\"[{xxxxxx}]\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"","errorExample":""}]', ], - 'GetTranslateImageBatchResult' => [ - 'summary' => '获取图片异步批量翻译的结果。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'GetTitleDiagnose' => [ + 'summary' => '通过商品标题质量诊断服务,产出可视化的标题质量分,便于卖家对现有的商品标题质量有实际体感。', + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -2161,363 +1382,187 @@ ], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'none', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'TaskId', + 'name' => 'Title', 'in' => 'formData', - 'schema' => [ - 'description' => '调用图片异步批量翻译接口获得的任务 ID', - 'type' => 'string', - 'required' => true, - 'example' => 'EEA28E6D-4828-5031-BD8C-8FF1B3216842', - ], + 'schema' => ['description' => '标题内容', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'Amroe Japan Comic Theme Uzumaki Naruto Namikaze Minato 3D Visual Cartoon 7 Color USB Touch'], + ], + [ + 'name' => 'Language', + 'in' => 'formData', + 'schema' => ['description' => '标题文字的语种,[语向支持以及语言代码](https://help.aliyun.com/document_detail/182310.html?spm=a2c4g.11186623.6.543.106340eblV3QUo)[语向支持以及语言代码](https://www.alibabacloud.com/help/zh/doc-detail/182310.html)'."\n", 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'zh'], + ], + [ + 'name' => 'Platform', + 'in' => 'formData', + 'schema' => ['description' => '商品标题所属平台,支持ae/icbu/lazada', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'ae'], + ], + [ + 'name' => 'CategoryId', + 'in' => 'formData', + 'schema' => ['description' => '类目id,如没有类目数据则传入0', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '123'], + ], + [ + 'name' => 'Extra', + 'in' => 'formData', + 'schema' => ['description' => '- 可选字段'."\n" + ."\n" + .'- 格式内容:{'."\n" + .' "product_id": "1",'."\n" + .' "platform": "ae"'."\n" + .'}'."\n" + .'- product_id 商品id'."\n" + .'- platform 商品所属平台,支持ae/icbu/lazada', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => '{ "product_id": "1", "platform": "ae" }'], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => '请求结果结构', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '请求结果状态码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '请求信息', - 'type' => 'string', - 'example' => 'OK', - ], - 'RequestId' => [ - 'description' => '请求标识', - 'type' => 'string', - 'example' => 'DACD263C-C068-5116-83EC-117245AA35CF', - ], + 'Code' => ['description' => '状态码,正常请求返回200', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '状态信息', 'type' => 'string', 'example' => 'ok'], + 'RequestId' => ['description' => '请求ID', 'type' => 'string', 'example' => 'DC2DCCC9-C3DF-4F59-8D8E-78185729F16D'], 'Data' => [ - 'description' => '数据内容', + 'description' => '返回具体内容', 'type' => 'object', 'properties' => [ - 'Result' => [ - 'description' => '翻译结果,当改批量翻译任务没有执行完毕时,该字段为空数组', - 'type' => 'array', - 'items' => [ - 'description' => '单张图片的翻译结果', - 'type' => 'object', - 'properties' => [ - 'InPaintingUrl' => [ - 'description' => '单张图片的译后编辑器背景图', - 'type' => 'string', - 'example' => 'https://example.com/example.jpg', - ], - 'FinalImageUrl' => [ - 'description' => '单张图片的翻译结果图 URL', - 'type' => 'string', - 'example' => 'https://example.com/example.jpg', - ], - 'TemplateJson' => [ - 'description' => '单张图片的译后编辑器模版数据', - 'type' => 'string', - 'example' => '{"TemplateJson": "Editor Template Json String "}', - ], - 'SourceImageUrl' => [ - 'description' => '单张图片的原图 URL', - 'type' => 'string', - 'example' => 'https://example.com/example.jpg', - ], - 'Code' => [ - 'description' => '单张图片的翻译状态码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '单张图片的翻译信息', - 'type' => 'string', - 'example' => 'OK', - ], - 'Success' => [ - 'description' => '单张图片是否翻译成功标识', - 'type' => 'boolean', - 'example' => 'true', - ], - ], - ], - ], - 'Status' => [ - 'description' => '标识当前任务的运行状态,可能的值及含义如下:'."\n" - ."\n" - .'- `created`:批量翻译任务创建成功,等待运行'."\n" - .'- `running`:批量翻译任务正在运行中'."\n" - .'- `finished`:批量翻译任务运行结束,图片均已翻译完毕,此时 `Result` 字段会包含每张图片的翻译结果'."\n" - .'- `invalid`:传入的任务 ID 非法,或者任务的翻译结果已经过期被清理', - 'type' => 'string', - 'example' => 'finished', - ], + 'DuplicateWords' => ['description' => '重复单词(包括单复数)', 'type' => 'string', 'example' => 'hi'], + 'ContainCoreClasses' => ['description' => '是否包含类目主词', 'type' => 'string', 'example' => 'true'], + 'WordCount' => ['description' => '总单词数', 'type' => 'string', 'example' => '10'], + 'LanguageQualityScore' => ['description' => '语言质量分', 'type' => 'string', 'example' => '2'], + 'AllUppercaseWords' => ['description' => '全部大写的单词', 'type' => 'string', 'example' => 'Boy'], + 'OverLengthLimit' => ['description' => '长度限制', 'type' => 'string', 'example' => '100'], + 'DisableWords' => ['description' => '敏感词', 'type' => 'string', 'example' => 'baba'], + 'NoFirstUppercaseList' => ['description' => '首字母未大写单词', 'type' => 'string', 'example' => 'no'], + 'TotalScore' => ['description' => '总分数', 'type' => 'string', 'example' => '3'], + 'WordSpelledCorrectError' => ['description' => '拼写错误单词', 'type' => 'string', 'example' => 'ahk'], ], ], ], + 'description' => '', ], ], ], 'errorCodes' => [ 101 => [ - [ - 'errorCode' => 'System.RequestTimeOut', - 'errorMessage' => 'The request has timed out.', - ], + ['errorCode' => 'System.RequestTimeOut', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.Error', - 'errorMessage' => 'A system error occurred.', - ], + ['errorCode' => 'System.Error', 'errorMessage' => 'A system error occurred.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.UrlDecodingError', - 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', - ], + ['errorCode' => 'System.UrlDecodingError', 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.ParameterError', - 'errorMessage' => 'Some required parameters are missing.', - ], + ['errorCode' => 'System.ParameterError', 'errorMessage' => 'Some required parameters are missing.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.LanguageNotSupported', - 'errorMessage' => 'The specified language pair is not supported.', - ], + ['errorCode' => 'System.LanguageNotSupported', 'errorMessage' => 'The specified language pair is not supported.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.LanguageDetectError', - 'errorMessage' => 'An error occurred while detecting the language.', - ], + ['errorCode' => 'System.LanguageDetectError', 'errorMessage' => 'An error occurred while detecting the language.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.TranslateError', - 'errorMessage' => 'An error occurred while translating.', - ], + ['errorCode' => 'System.TranslateError', 'errorMessage' => 'An error occurred while translating.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.StringTooLong', - 'errorMessage' => 'The maximum length of the specified string is exceeded.', - ], + ['errorCode' => 'System.StringTooLong', 'errorMessage' => 'The maximum length of the specified string is exceeded.', 'description' => ''], ], - 110 => [ - [ - 'errorCode' => 'System.AccountNotActivated', - 'errorMessage' => 'The account has not activated the service.', - ], + [ + ['errorCode' => 'System.subNotPermission', 'errorMessage' => 'The sub-account is not authorized to perform the operation.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.SubServiceFailed', - 'errorMessage' => 'Sub-account service failed.', - ], + ['errorCode' => 'System.AccountNotActivated', 'errorMessage' => 'The account has not activated the service.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.TranslateServiceCallFailed', - 'errorMessage' => 'Failed to call the translation service.', - ], + ['errorCode' => 'System.SubServiceFailed', 'errorMessage' => 'Sub-account service failed.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.AccountNotActivatedOrInArrears', - 'errorMessage' => 'The service is not activated or the account has an outstanding balance.', - ], + ['errorCode' => 'System.TranslateServiceCallFailed', 'errorMessage' => 'Failed to call the translation service.', 'description' => ''], + ], + [ + ['errorCode' => 'System.AccountNotActivatedOrInArrears', 'errorMessage' => 'The service is not activated or the account has an outstanding balance.', 'description' => ''], + ], + 199 => [ + ['errorCode' => 'System.unknownError', 'errorMessage' => 'An unknown error occurred.', 'description' => ''], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + 'title' => '标题诊断调用指南', + 'description' => '>该接口已计划下线,不建议继续调用。>', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => ' ', + 'extraInfo' => ' ', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetTitleDiagnose', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"OK\\",\\n \\"RequestId\\": \\"DACD263C-C068-5116-83EC-117245AA35CF\\",\\n \\"Data\\": {\\n \\"Result\\": [\\n {\\n \\"InPaintingUrl\\": \\"https://example.com/example.jpg\\",\\n \\"FinalImageUrl\\": \\"https://example.com/example.jpg\\",\\n \\"TemplateJson\\": \\"{\\\\\\"TemplateJson\\\\\\": \\\\\\"Editor Template Json String\\\\t\\\\\\"}\\",\\n \\"SourceImageUrl\\": \\"https://example.com/example.jpg\\",\\n \\"Code\\": 200,\\n \\"Message\\": \\"OK\\",\\n \\"Success\\": true\\n }\\n ],\\n \\"Status\\": \\"finished\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n 200\\n OK\\n DACD263C-C068-5116-83EC-117245AA35CF\\n \\n \\n https://example.com/example.jpg\\n https://example.com/example.jpg\\n {\\"TemplateJson\\": \\"Editor Template Json String\\t\\"}\\n https://example.com/example.jpg\\n 200\\n OK\\n true\\n \\n finished\\n \\n","errorExample":""}]', - 'title' => '图片异步批量翻译结果获取', - 'description' => '请确保在使用该接口前,已充分了解图片翻译产品的[收费方式和价格](https://help.aliyun.com/document_detail/163332.html)。'."\n" - ."\n" - .'图片异步批量翻译的结果,翻译完毕后,会保存 1 小时,过期后会被清理,请及时获取结果。', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"ok\\",\\n \\"RequestId\\": \\"DC2DCCC9-C3DF-4F59-8D8E-78185729F16D\\",\\n \\"Data\\": {\\n \\"DuplicateWords\\": \\"hi\\",\\n \\"ContainCoreClasses\\": \\"true\\",\\n \\"WordCount\\": \\"10\\",\\n \\"LanguageQualityScore\\": \\"2\\",\\n \\"AllUppercaseWords\\": \\"Boy\\",\\n \\"OverLengthLimit\\": \\"100\\",\\n \\"DisableWords\\": \\"baba\\",\\n \\"NoFirstUppercaseList\\": \\"no\\",\\n \\"TotalScore\\": \\"3\\",\\n \\"WordSpelledCorrectError\\": \\"ahk\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"DC2DCCC9-C3DF-4F59-8D8E-78185729F16D\\nok\\n\\n no\\n true\\n baba\\n 10\\n 100\\n 3\\n hi\\n ahk\\n Boy\\n 2\\n\\n200","errorExample":""}]', ], - 'CreateDocTranslateTask' => [ - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'GetTitleGenerate' => [ + 'summary' => '基于电商大数据,自动优化商品标题。', + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'write', + 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'create', - ], + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'SourceLanguage', + 'name' => 'Title', 'in' => 'formData', - 'schema' => [ - 'description' => '原文语言,[语言code参考](https://help.aliyun.com/document_detail/158269.html?spm=a2c4g.11186623.6.542.7da22b9fayuNoj)', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'en', - ], + 'schema' => ['description' => '标题内容', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '10pcs 80ml Kitchen Disposable'], ], [ - 'name' => 'TargetLanguage', + 'name' => 'Language', 'in' => 'formData', - 'schema' => [ - 'description' => '目标语言,[语言code参考](https://help.aliyun.com/document_detail/158269.html?spm=a2c4g.11186623.6.542.7da22b9fayuNoj)', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'zh', - ], + 'schema' => ['description' => '标题语种,[语向支持以及语言代码](https://help.aliyun.com/document_detail/182310.html)[语向支持以及语言代码](https://www.alibabacloud.com/help/zh/doc-detail/182310.html)'."\n", 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'en'], ], [ - 'name' => 'FileUrl', + 'name' => 'Platform', 'in' => 'formData', - 'schema' => [ - 'description' => '文档URL。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'http://fileUrl', - 'isFileTransferUrl' => true, - ], + 'schema' => ['description' => '商品标题所属平台,支持ae/icbu', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'ae'], ], [ - 'name' => 'Scene', + 'name' => 'CategoryId', 'in' => 'formData', - 'schema' => [ - 'description' => '场景,支持:通用(general)、商品标题(title)、商品详情(description)、买卖家沟通(message)、医疗(medical)、社交(social)、科技(tech)。', - 'type' => 'string', - 'required' => false, - 'docRequired' => false, - 'example' => 'general', - 'default' => 'general', - ], + 'schema' => ['description' => '类目ID,如没有类目数据则传入0', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '127896018'], ], [ - 'name' => 'CallbackUrl', + 'name' => 'HotWords', 'in' => 'formData', - 'schema' => [ - 'description' => '翻译结果回调URL,服务器会向回调地址发起post请求'."\n" - ."\n" - .'请求body'."\n" - ."\n" - .'raw json'."\n" - ."\n" - .'- 参数名 说明'."\n" - ."\n" - .'- task_id 任务id'."\n" - ."\n" - .'- status 状态'."\n" - ."\n" - .'- errCode 错误码'."\n" - ."\n" - .'- errMsg 错误信息'."\n" - ."\n" - .'- translateFileUrl 文件下载地址,过期时间1小时'."\n" - ."\n" - .'IP白名单'."\n" - ."\n" - .'59.82.61.52'."\n" - ."\n" - .'203.119.241.30'."\n" - ."\n" - .'203.119.241.98'."\n" - ."\n" - .'59.82.84.90'."\n" - ."\n" - .'203.119.241.56'."\n" - ."\n" - .'59.82.61.75'."\n" - ."\n" - .'回调服务示例:该服务用于回调方式获取翻译结果'."\n" - ."\n" - .'```'."\n" - .'import com.alibaba.fastjson.JSON;'."\n" - ."\n" - .'import com.alibaba.fastjson.JSONObject;'."\n" - ."\n" - .'import org.springframework.web.bind.annotation.RequestBody;'."\n" - ."\n" - .'import org.springframework.web.bind.annotation.RequestMapping;'."\n" - ."\n" - .'import org.springframework.web.bind.annotation.RequestMethod;'."\n" - ."\n" - .'import org.springframework.web.bind.annotation.RestController;'."\n" - ."\n" - .'@RestController'."\n" - ."\n" - .'public class CallbackController {'."\n" - ."\n" - .' @RequestMapping(value = "callback", method = RequestMethod.POST)'."\n" - ."\n" - .' public void callback(@RequestBody String body) {'."\n" - ."\n" - .' try {'."\n" - ."\n" - .' JSONObject result = JSON.parseObject(body);'."\n" - ."\n" - .' if (200 != result.getInteger("errCode")) {'."\n" - ."\n" - .' System.out.println("fail " + result.getString("erMsg"));'."\n" - ."\n" - .' return;'."\n" - ."\n" - .' }'."\n" - ."\n" - .' System.out.println("task_id:" + result.getString("task_id"));'."\n" - ."\n" - .' System.out.println("status:" + result.getString("status"));'."\n" - ."\n" - .' System.out.println("translateFileUrl:" + result.getString("translateFileUrl"));'."\n" - ."\n" - .' } catch (Exception e) {'."\n" - ."\n" - .' e.printStackTrace();'."\n" - ."\n" - .' }'."\n" - ."\n" - .' }'."\n" - ."\n" - .'}'."\n" - .'```', - 'type' => 'string', - 'required' => false, - 'docRequired' => false, - 'example' => 'http://callbackUrl', - ], + 'schema' => ['description' => '热词', 'type' => 'string', 'required' => false, 'example' => 'None,Plastic'], ], [ - 'name' => 'ClientToken', + 'name' => 'Attributes', 'in' => 'formData', - 'schema' => [ - 'description' => '提供幂等能力,3分钟内,相同的值只会生效一次。', - 'type' => 'string', - 'required' => false, - 'docRequired' => false, - 'example' => 'token', - ], + 'schema' => ['description' => '商品属性,请如示例传入JSON数据'."\n", 'type' => 'string', 'required' => false, 'example' => '{2:"None",10:"Plastic"}'], + ], + [ + 'name' => 'Extra', + 'in' => 'formData', + 'schema' => ['description' => '- 格式内容:{'."\n" + .' "product_id": "1",'."\n" + .' "platform": "ae"'."\n" + .'}'."\n" + .'- product_id 商品id'."\n" + .'- platform 商品所属平台', 'type' => 'string', 'required' => false, 'example' => '{ "product_id": "1", "platform": "ae" }'], ], ], 'responses' => [ @@ -2525,122 +1570,90 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'Status' => [ - 'description' => '任务状态。', - 'type' => 'string', - 'example' => 'ready', - ], - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => 'D3920BC3-A395-4CAD-9E84-7C39EB07507B', - ], - 'TaskId' => [ - 'description' => '任务ID。', - 'type' => 'string', - 'example' => '0586df512c8b4bb382d7d9a6a01b5854', + 'Code' => ['description' => '状态码,正常返回200', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '错误的时候,返回错误信息', 'type' => 'string', 'example' => 'ok'], + 'RequestId' => ['description' => '请求唯一串', 'type' => 'string', 'example' => 'DC2DCCC9-C3DF-4F59-8D8E-78185729F16D'], + 'Data' => [ + 'description' => '返回内容', + 'type' => 'object', + 'properties' => [ + 'Titles' => ['description' => '优化后的标题内容', 'type' => 'string', 'example' => '10pcs 80ml Kitchen Disposable Plastic Sauce Cup Pot Chutney Container'], + ], ], ], + 'description' => '', ], ], ], 'errorCodes' => [ - 109 => [ - [ - 'errorCode' => '10009', - 'errorMessage' => '子账号没有权限', - ], + 101 => [ + ['errorCode' => 'System.RequestTimeOut', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], [ - [ - 'errorCode' => '10010', - 'errorMessage' => '账号没有开通服务', - ], + ['errorCode' => 'System.Error', 'errorMessage' => 'A system error occurred.', 'description' => ''], ], [ - [ - 'errorCode' => '10011', - 'errorMessage' => '子账号服务失败', - ], + ['errorCode' => 'System.UrlDecodingError', 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', 'description' => ''], ], [ - [ - 'errorCode' => '10012', - 'errorMessage' => '翻译服务调用失败', - ], + ['errorCode' => 'System.ParameterError', 'errorMessage' => 'Some required parameters are missing.', 'description' => ''], ], [ - [ - 'errorCode' => '10013', - 'errorMessage' => '账号服务没有开通或者欠费', - ], + ['errorCode' => 'System.LanguageNotSupported', 'errorMessage' => 'The specified language pair is not supported.', 'description' => ''], ], - 199 => [ - [ - 'errorCode' => '19999', - 'errorMessage' => 'An unknown error occurred.', - ], + [ + ['errorCode' => 'System.LanguageDetectError', 'errorMessage' => 'An error occurred while detecting the language.', 'description' => ''], ], - 400 => [ - [ - 'errorCode' => '10021', - 'errorMessage' => 'The parameter is invalid.', - ], - [ - 'errorCode' => '10022', - 'errorMessage' => 'The parameter fileUrl is invalid.', - ], - [ - 'errorCode' => '10023', - 'errorMessage' => 'The parameter fileUrl is not accessible.', - ], - [ - 'errorCode' => '10024', - 'errorMessage' => 'The parameter callbackUrl is invalid.', - ], - [ - 'errorCode' => '10031', - 'errorMessage' => 'The specified file type is invalid.', - ], - [ - 'errorCode' => 'InvalidAccountStatus', - 'errorMessage' => 'The Machine Translation service has not been activated.', - ], - [ - 'errorCode' => 'RepeatInvoke', - 'errorMessage' => 'Repeated calls.', - ], + [ + ['errorCode' => 'System.TranslateError', 'errorMessage' => 'An error occurred while translating.', 'description' => ''], ], - 403 => [ - [ - 'errorCode' => '10029', - 'errorMessage' => 'The number of calls per day exceeds the limit.', - ], + [ + ['errorCode' => 'System.StringTooLong', 'errorMessage' => 'The maximum length of the specified string is exceeded.', 'description' => ''], ], - 429 => [ - [ - 'errorCode' => 'REQUESTS.OVER.LIMIT', - 'errorMessage' => 'The request is too frequent, please try again later.', - ], + [ + ['errorCode' => 'System.subNotPermission', 'errorMessage' => 'The sub-account is not authorized to perform the operation.', 'description' => ''], + ], + [ + ['errorCode' => 'System.AccountNotActivated', 'errorMessage' => 'The account has not activated the service.', 'description' => ''], + ], + [ + ['errorCode' => 'System.SubServiceFailed', 'errorMessage' => 'Sub-account service failed.', 'description' => ''], + ], + [ + ['errorCode' => 'System.TranslateServiceCallFailed', 'errorMessage' => 'Failed to call the translation service.', 'description' => ''], + ], + [ + ['errorCode' => 'System.AccountNotActivatedOrInArrears', 'errorMessage' => 'The service is not activated or the account has an outstanding balance.', 'description' => ''], + ], + 199 => [ + ['errorCode' => 'System.unknownError', 'errorMessage' => 'An unknown error occurred.', 'description' => ''], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"Status\\": \\"ready\\",\\n \\"RequestId\\": \\"D3920BC3-A395-4CAD-9E84-7C39EB07507B\\",\\n \\"TaskId\\": \\"0586df512c8b4bb382d7d9a6a01b5854\\"\\n}","errorExample":""},{"type":"xml","example":"\\n D3920BC3-A395-4CAD-9E84-7C39EB07507B\\n 0586df512c8b4bb382d7d9a6a01b5854\\n ready\\n","errorExample":""}]', - 'title' => '创建文档翻译任务', - 'summary' => '创建文档翻译任务。', - 'description' => '> 仅支持通过POST方式调用', + 'title' => '标题优化调用指南', + 'description' => '>该接口已计划下线,不建议继续调用。>', 'requestParamsDescription' => ' ', 'responseParamsDescription' => ' ', 'extraInfo' => ' ', - ], - 'GetDocTranslateTask' => [ - 'summary' => '查询文档翻译任务。', - 'methods' => [ - 'get', - ], - 'schemes' => [ - 'http', - 'https', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetTitleGenerate', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"ok\\",\\n \\"RequestId\\": \\"DC2DCCC9-C3DF-4F59-8D8E-78185729F16D\\",\\n \\"Data\\": {\\n \\"Titles\\": \\"10pcs 80ml Kitchen Disposable Plastic Sauce Cup Pot Chutney Container\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"DC2DCCC9-C3DF-4F59-8D8E-78185729F16D\\nok\\n\\n 10pcs 80ml Kitchen Disposable Plastic Sauce Cup Pot Chutney Container\\n\\n200","errorExample":""}]', + ], + 'GetTitleIntelligence' => [ + 'summary' => '通过类目、平台、关键词,自动生成商品标题。', + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -2648,22 +1661,32 @@ ], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'], 'parameters' => [ [ - 'name' => 'TaskId', - 'in' => 'query', - 'schema' => [ - 'description' => '任务ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => '0586df512c8b4bb382d7d9a6a01b5854', - ], + 'name' => 'Platform', + 'in' => 'formData', + 'schema' => ['description' => '商品所在平台 ae、icbu、lazada', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'ae'], + ], + [ + 'name' => 'Extra', + 'in' => 'formData', + 'schema' => ['description' => '扩展信息,json数据格式,可选字段', 'type' => 'string', 'required' => false, 'example' => '{"product_id":"1212"}'], + ], + [ + 'name' => 'CatLevelThreeId', + 'in' => 'formData', + 'schema' => ['description' => '三级类目Id,如没有类目数据则传入0', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'docRequired' => true, 'maximum' => '99999999999', 'minimum' => '0', 'example' => '111'], + ], + [ + 'name' => 'CatLevelTwoId', + 'in' => 'formData', + 'schema' => ['description' => '二级类目Id,如没有类目数据则传入0', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'docRequired' => true, 'maximum' => '99999999999', 'minimum' => '0', 'example' => '222'], + ], + [ + 'name' => 'Keywords', + 'in' => 'formData', + 'schema' => ['description' => '关键词,多个词英文逗号分隔比如:hello,apple', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'hello,apple'], ], ], 'responses' => [ @@ -2671,233 +1694,142 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'Status' => [ - 'description' => '任务状态。', - 'type' => 'string', - 'example' => 'translated', - ], - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => '12952E92-FDF3-4D3C-88E3-242D72BA7150', - ], - 'TranslateFileUrl' => [ - 'description' => '翻译后的文件下载地址。', - 'type' => 'string', - 'example' => 'http://translateFileUrl', - ], - 'TranslateErrorCode' => [ - 'description' => '任务错误码。', - 'type' => 'string', - 'example' => 'Error', - ], - 'PageCount' => [ - 'description' => '文档页数。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '20', - ], - 'TaskId' => [ - 'description' => '任务ID。', - 'type' => 'string', - 'example' => '0586df512c8b4bb382d7d9a6a01b5854', - ], - 'TranslateErrorMessage' => [ - 'description' => '任务错误信息。', - 'type' => 'string', - 'example' => 'Fail to get the page number of document.', + 'Code' => ['description' => '状态码,200 表示正常', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '如果有错误,会输出错误信息', 'type' => 'string', 'example' => 'success'], + 'RequestId' => ['description' => '请求唯一串,方便后期排查定位问题', 'type' => 'string', 'example' => 'D70487B4-8891-4D24-BB64-8788E53671FB'], + 'Data' => [ + 'description' => '返回数据', + 'type' => 'object', + 'properties' => [ + 'Titles' => ['description' => '自动生成的标题信息', 'type' => 'string', 'example' => 'Custom Hello Kitty PVC Cartoon Apple for Home Garden Complete Apple Bath Shower'], + ], ], ], + 'description' => '', ], ], ], 'errorCodes' => [ - 109 => [ - [ - 'errorCode' => '10009', - 'errorMessage' => '子账号没有权限', - ], + 101 => [ + ['errorCode' => 'System.RequestTimeOut', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], [ - [ - 'errorCode' => '10010', - 'errorMessage' => '账号没有开通服务', - ], + ['errorCode' => 'System.Error', 'errorMessage' => 'A system error occurred.', 'description' => ''], ], [ - [ - 'errorCode' => '10011', - 'errorMessage' => '子账号服务失败', - ], + ['errorCode' => 'System.UrlDecodingError', 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', 'description' => ''], ], [ - [ - 'errorCode' => '10012', - 'errorMessage' => '翻译服务调用失败', - ], + ['errorCode' => 'System.ParameterError', 'errorMessage' => 'Some required parameters are missing.', 'description' => ''], ], [ - [ - 'errorCode' => '10013', - 'errorMessage' => '账号服务没有开通或者欠费', - ], + ['errorCode' => 'System.LanguageNotSupported', 'errorMessage' => 'The specified language pair is not supported.', 'description' => ''], ], - 199 => [ - [ - 'errorCode' => '19999', - 'errorMessage' => 'An unknown error occurred.', - ], + [ + ['errorCode' => 'System.LanguageDetectError', 'errorMessage' => 'An error occurred while detecting the language.', 'description' => ''], ], - 400 => [ - [ - 'errorCode' => '10021', - 'errorMessage' => 'The parameter is invalid.', - ], - [ - 'errorCode' => 'InvalidAccountStatus', - 'errorMessage' => 'The Machine Translation service has not been activated.', - ], + [ + ['errorCode' => 'System.TranslateError', 'errorMessage' => 'An error occurred while translating.', 'description' => ''], ], - 404 => [ - [ - 'errorCode' => '10025', - 'errorMessage' => 'The specified task does not exist.', - ], + [ + ['errorCode' => 'System.StringTooLong', 'errorMessage' => 'The maximum length of the specified string is exceeded.', 'description' => ''], ], - ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"Status\\": \\"translated\\",\\n \\"RequestId\\": \\"12952E92-FDF3-4D3C-88E3-242D72BA7150\\",\\n \\"TranslateFileUrl\\": \\"http://translateFileUrl\\",\\n \\"TranslateErrorCode\\": \\"Error\\",\\n \\"PageCount\\": 20,\\n \\"TaskId\\": \\"0586df512c8b4bb382d7d9a6a01b5854\\",\\n \\"TranslateErrorMessage\\": \\"Fail to get the page number of document.\\"\\n}","errorExample":""},{"type":"xml","example":"\\n translated\\n Fail to get the page number of document.\\n 0586df512c8b4bb382d7d9a6a01b5854\\n 12952E92-FDF3-4D3C-88E3-242D72BA7150\\n 20\\n http://translateFileUrl\\n Error\\n","errorExample":""}]', - 'title' => '查询文档翻译任务', - 'description' => '请确保在使用该接口前,已充分了解文档翻译产品的收费方式和价格'."\n" - .'> 仅支持通过GET方式调用', - 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', - 'extraInfo' => ' ', - ], - 'TranslateCertificate' => [ - 'summary' => '进行证件翻译。', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], - 'security' => [ [ - 'AK' => [], + ['errorCode' => 'System.subNotPermission', 'errorMessage' => 'The sub-account is not authorized to perform the operation.', 'description' => ''], ], [ - 'BearerToken' => [], + ['errorCode' => 'System.AccountNotActivated', 'errorMessage' => 'The account has not activated the service.', 'description' => ''], ], - ], - 'operationType' => 'read', - 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'none', - 'riskType' => 'none', - 'chargeType' => 'free', - 'tenantRelevance' => 'publicInformation', - ], - 'parameters' => [ [ - 'name' => 'SourceLanguage', - 'in' => 'formData', - 'schema' => [ - 'description' => '原图语言', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'zh', - ], + ['errorCode' => 'System.SubServiceFailed', 'errorMessage' => 'Sub-account service failed.', 'description' => ''], ], [ - 'name' => 'TargetLanguage', - 'in' => 'formData', - 'schema' => [ - 'description' => '译文语言', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'en', - ], + ['errorCode' => 'System.TranslateServiceCallFailed', 'errorMessage' => 'Failed to call the translation service.', 'description' => ''], ], [ - 'name' => 'ImageUrl', - 'in' => 'formData', - 'schema' => [ - 'description' => 'oss文件地址:一个可以不用赋权就能访问的HTTP地址', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'http://imageurl', - 'isFileTransferUrl' => true, + ['errorCode' => 'System.AccountNotActivatedOrInArrears', 'errorMessage' => 'The service is not activated or the account has an outstanding balance.', 'description' => ''], + ], + 199 => [ + ['errorCode' => 'System.unknownError', 'errorMessage' => 'An unknown error occurred.', 'description' => ''], + ], + ], + 'title' => '标题智能生成调用指南', + 'description' => '>该接口已计划下线,不建议继续调用。>', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => ' ', + 'extraInfo' => ' ', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetTitleIntelligence', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"success\\",\\n \\"RequestId\\": \\"D70487B4-8891-4D24-BB64-8788E53671FB\\",\\n \\"Data\\": {\\n \\"Titles\\": \\"Custom Hello Kitty PVC Cartoon Apple for Home Garden Complete Apple Bath Shower\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"D70487B4-8891-4D24-BB64-8788E53671FB\\nsuccess\\n\\n Custom Hello Kitty PVC Cartoon Apple for Home Garden Complete Apple Bath Shower\\n\\n200","errorExample":""}]', + ], + 'GetTranslateImageBatchResult' => [ + 'summary' => '获取图片异步批量翻译的结果。', + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], + 'security' => [ [ - 'name' => 'CertificateType', - 'in' => 'formData', - 'schema' => [ - 'description' => '翻译的证件类型:身份证(idcard),驾驶证(driving_license)', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'driving_license', - ], + 'AK' => [], ], + ], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ [ - 'name' => 'ResultType', + 'name' => 'TaskId', 'in' => 'formData', - 'schema' => [ - 'description' => '翻译结果类型:文本(text),图片(image),不传值默认:text', - 'type' => 'string', - 'required' => false, - 'example' => 'text', - ], + 'schema' => ['description' => '调用图片异步批量翻译接口获得的任务 ID', 'type' => 'string', 'required' => true, 'example' => 'EEA28E6D-4828-5031-BD8C-8FF1B3216842'], ], ], 'responses' => [ 200 => [ 'schema' => [ + 'title' => 'Schema of Response', + 'description' => '请求结果结构', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '请求Id', - 'type' => 'string', - 'example' => '6640DE48-201C-4110-AE87-FB8FA34412B9', - ], + 'Code' => ['description' => '请求结果状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '请求信息', 'type' => 'string', 'example' => 'OK'], + 'RequestId' => ['description' => '请求标识', 'type' => 'string', 'example' => 'DACD263C-C068-5116-83EC-117245AA35CF'], 'Data' => [ - 'description' => '翻译结果', + 'description' => '数据内容', 'type' => 'object', 'properties' => [ - 'TranslatedValues' => [ - 'description' => '译文结果列表', + 'Result' => [ + 'description' => '翻译结果,当改批量翻译任务没有执行完毕时,该字段为空数组', 'type' => 'array', 'items' => [ + 'description' => '单张图片的翻译结果', 'type' => 'object', 'properties' => [ - 'KeyTranslation' => [ - 'description' => 'key对应的译文', - 'type' => 'string', - 'example' => 'name', - ], - 'Key' => [ - 'description' => '证件内容标题,如身份证中的姓名,性别', - 'type' => 'string', - 'example' => '姓名', - ], - 'Value' => [ - 'description' => '原文', - 'type' => 'string', - 'example' => '庄严', - ], - 'ValueTranslation' => [ - 'description' => '译文', - 'type' => 'string', - 'example' => 'Solemn', - ], + 'InPaintingUrl' => ['description' => '单张图片的译后编辑器背景图', 'type' => 'string', 'example' => 'https://example.com/example.jpg'], + 'FinalImageUrl' => ['description' => '单张图片的翻译结果图 URL', 'type' => 'string', 'example' => 'https://example.com/example.jpg'], + 'TemplateJson' => ['description' => '单张图片的译后编辑器模版数据', 'type' => 'string', 'example' => '{"TemplateJson": "Editor Template Json String "}'], + 'SourceImageUrl' => ['description' => '单张图片的原图 URL', 'type' => 'string', 'example' => 'https://example.com/example.jpg'], + 'Code' => ['description' => '单张图片的翻译状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '单张图片的翻译信息', 'type' => 'string', 'example' => 'OK'], + 'Success' => ['description' => '单张图片是否翻译成功标识', 'type' => 'boolean', 'example' => 'true'], ], ], ], + 'Status' => ['description' => '标识当前任务的运行状态,可能的值及含义如下:'."\n" + ."\n" + .'- `created`:批量翻译任务创建成功,等待运行'."\n" + .'- `running`:批量翻译任务正在运行中'."\n" + .'- `finished`:批量翻译任务运行结束,图片均已翻译完毕,此时 `Result` 字段会包含每张图片的翻译结果'."\n" + .'- `invalid`:传入的任务 ID 非法,或者任务的翻译结果已经过期被清理', 'type' => 'string', 'example' => 'finished'], ], ], ], @@ -2905,125 +1837,104 @@ ], ], 'errorCodes' => [ - 400 => [ - [ - 'errorCode' => '10026', - 'errorMessage' => 'Failed to translate the certificate. Please check the parameters.', - ], + 101 => [ + ['errorCode' => 'System.RequestTimeOut', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], - 403 => [ - [ - 'errorCode' => 'InvalidAccountStatus.ServiceUnavailable', - 'errorMessage' => 'The service has not been activated.', - ], + [ + ['errorCode' => 'System.Error', 'errorMessage' => 'A system error occurred.', 'description' => ''], ], - 503 => [ - [ - 'errorCode' => 'ServiceUnavailable', - 'errorMessage' => 'An error occurred while processing your request.', - ], + [ + ['errorCode' => 'System.UrlDecodingError', 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', 'description' => ''], + ], + [ + ['errorCode' => 'System.ParameterError', 'errorMessage' => 'Some required parameters are missing.', 'description' => ''], + ], + [ + ['errorCode' => 'System.LanguageNotSupported', 'errorMessage' => 'The specified language pair is not supported.', 'description' => ''], + ], + [ + ['errorCode' => 'System.LanguageDetectError', 'errorMessage' => 'An error occurred while detecting the language.', 'description' => ''], + ], + [ + ['errorCode' => 'System.TranslateError', 'errorMessage' => 'An error occurred while translating.', 'description' => ''], + ], + [ + ['errorCode' => 'System.StringTooLong', 'errorMessage' => 'The maximum length of the specified string is exceeded.', 'description' => ''], + ], + 110 => [ + ['errorCode' => 'System.AccountNotActivated', 'errorMessage' => 'The account has not activated the service.', 'description' => ''], + ], + [ + ['errorCode' => 'System.SubServiceFailed', 'errorMessage' => 'Sub-account service failed.', 'description' => ''], + ], + [ + ['errorCode' => 'System.TranslateServiceCallFailed', 'errorMessage' => 'Failed to call the translation service.', 'description' => ''], + ], + [ + ['errorCode' => 'System.AccountNotActivatedOrInArrears', 'errorMessage' => 'The service is not activated or the account has an outstanding balance.', 'description' => ''], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"6640DE48-201C-4110-AE87-FB8FA34412B9\\",\\n \\"Data\\": {\\n \\"TranslatedValues\\": [\\n {\\n \\"KeyTranslation\\": \\"name\\",\\n \\"Key\\": \\"姓名\\",\\n \\"Value\\": \\"庄严\\",\\n \\"ValueTranslation\\": \\"Solemn\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n BA8DAAE0-1985-4B19-86BA-97C1753FCF3A\\n \\n \\n Huang Jia\\n name\\n 黄佳\\n 姓名\\n \\n \\n 2019-07-05\\n effective start date\\n 2019-07-05\\n 有效起始日期\\n \\n \\n 331021190\\n certificate number\\n 331021190\\n 证号\\n \\n \\n 1999-11-04\\n date of birth\\n 1999-11-04\\n 出生日期\\n \\n \\n No. 3 Damaiyu Street, Yuhuan county, Zhejiang province\\n address\\n 浙江省玉环县大麦屿街道3号\\n 住址\\n \\n \\n Fujian Ningde, traffic police division, public security bureau\\n license issuing unit\\n 福建省宁德市公安局交通警察支队\\n 发证单位\\n \\n \\n Chinese\\n nationality\\n 中国\\n 国籍\\n \\n \\n 2019-07-05\\n date of first issue\\n 2019-07-05\\n 初次领证日期\\n \\n \\n C1\\n class\\n C1\\n 准驾车型\\n \\n \\n Women\'s\\n sex\\n \\n 性别\\n \\n \\n 2019-07-05至2025-07-05\\n validity period\\n 2019-07-05至2025-07-05\\n 有效期限\\n \\n \\n","errorExample":""}]', - 'title' => '证件翻译', + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '图片异步批量翻译结果获取', 'description' => '请确保在使用该接口前,已充分了解图片翻译产品的[收费方式和价格](https://help.aliyun.com/document_detail/163332.html)。'."\n" ."\n" - .'该接口适用于**证件翻译**。 如需调用通用图片翻译和电商图片翻译,请参考[图片翻译调用指南](https://help.aliyun.com/document_detail/2505940.html)。'."\n" - ."\n\n" - ."\n" - .'**图片限制**'."\n" - .'文件大小限制:4M'."\n" - .'支持的格式:jpg, jpeg, png'."\n" - ."\n" - .'接口QPS限制:40'."\n" - ."\n" - .'> 仅支持通过POST方式调用', - 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', - 'extraInfo' => ' ', - ], - 'GetImageTranslate' => [ - 'summary' => '包含文字识别、文本翻译、文字回填等能力。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', + .'图片异步批量翻译的结果,翻译完毕后,会保存 1 小时,过期后会被清理,请及时获取结果。', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:GetTranslateImageBatchResult', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"OK\\",\\n \\"RequestId\\": \\"DACD263C-C068-5116-83EC-117245AA35CF\\",\\n \\"Data\\": {\\n \\"Result\\": [\\n {\\n \\"InPaintingUrl\\": \\"https://example.com/example.jpg\\",\\n \\"FinalImageUrl\\": \\"https://example.com/example.jpg\\",\\n \\"TemplateJson\\": \\"{\\\\\\"TemplateJson\\\\\\": \\\\\\"Editor Template Json String\\\\t\\\\\\"}\\",\\n \\"SourceImageUrl\\": \\"https://example.com/example.jpg\\",\\n \\"Code\\": 200,\\n \\"Message\\": \\"OK\\",\\n \\"Success\\": true\\n }\\n ],\\n \\"Status\\": \\"finished\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n 200\\n OK\\n DACD263C-C068-5116-83EC-117245AA35CF\\n \\n \\n https://example.com/example.jpg\\n https://example.com/example.jpg\\n {\\"TemplateJson\\": \\"Editor Template Json String\\t\\"}\\n https://example.com/example.jpg\\n 200\\n OK\\n true\\n \\n finished\\n \\n","errorExample":""}]', + ], + 'GetTranslateReport' => [ + 'summary' => '根据API名及开始结束时间获取API调用报表,并根据传入的group按照天或者小时聚合计算后返回。', + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], 'operationType' => 'read', - 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'], 'parameters' => [ [ - 'name' => 'Url', - 'in' => 'formData', - 'schema' => [ - 'description' => '需要翻译的图片链接', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'http://xxxxxxx.oss-cn-shenzhen.aliyuncs.com/xxxxxx.jpg', - ], + 'name' => 'BeginTime', + 'in' => 'query', + 'schema' => ['description' => '起始时间。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '2021-03-01 00:00:00'], ], [ - 'name' => 'SourceLanguage', - 'in' => 'formData', - 'schema' => [ - 'description' => '图片中的文字语种,[语向支持以及语言代码](https://www.alibabacloud.com/help/zh/doc-detail/182310.html)'."\n" - .'[语向支持以及语言代码](https://help.aliyun.com/document_detail/182310.html?spm=a2c4g.11186623.6.543.106340eblV3QUo)', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'zh', - ], + 'name' => 'EndTime', + 'in' => 'query', + 'schema' => ['description' => '结束时间', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '2021-03-01 23:59:59'], ], [ - 'name' => 'TargetLanguage', - 'in' => 'formData', - 'schema' => [ - 'description' => '图片中文字翻译后的语种,[语向支持以及语言代码](https://www.alibabacloud.com/help/zh/doc-detail/182310.html)'."\n" - .'[语向支持以及语言代码](https://help.aliyun.com/document_detail/182310.html?spm=a2c4g.11186623.6.543.106340eblV3QUo)', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'en', - ], + 'name' => 'ApiName', + 'in' => 'query', + 'schema' => ['description' => 'API名称'."\n" + ."\n" + .'- 机器翻译通用版:translate_standard'."\n" + .'- 机器翻译专业版:translate_ecommerce'."\n" + .'- 语种识别:predict_detect'."\n" + .'- 通用图片翻译:it_general'."\n" + .'- 电商图片翻译:it_ecommerce'."\n" + .'- 文档翻译:dt_page'."\n" + .'- 身份证翻译:ct_idcard'."\n" + .'- 驾照翻译:ct_driving', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'translate_standard'], ], [ - 'name' => 'Extra', - 'in' => 'formData', - 'schema' => [ - 'description' => '- 以下JSON内容格式,不关注的都可以不用传递,都是可选参数'."\n" - ."\n" - .'- JSON 格式内容:'."\n" - .'```'."\n" - .'{'."\n" - .' "have_ocr": "false",'."\n" - .' "without_text":"true",'."\n" - .' "have_psd": "false",'."\n" - .' "ignore_entity": "false"'."\n" - .'}'."\n" - .'```'."\n" - .'- have_ocr 通过true/false 控制是否返回ocr结果,true:需要,false:不需要'."\n" - .'- without_text 控制是否需要擦除图片中的文字,true:需要,false:不需要'."\n" - .'- have_psd 用于图片编辑器,psd数据渲染编辑器'."\n" - .'- ignore_entity 是否忽略实体识别,true:忽略实体识别,false:不忽略', - 'type' => 'string', - 'required' => false, - 'docRequired' => true, - 'example' => '{"have_ocr": "false", "without_text":"true", "have_psd": "false", "ignore_entity": "false"}', - ], + 'name' => 'Group', + 'in' => 'query', + 'schema' => ['description' => '分组。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'hour或者day'], ], ], 'responses' => [ @@ -3031,231 +1942,172 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '状态码,200 表示正常', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '错误的时候,返回的错误信息', - 'type' => 'string', - 'example' => 'ok', - ], - 'RequestId' => [ - 'description' => '请求的唯一串', - 'type' => 'string', - 'example' => 'A41F6E25-8520-4AF0-90EF-AF7E32840108', - ], - 'Data' => [ - 'description' => '返回的数据内容', - 'type' => 'object', - 'properties' => [ - 'Url' => [ - 'description' => '翻译后的图片链接', - 'type' => 'string', - 'example' => 'https://ae01.alicdn.com/kf/xxxxx.jpeg', - ], - 'Orc' => [ - 'description' => 'orc 识别后的内容', - 'type' => 'string', - 'example' => '{"text":"P翼-至草款","width":750,"wordNum":10}', - ], - 'PictureEditor' => [ - 'description' => '用于图片编辑器渲染的psd数据', - 'type' => 'string', - 'example' => '{"text":"P翼-至草款","width":750,"wordNum":10}', - ], - ], - ], + 'Code' => ['description' => '错误码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '返回信息', 'type' => 'string', 'example' => 'success'], + 'Data' => ['description' => '返回内容', 'type' => 'string', 'example' => '{"result":[{"time":"2021-10-21 00:00:00","total":100}]}'], + 'RequestId' => ['description' => '请求ID', 'type' => 'string', 'example' => '86D18195-D89C-4C8C-9DC4-5FCE789CE6D5'], ], + 'description' => '', ], ], ], 'errorCodes' => [ - 101 => [ - [ - 'errorCode' => 'System.RequestTimeOut', - 'errorMessage' => 'The request has timed out.', - ], + 109 => [ + ['errorCode' => '10009', 'errorMessage' => '子账号没有权限', 'description' => ''], ], [ - [ - 'errorCode' => 'System.Error', - 'errorMessage' => 'A system error occurred.', - ], + ['errorCode' => '10010', 'errorMessage' => '账号没有开通服务', 'description' => ''], ], [ - [ - 'errorCode' => 'System.UrlDecodingError', - 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', - ], + ['errorCode' => '10011', 'errorMessage' => '子账号服务失败', 'description' => ''], ], [ - [ - 'errorCode' => 'System.ParameterError', - 'errorMessage' => 'Some required parameters are missing.', - ], + ['errorCode' => '10012', 'errorMessage' => '翻译服务调用失败', 'description' => ''], ], [ - [ - 'errorCode' => 'System.LanguageNotSupported', - 'errorMessage' => 'The specified language pair is not supported.', - ], + ['errorCode' => '10013', 'errorMessage' => '账号服务没有开通或者欠费', 'description' => ''], ], - [ - [ - 'errorCode' => 'System.LanguageDetectError', - 'errorMessage' => 'An error occurred while detecting the language.', - ], + 199 => [ + ['errorCode' => '19999', 'errorMessage' => 'An unknown error occurred.', 'description' => ''], ], - [ - [ - 'errorCode' => 'System.TranslateError', - 'errorMessage' => 'An error occurred while translating.', + ], + 'title' => '获取调用接口报表', + 'description' => '请确保在使用该接口前,已充分了解机器翻译产品的收费方式和[价格](https://help.aliyun.com/document_detail/457279.html)', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetTranslateReport', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"success\\",\\n \\"Data\\": \\"{\\\\\\"result\\\\\\":[{\\\\\\"time\\\\\\":\\\\\\"2021-10-21 00:00:00\\\\\\",\\\\\\"total\\\\\\":100}]}\\",\\n \\"RequestId\\": \\"86D18195-D89C-4C8C-9DC4-5FCE789CE6D5\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 200\\n success\\n {\\"result\\":[{\\"time\\":\\"2021-10-21 00:00:00\\",\\"total\\":100}]}\\n 86D18195-D89C-4C8C-9DC4-5FCE789CE6D5\\n","errorExample":""}]', + ], + 'OpenAlimtService' => [ + 'summary' => '商品服务开通。', + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], + 'security' => [ [ - [ - 'errorCode' => 'System.StringTooLong', - 'errorMessage' => 'The maximum length of the specified string is exceeded.', - ], + 'AK' => [], ], [ - [ - 'errorCode' => 'System.subNotPermission', - 'errorMessage' => 'The sub-account is not authorized to perform the operation.', - ], + 'APP' => [], ], [ - [ - 'errorCode' => 'System.AccountNotActivated', - 'errorMessage' => 'The account has not activated the service.', - ], + 'PrivateKey' => [], ], [ - [ - 'errorCode' => 'System.SubServiceFailed', - 'errorMessage' => 'Sub-account service failed.', - ], + 'BearerToken' => [], ], + ], + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'], + 'parameters' => [ [ - [ - 'errorCode' => 'System.TranslateServiceCallFailed', - 'errorMessage' => 'Failed to call the translation service.', - ], + 'name' => 'Type', + 'in' => 'query', + 'schema' => ['description' => '- 机器翻译 alimt'."\n" + ."\n" + .'- 定制化翻译服务 type = automl'."\n" + ."\n" + .'- 证件翻译 type=ct'."\n" + ."\n" + .'- 文档翻译 type=dt'."\n" + ."\n" + .'- 语种识别type=id'."\n", 'type' => 'string', 'required' => false, 'example' => 'id'], ], - [ - [ - 'errorCode' => 'System.AccountNotActivatedOrInArrears', - 'errorMessage' => 'The service is not activated or the account has an outstanding balance.', + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'type' => 'object', + 'properties' => [ + 'OrderId' => ['description' => '订单ID。', 'type' => 'string', 'example' => '123456'], + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => 'xxxx-xxxxx'], + ], + 'description' => '', ], ], - 199 => [ - [ - 'errorCode' => 'System.unknownError', - 'errorMessage' => 'An unknown error occurred.', - ], + ], + 'errorCodes' => [ + 400 => [ + ['errorCode' => 'ORDER.OPEND', 'errorMessage' => 'You have already open the service. Go to the console to start using it', 'description' => '您已经开通了服务,转到控制台开始使用'], + ['errorCode' => 'PRICEING.PLAN.RESULT.NOT.FOUND', 'errorMessage' => 'The order is not found', 'description' => ''], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"ok\\",\\n \\"RequestId\\": \\"A41F6E25-8520-4AF0-90EF-AF7E32840108\\",\\n \\"Data\\": {\\n \\"Url\\": \\"https://ae01.alicdn.com/kf/xxxxx.jpeg\\",\\n \\"Orc\\": \\"{\\\\\\"text\\\\\\":\\\\\\"P翼-至草款\\\\\\",\\\\\\"width\\\\\\":750,\\\\\\"wordNum\\\\\\":10}\\",\\n \\"PictureEditor\\": \\"{\\\\\\"text\\\\\\":\\\\\\"P翼-至草款\\\\\\",\\\\\\"width\\\\\\":750,\\\\\\"wordNum\\\\\\":10}\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"ok\\nA41F6E25-8520-4AF0-90EF-AF7E32840108\\n\\n {\\"text\\":\\"P翼-至草款\\",\\"width\\":750,\\"wordNum\\":10}\\n {\\"text\\":\\"P翼-至草款\\",\\"width\\":750,\\"wordNum\\":10}\\n https://ae01.alicdn.com/kf/xxxxx.jpeg\\n\\n200","errorExample":""}]', - 'title' => '商品图片智能翻译', - 'description' => '>该接口已计划下线,不建议继续调用。>'."\n" - .'替代接口为[图片翻译](https://help.aliyun.com/zh/machine-translation/developer-reference/api-alimt-2018-10-12-translateimage?spm=a2c4g.11186623.0.0.625a288aSx2On0)。', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"OrderId\\": \\"123456\\",\\n \\"RequestId\\": \\"xxxx-xxxxx\\"\\n}","errorExample":""}]', + 'title' => '商品服务开通', 'requestParamsDescription' => ' ', 'responseParamsDescription' => ' ', 'extraInfo' => ' ', - ], - 'CreateImageTranslateTask' => [ - 'summary' => '创建异步图片翻译,图片翻译包含文字识别、文本翻译、文字回填等能力。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:OpenAlimtService', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'Translate' => [ + 'summary' => '调用机器翻译专业版获取翻译结果。', + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], + [ + 'BearerToken' => [], + ], ], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'create', - 'riskType' => 'high', - 'chargeType' => 'paid', - 'tenantRelevance' => 'publicInformation', - ], + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'], 'parameters' => [ [ - 'name' => 'UrlList', + 'name' => 'FormatType', 'in' => 'formData', - 'schema' => [ - 'description' => '图片翻译链接,多张图片通过英文逗号分隔,图片数量不能超过20张', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'http://xxx,http://yyy', - ], + 'schema' => ['description' => '翻译文本的格式,**html**( 网页格式。设置此参数将对待翻译文本以及翻译后文本按照html格式进行处理)、**text**(文本格式。设置此参数将对传入待翻译文本以及翻译后结果不做文本格式处理,统一按纯文本格式处理。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'text'], ], [ - 'name' => 'SourceLanguage', + 'name' => 'TargetLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '图片原始语种', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'zh', - ], + 'schema' => ['description' => '译文语言,[参考语言code](https://help.aliyun.com/document_detail/215387.html)[参考语言code](https://www.alibabacloud.com/help/zh/machine-translation/latest/machine-translation-language-code-list)', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'en'], ], [ - 'name' => 'TargetLanguage', + 'name' => 'SourceLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '图片翻译目标语种', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'en', - ], + 'schema' => ['description' => '原文语言,[参考语言code](https://help.aliyun.com/document_detail/215387.html)[参考语言code](https://www.alibabacloud.com/help/zh/machine-translation/latest/machine-translation-language-code-list)', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'zh'], ], [ - 'name' => 'Extra', + 'name' => 'SourceText', 'in' => 'formData', - 'schema' => [ - 'description' => '- 以下JSON内容格式,不关注的都可以不用传递,都是可选参数'."\n" - .'- 样例JSON格式内容:'."\n" - .'```'."\n" - .'{'."\n" - .' "have_ocr": "false",'."\n" - .' "without_text": "false",'."\n" - .' "have_psd": "true",'."\n" - .' "ignore_entity": "false"'."\n" - .'}'."\n" - .'```'."\n" - .'- `have_ocr`,控制是否返回 OCR 结果,true:需要,false:不需要'."\n" - .'- `without_text`,控制是否需要擦除图片中的文字,true:需要,false:不需要'."\n" - .'- `have_psd`,控制是否返回图片编辑器数据,渲染编辑器,true:需要,false:不需要'."\n" - .'- `ignore_entity`,是否忽略实体识别,true:忽略,false:不忽略', - 'type' => 'string', - 'required' => false, - 'docRequired' => true, - 'example' => '{"have_ocr":"false","without_text":"false","have_psd":"true","ignore_entity":"false"}', - ], + 'schema' => ['description' => '待翻译内容', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '你好', 'maxLength' => 256000], ], [ - 'name' => 'ClientToken', + 'name' => 'Scene', 'in' => 'formData', - 'schema' => [ - 'description' => '提供幂等能力,3分钟内,相同的值只会生效一次', - 'type' => 'string', - 'required' => false, - 'example' => '1', - ], + 'schema' => ['description' => '场景可选取值:商品标题(title),商品描述(description),商品沟通(communication),医疗(medical),社交(social),金融(finance)', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'title'], + ], + [ + 'name' => 'Context', + 'in' => 'query', + 'schema' => ['title' => '新增context', 'description' => '上下文信息,可选填', 'type' => 'string', 'required' => false, 'example' => '早上我在家里吃了面包'], ], ], 'responses' => [ @@ -3263,151 +2115,152 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '状态码,200 表示正常'."\n", - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '错误的时候,返回的错误信息'."\n", - 'type' => 'string', - 'example' => 'ok', - ], - 'RequestId' => [ - 'description' => '请求的唯一串'."\n", - 'type' => 'string', - 'example' => 'A41F6E25-8520-4AF0-90EF-AF7E32840108', - ], + 'Code' => ['description' => '错误码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '错误信息', 'type' => 'string', 'example' => 'success'], + 'RequestId' => ['description' => '请求ID', 'type' => 'string', 'example' => '86D18195-D89C-4C8C-9DC4-5FCE789CE6D5'], 'Data' => [ - 'description' => '返回的数据内容'."\n", + 'description' => '返回数据', 'type' => 'object', 'properties' => [ - 'TaskId' => [ - 'description' => '异步图片翻译返回的任务ID,后面根据这个ID获取翻译结果', - 'type' => 'string', - 'example' => 'A41F6E25-8520-4AF0-90EF-111111', - ], + 'Translated' => ['description' => '翻译结果', 'type' => 'string', 'example' => 'Hello'], + 'WordCount' => ['description' => '总单词数', 'type' => 'string', 'example' => '10'], + 'DetectedLanguage' => ['description' => '源语言传入auto时,语种识别后的源语言代码', 'type' => 'string', 'example' => 'zh'], ], ], ], + 'description' => '', ], ], ], 'errorCodes' => [ 101 => [ - [ - 'errorCode' => 'System.RequestTimeOut', - 'errorMessage' => 'The request has timed out.', - ], + ['errorCode' => '10001', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.Error', - 'errorMessage' => 'A system error occurred.', - ], + ['errorCode' => '10002', 'errorMessage' => 'A system error occurred.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.UrlDecodingError', - 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', - ], + ['errorCode' => '10003', 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.ParameterError', - 'errorMessage' => 'Some required parameters are missing.', - ], + ['errorCode' => '10004', 'errorMessage' => 'Some required parameters are missing.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.LanguageNotSupported', - 'errorMessage' => 'The specified language pair is not supported.', - ], + ['errorCode' => '10005', 'errorMessage' => 'The specified language pair is not supported.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.LanguageDetectError', - 'errorMessage' => 'An error occurred while detecting the language.', - ], + ['errorCode' => '10006', 'errorMessage' => 'An error occurred while detecting the language.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.TranslateError', - 'errorMessage' => 'An error occurred while translating.', - ], + ['errorCode' => '10007', 'errorMessage' => 'An error occurred while translating.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.StringTooLong', - 'errorMessage' => 'The maximum length of the specified string is exceeded.', - ], + ['errorCode' => '10008', 'errorMessage' => 'The specified string is too long.', 'description' => ''], ], - 110 => [ - [ - 'errorCode' => 'System.AccountNotActivated', - 'errorMessage' => 'The account has not activated the service.', - ], + [ + ['errorCode' => '10009', 'errorMessage' => '子账号没有权限', 'description' => ''], ], [ - [ - 'errorCode' => 'System.SubServiceFailed', - 'errorMessage' => 'Sub-account service failed.', - ], + ['errorCode' => '10010', 'errorMessage' => '账号没有开通服务', 'description' => ''], ], [ - [ - 'errorCode' => 'System.TranslateServiceCallFailed', - 'errorMessage' => 'Failed to call the translation service.', - ], + ['errorCode' => '10011', 'errorMessage' => '子账号服务失败', 'description' => ''], ], [ - [ - 'errorCode' => 'System.AccountNotActivatedOrInArrears', - 'errorMessage' => 'The service is not activated or the account has an outstanding balance.', - ], + ['errorCode' => '10012', 'errorMessage' => '翻译服务调用失败', 'description' => ''], + ], + [ + ['errorCode' => '10013', 'errorMessage' => '账号服务没有开通或者欠费', 'description' => ''], + ], + 199 => [ + ['errorCode' => '19999', 'errorMessage' => 'An unknown error occurred.', 'description' => ''], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"ok\\",\\n \\"RequestId\\": \\"A41F6E25-8520-4AF0-90EF-AF7E32840108\\",\\n \\"Data\\": {\\n \\"TaskId\\": \\"A41F6E25-8520-4AF0-90EF-111111\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"ok\\nA41F6E25-8520-4AF0-90EF-AF7E32840108\\n\\n A41F6E25-8520-4AF0-90EF-111111\\n\\n200","errorExample":""}]', - 'title' => '创建异步图片翻译调用指南', - 'description' => '>该接口已计划下线,不建议继续调用。>', - 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', - 'extraInfo' => ' ', - ], - 'GetImageTranslateTask' => [ - 'summary' => '通过任务ID获取异步图片翻译结果。', - 'methods' => [ - 'post', - 'get', + 'eventInfo' => [ + 'enable' => false, + 'eventNames' => [], ], - 'schemes' => [ - 'http', - 'https', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"success\\",\\n \\"RequestId\\": \\"86D18195-D89C-4C8C-9DC4-5FCE789CE6D5\\",\\n \\"Data\\": {\\n \\"Translated\\": \\"Hello\\",\\n \\"WordCount\\": \\"10\\",\\n \\"DetectedLanguage\\": \\"zh\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"success\\n86D18195-D89C-4C8C-9DC4-5FCE789CE6D5\\n\\n Hello\\n\\n200","errorExample":""}]', + 'title' => '机器翻译专业版调用', + 'description' => '注意事项'."\n" + .'1、QPS限制50,如有扩展需求,请与我们联系。钉钉群号:23369411'."\n" + .'2、请确保在使用该接口前,已充分了解专业版翻译产品的收费方式和价格'."\n" + .'2、字符长度上限是5000字符,若超出上限,可以保存成文件,使用[文档翻译](https://help.aliyun.com/document_detail/164151.html)'."\n" + .'3、请确保在使用该接口前,已充分了解专业版翻译产品的收费方式和价格', + 'requestParamsDescription' => '### 场景说明'."\n" + .'我们在针对不同场景,都有不同的引擎,每个引擎都是特别优化过的,可以通过scene参数控制(场景可选取值:商品标题(title),商品描述(description),商品沟通(communication),医疗(medical),社交(social)) ,金融(finance)'."\n" + ."\n" + .'商品标题:运用阿里电商标题数据,单独训练出来的,翻译标题特别好'."\n" + ."\n" + .'商品详描:运用阿里商品详描数据,单独训练出来,专门翻译商品详描比较好'."\n" + ."\n" + .'商品沟通:在电商买卖家沟通场景下,翻译效果会很好'."\n" + ."\n" + .'医疗:是针对医疗文献、术语、药品单独训练出来的引擎,在这个场景下翻译效果会很好'."\n" + ."\n" + .'社交:面向口语化的翻译,在这个场景下翻译结果会比较好'."\n" + ."\n" + .'金融:面向金融领域的翻译', + 'responseParamsDescription' => ' 公共请求参数参见[《RPC 调用机制》公共请求参数组装方案](https://help.aliyun.com/document_detail/315526.html?spm=a2c4g.158244.0.0.34b627b5qv5gmt#sectiondiv-qq5-utu-r7a)', + 'extraInfo' => ' ', + 'changeSet' => [ + ['createdAt' => '2024-10-08T08:21:05.000Z', 'description' => '请求参数发生变更'], + ['createdAt' => '2023-05-25T09:33:06.000Z', 'description' => '响应参数发生变更'], + ], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:Translate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'TranslateCertificate' => [ + 'summary' => '进行证件翻译。', + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], + [ + 'BearerToken' => [], + ], ], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'], 'parameters' => [ [ - 'name' => 'TaskId', + 'name' => 'SourceLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '异步图片翻译任务Id', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'xxxxxx', - ], + 'schema' => ['description' => '原图语言', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'zh'], + ], + [ + 'name' => 'TargetLanguage', + 'in' => 'formData', + 'schema' => ['description' => '译文语言', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'en'], + ], + [ + 'name' => 'ImageUrl', + 'in' => 'formData', + 'schema' => ['description' => 'oss文件地址:一个可以不用赋权就能访问的HTTP地址', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'http://imageurl', 'isFileTransferUrl' => true], + ], + [ + 'name' => 'CertificateType', + 'in' => 'formData', + 'schema' => ['description' => '翻译的证件类型:身份证(idcard),驾驶证(driving_license)', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'driving_license'], + ], + [ + 'name' => 'ResultType', + 'in' => 'formData', + 'schema' => ['description' => '翻译结果类型:文本(text),图片(image),不传值默认:text', 'type' => 'string', 'required' => false, 'example' => 'text'], ], ], 'responses' => [ @@ -3415,185 +2268,136 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '状态码,200 表示正常'."\n", - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '错误的时候,返回的错误信息'."\n", - 'type' => 'string', - 'example' => 'ok', - ], - 'RequestId' => [ - 'description' => '请求的唯一串'."\n", - 'type' => 'string', - 'example' => 'xxxxxxx', - ], + 'RequestId' => ['description' => '请求Id', 'type' => 'string', 'example' => '6640DE48-201C-4110-AE87-FB8FA34412B9'], 'Data' => [ - 'description' => '返回的数据内容'."\n", + 'description' => '翻译结果', 'type' => 'object', 'properties' => [ - 'ImageData' => [ - 'description' => '- 图片翻译结构化数据'."\n" - ."\n" - .'```'."\n" - .'['."\n" - .' {'."\n" - .' "errorCode": "200",'."\n" - .' "sourceUrl": "https://img.alicdn.com/imgextra/i3/2838892713/O1CN01AJHAFq1Vub9eKog8t_!!2838892713.jpg",'."\n" - .' "success": true,'."\n" - .' "topRequestId": "of8hp0d9ne81",'."\n" - .' "url": "https://ae01.alicdn.com/kf/H86dc34f146e1488aa55a0435ebd1775cu.jpeg"'."\n" - .' },'."\n" - .' {'."\n" - .' "errorCode": "200",'."\n" - .' "sourceUrl": "https://img.alicdn.com/imgextra/i2/2838892713/O1CN01Ko5Mxu1Vub9Y85K6p_!!2838892713.jpg",'."\n" - .' "success": true,'."\n" - .' "topRequestId": "of8hp0d9ne81",'."\n" - .' "url": "https://ae01.alicdn.com/kf/H1cc74cbdfc554b278dfaa8b2ede33f48D.jpeg"'."\n" - .' }'."\n" - .']'."\n" - .'```'."\n" - ."\n" - .'- sourceURL 原始图片地址'."\n" - .'- URL翻译后的图片地址', - 'type' => 'string', - 'example' => '[{xxxxxx}]', + 'TranslatedValues' => [ + 'description' => '译文结果列表', + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'KeyTranslation' => ['description' => 'key对应的译文', 'type' => 'string', 'example' => 'name'], + 'Key' => ['description' => '证件内容标题,如身份证中的姓名,性别', 'type' => 'string', 'example' => '姓名'], + 'Value' => ['description' => '原文', 'type' => 'string', 'example' => '庄严'], + 'ValueTranslation' => ['description' => '译文', 'type' => 'string', 'example' => 'Solemn'], + ], + 'description' => '', + ], ], ], ], ], + 'description' => '', ], ], ], 'errorCodes' => [ - 101 => [ - [ - 'errorCode' => 'System.RequestTimeOut', - 'errorMessage' => 'The request has timed out.', - ], - ], - [ - [ - 'errorCode' => 'System.Error', - 'errorMessage' => 'A system error occurred.', - ], - ], - [ - [ - 'errorCode' => 'System.UrlDecodingError', - 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', - ], - ], - [ - [ - 'errorCode' => 'System.ParameterError', - 'errorMessage' => 'Some required parameters are missing.', - ], - ], - [ - [ - 'errorCode' => 'System.LanguageNotSupported', - 'errorMessage' => 'The specified language pair is not supported.', - ], - ], - [ - [ - 'errorCode' => 'System.LanguageDetectError', - 'errorMessage' => 'An error occurred while detecting the language.', - ], - ], - [ - [ - 'errorCode' => 'System.TranslateError', - 'errorMessage' => 'An error occurred while translating.', - ], - ], - [ - [ - 'errorCode' => 'System.StringTooLong', - 'errorMessage' => 'The maximum length of the specified string is exceeded.', - ], - ], - 110 => [ - [ - 'errorCode' => 'System.AccountNotActivated', - 'errorMessage' => 'The account has not activated the service.', - ], - ], - [ - [ - 'errorCode' => 'System.SubServiceFailed', - 'errorMessage' => 'Sub-account service failed.', - ], + 400 => [ + ['errorCode' => '10026', 'errorMessage' => 'Failed to translate the certificate. Please check the parameters.', 'description' => '证件翻译失败,请检查提交的参数。'], ], - [ - [ - 'errorCode' => 'System.TranslateServiceCallFailed', - 'errorMessage' => 'Failed to call the translation service.', - ], + 403 => [ + ['errorCode' => 'InvalidAccountStatus.ServiceUnavailable', 'errorMessage' => 'The service has not been activated.', 'description' => '服务未开通。'], ], - [ - [ - 'errorCode' => 'System.AccountNotActivatedOrInArrears', - 'errorMessage' => 'The service is not activated or the account has an outstanding balance.', - ], + 503 => [ + ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'An error occurred while processing your request.', 'description' => '服务内部错误。'], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"ok\\",\\n \\"RequestId\\": \\"xxxxxxx\\",\\n \\"Data\\": {\\n \\"ImageData\\": \\"[{xxxxxx}]\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"","errorExample":""}]', - 'title' => '获取异步图片翻译结果', - 'description' => '>该接口已计划下线,不建议继续调用。>', + 'title' => '证件翻译', + 'description' => '请确保在使用该接口前,已充分了解图片翻译产品的[收费方式和价格](https://help.aliyun.com/document_detail/163332.html)。'."\n" + ."\n" + .'该接口适用于**证件翻译**。 如需调用通用图片翻译和电商图片翻译,请参考[图片翻译调用指南](https://help.aliyun.com/document_detail/2505940.html)。'."\n" + ."\n\n" + ."\n" + .'**图片限制**'."\n" + .'文件大小限制:4M'."\n" + .'支持的格式:jpg, jpeg, png'."\n" + ."\n" + .'接口QPS限制:40'."\n" + ."\n" + .'> 仅支持通过POST方式调用', 'requestParamsDescription' => ' ', 'responseParamsDescription' => ' ', 'extraInfo' => ' ', - ], - 'GetImageDiagnose' => [ - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', + 'changeSet' => [ + ['createdAt' => '2022-11-11T08:44:00.000Z', 'description' => '错误码发生变更'], + ], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateCertificate', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"6640DE48-201C-4110-AE87-FB8FA34412B9\\",\\n \\"Data\\": {\\n \\"TranslatedValues\\": [\\n {\\n \\"KeyTranslation\\": \\"name\\",\\n \\"Key\\": \\"姓名\\",\\n \\"Value\\": \\"庄严\\",\\n \\"ValueTranslation\\": \\"Solemn\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n BA8DAAE0-1985-4B19-86BA-97C1753FCF3A\\n \\n \\n Huang Jia\\n name\\n 黄佳\\n 姓名\\n \\n \\n 2019-07-05\\n effective start date\\n 2019-07-05\\n 有效起始日期\\n \\n \\n 331021190\\n certificate number\\n 331021190\\n 证号\\n \\n \\n 1999-11-04\\n date of birth\\n 1999-11-04\\n 出生日期\\n \\n \\n No. 3 Damaiyu Street, Yuhuan county, Zhejiang province\\n address\\n 浙江省玉环县大麦屿街道3号\\n 住址\\n \\n \\n Fujian Ningde, traffic police division, public security bureau\\n license issuing unit\\n 福建省宁德市公安局交通警察支队\\n 发证单位\\n \\n \\n Chinese\\n nationality\\n 中国\\n 国籍\\n \\n \\n 2019-07-05\\n date of first issue\\n 2019-07-05\\n 初次领证日期\\n \\n \\n C1\\n class\\n C1\\n 准驾车型\\n \\n \\n Women\'s\\n sex\\n \\n 性别\\n \\n \\n 2019-07-05至2025-07-05\\n validity period\\n 2019-07-05至2025-07-05\\n 有效期限\\n \\n \\n","errorExample":""}]', + ], + 'TranslateECommerce' => [ + 'summary' => '调用机器翻译专业版获取翻译结果。', + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], + [ + 'BearerToken' => [], + ], ], 'operationType' => 'read', - 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - ], + 'deprecated' => true, + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'], 'parameters' => [ [ - 'name' => 'Url', + 'name' => 'FormatType', 'in' => 'formData', 'schema' => [ - 'description' => '图片链接', + 'description' => '翻译文本的格式,**html**( 网页格式。设置此参数将对待翻译文本以及翻译后文本按照html格式进行处理)、**text**(文本格式。设置此参数将对传入待翻译文本以及翻译后结果不做文本格式处理,统一按纯文本格式处理。', 'type' => 'string', 'required' => true, 'docRequired' => true, - 'example' => 'http://xxxxx.oss-cn-shenzhen.aliyuncs.com/jd/41209/xxxxx.jpg', + 'enumValueTitles' => ['html' => 'html', 'text' => 'text'], + 'example' => 'text', ], ], [ - 'name' => 'Extra', + 'name' => 'TargetLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '- 格式内容:{'."\n" - .' "product_id": "1",'."\n" - .' "platform": "ae"'."\n" - .'}'."\n" - .'- product_id 商品id'."\n" - .'- platform 商品所属平台,支持ae/icbu/lazada', - 'type' => 'string', - 'required' => false, - 'example' => '{ "product_id": "1", "platform": "ae" }', - ], + 'schema' => ['description' => '目标语种,支持的[语种参考](https://help.aliyun.com/document_detail/163584.html)。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'zh'], + ], + [ + 'name' => 'SourceLanguage', + 'in' => 'formData', + 'schema' => ['description' => '原文语言[参考语言code](https://help.aliyun.com/document_detail/158269.html?spm=a2c4g.11186623.2.8.53746614hvrF2G)[参考语言code](https://www.alibabacloud.com/help/zh/doc-detail/158269.html)'."\n", 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'en'], + ], + [ + 'name' => 'SourceText', + 'in' => 'formData', + 'schema' => ['description' => '待翻译内容', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'Hello'], + ], + [ + 'name' => 'Scene', + 'in' => 'formData', + 'schema' => [ + 'description' => '场景可选取值:商品标题(title),商品描述(description),商品沟通(communication),医疗(medical),社交(social),金融(finance)', + 'type' => 'string', + 'required' => true, + 'docRequired' => true, + 'enumValueTitles' => ['medical' => 'medical', 'social' => 'social', 'description' => 'description', 'communication' => 'communication', 'title' => 'title', 'finance' => 'finance'], + 'example' => 'social', + ], + ], + [ + 'name' => 'Context', + 'in' => 'query', + 'schema' => ['title' => 'context信息', 'description' => 'context信息', 'type' => 'string', 'required' => false, 'example' => 'context信息'], ], ], 'responses' => [ @@ -3601,215 +2405,138 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '状态码,正常请求返回200', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '错误的时候返回错误信息', - 'type' => 'string', - 'example' => 'ok', - ], - 'RequestId' => [ - 'description' => '请求唯一串', - 'type' => 'string', - 'example' => 'DC2DCCC9-C3DF-4F59-8D8E-78185729F16D', - ], + 'Code' => ['description' => '状态码,200 表示正常'."\n", 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '请求错误信息,如果正确则空', 'type' => 'string', 'example' => 'An error occurred while translating.'], + 'RequestId' => ['description' => '请求唯一串,方便后期排查定位问题', 'type' => 'string', 'example' => 'CC93BB5C-EAB5-579B-AA44-F61528F48FF8'], 'Data' => [ - 'description' => '返回的结果', + 'description' => '返回数据', 'type' => 'object', 'properties' => [ - 'Language' => [ - 'description' => '图片中的文字识别后的语种', - 'type' => 'string', - 'example' => 'zh', - ], + 'Translated' => ['description' => '翻译结果', 'type' => 'string', 'example' => '你好'], + 'WordCount' => ['description' => '原文的字符数', 'type' => 'string', 'example' => '10'], + 'DetectedLanguage' => ['type' => 'string', 'description' => ''], ], ], ], + 'description' => '', ], ], ], 'errorCodes' => [ 101 => [ - [ - 'errorCode' => 'System.RequestTimeOut', - 'errorMessage' => 'The request has timed out.', - ], + ['errorCode' => '10001', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.Error', - 'errorMessage' => 'A system error occurred.', - ], + ['errorCode' => '10002', 'errorMessage' => 'A system error occurred.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.UrlDecodingError', - 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', - ], + ['errorCode' => '10003', 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.ParameterError', - 'errorMessage' => 'Some required parameters are missing.', - ], + ['errorCode' => '10004', 'errorMessage' => 'Some required parameters are missing.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.LanguageNotSupported', - 'errorMessage' => 'The specified language pair is not supported.', - ], + ['errorCode' => '10005', 'errorMessage' => 'The specified language pair is not supported.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.LanguageDetectError', - 'errorMessage' => 'An error occurred while detecting the language.', - ], + ['errorCode' => '10006', 'errorMessage' => 'An error occurred while detecting the language.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.TranslateError', - 'errorMessage' => 'An error occurred while translating.', - ], + ['errorCode' => '10007', 'errorMessage' => 'An error occurred while translating.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.StringTooLong', - 'errorMessage' => 'The maximum length of the specified string is exceeded.', - ], + ['errorCode' => '10008', 'errorMessage' => 'The specified string is too long.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.subNotPermission', - 'errorMessage' => 'The sub-account is not authorized to perform the operation.', - ], + ['errorCode' => '10009', 'errorMessage' => '子账号没有权限', 'description' => ''], ], [ - [ - 'errorCode' => 'System.AccountNotActivated', - 'errorMessage' => 'The account has not activated the service.', - ], + ['errorCode' => '10010', 'errorMessage' => '账号没有开通服务', 'description' => ''], ], [ - [ - 'errorCode' => 'System.SubServiceFailed', - 'errorMessage' => 'Sub-account service failed.', - ], + ['errorCode' => '10011', 'errorMessage' => '子账号服务失败', 'description' => ''], ], [ - [ - 'errorCode' => 'System.TranslateServiceCallFailed', - 'errorMessage' => 'Failed to call the translation service.', - ], + ['errorCode' => '10012', 'errorMessage' => '翻译服务调用失败', 'description' => ''], ], [ - [ - 'errorCode' => 'System.AccountNotActivatedOrInArrears', - 'errorMessage' => 'The service is not activated or the account has an outstanding balance.', - ], + ['errorCode' => '10013', 'errorMessage' => '账号服务没有开通或者欠费', 'description' => ''], ], 199 => [ - [ - 'errorCode' => 'System.unknownError', - 'errorMessage' => 'An unknown error occurred.', - ], + ['errorCode' => '19999', 'errorMessage' => 'An unknown error occurred.', 'description' => ''], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"ok\\",\\n \\"RequestId\\": \\"DC2DCCC9-C3DF-4F59-8D8E-78185729F16D\\",\\n \\"Data\\": {\\n \\"Language\\": \\"zh\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"DC2DCCC9-C3DF-4F59-8D8E-78185729F16D\\nok\\n\\n zh\\n\\n200","errorExample":""}]', - 'title' => '图片诊断', - 'summary' => '能够识别图片中的文字的语种。', - 'description' => '>该接口已计划下线,不建议继续调用。>', - 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', - 'extraInfo' => ' ', - ], - 'GetTitleDiagnose' => [ - 'summary' => '通过商品标题质量诊断服务,产出可视化的标题质量分,便于卖家对现有的商品标题质量有实际体感。', - 'methods' => [ - 'post', - 'get', + 'staticInfo' => [ + 'substitutions' => ['alimt::2018-10-12::Translate'], ], - 'schemes' => [ - 'http', - 'https', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"An error occurred while translating.\\",\\n \\"RequestId\\": \\"CC93BB5C-EAB5-579B-AA44-F61528F48FF8\\",\\n \\"Data\\": {\\n \\"Translated\\": \\"你好\\",\\n \\"WordCount\\": \\"10\\",\\n \\"DetectedLanguage\\": \\"\\"\\n }\\n}","type":"json"}]', + 'title' => '机器翻译电商版调用', + 'description' => '1、字符长度限制5000,调用接口QPS限制50;如有扩展需求,请与我们联系钉钉群号:23369411'."\n" + ."\n" + .'2、请确保在使用该接口前,已充分了解专业版翻译产品的收费方式和价格', + 'changeSet' => [ + ['createdAt' => '2023-12-06T06:36:04.000Z', 'description' => '响应参数发生变更'], + ['createdAt' => '2022-08-31T05:28:36.000Z', 'description' => '请求参数发生变更'], + ], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateECommerce', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'TranslateGeneral' => [ + 'summary' => '通用翻译接口调用说明。', + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], + [ + 'BearerToken' => [], + ], ], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'], 'parameters' => [ [ - 'name' => 'Title', + 'name' => 'FormatType', 'in' => 'formData', - 'schema' => [ - 'description' => '标题内容', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'Amroe Japan Comic Theme Uzumaki Naruto Namikaze Minato 3D Visual Cartoon 7 Color USB Touch', - ], + 'schema' => ['description' => '翻译文本的格式,html( 网页格式。设置此参数将对待翻译文本以及翻译后文本按照html格式进行处理)、text(文本格式。设置此参数将对传入待翻译文本以及翻译后结果不做文本格式处理,统一按纯文本格式处理。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'text'], ], [ - 'name' => 'Language', + 'name' => 'SourceLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '标题文字的语种,[语向支持以及语言代码](https://help.aliyun.com/document_detail/182310.html?spm=a2c4g.11186623.6.543.106340eblV3QUo)[语向支持以及语言代码](https://www.alibabacloud.com/help/zh/doc-detail/182310.html)'."\n", - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'zh', - ], + 'schema' => ['description' => '原文语言,[参考语言code](https://help.aliyun.com/document_detail/215387.html)[参考语言code](https://www.alibabacloud.com/help/zh/machine-translation/latest/machine-translation-language-code-list)', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'zh'], ], [ - 'name' => 'Platform', + 'name' => 'TargetLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '商品标题所属平台,支持ae/icbu/lazada', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'ae', - ], + 'schema' => ['description' => '译文语言,[参考语言code](https://help.aliyun.com/document_detail/215387.html)[参考语言code](https://www.alibabacloud.com/help/zh/machine-translation/latest/machine-translation-language-code-list)', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'en'], ], [ - 'name' => 'CategoryId', + 'name' => 'SourceText', 'in' => 'formData', - 'schema' => [ - 'description' => '类目id,如没有类目数据则传入0', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => '123', - ], + 'schema' => ['description' => '需要翻译的内容', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '你好'], ], [ - 'name' => 'Extra', + 'name' => 'Scene', 'in' => 'formData', - 'schema' => [ - 'description' => '- 可选字段'."\n" - ."\n" - .'- 格式内容:{'."\n" - .' "product_id": "1",'."\n" - .' "platform": "ae"'."\n" - .'}'."\n" - .'- product_id 商品id'."\n" - .'- platform 商品所属平台,支持ae/icbu/lazada', - 'type' => 'string', - 'required' => false, - 'docRequired' => true, - 'example' => '{ "product_id": "1", "platform": "ae" }', - ], + 'schema' => ['description' => '通用版本默认是:general', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'general', 'default' => 'general'], + ], + [ + 'name' => 'Context', + 'in' => 'query', + 'schema' => ['title' => 'context信息', 'description' => '上下文信息,可选填', 'type' => 'string', 'required' => false, 'example' => '早上我在家里吃了面包'], ], ], 'responses' => [ @@ -3817,308 +2544,169 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '状态码,正常请求返回200', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '状态信息', - 'type' => 'string', - 'example' => 'ok', - ], - 'RequestId' => [ - 'description' => '请求ID', - 'type' => 'string', - 'example' => 'DC2DCCC9-C3DF-4F59-8D8E-78185729F16D', - ], + 'Code' => ['description' => '错误码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '返回信息', 'type' => 'string', 'example' => 'success'], + 'RequestId' => ['description' => '请求ID', 'type' => 'string', 'example' => '86D18195-D89C-4C8C-9DC4-5FCE789CE6D5'], 'Data' => [ - 'description' => '返回具体内容', + 'description' => '翻译结果', 'type' => 'object', 'properties' => [ - 'DuplicateWords' => [ - 'description' => '重复单词(包括单复数)', - 'type' => 'string', - 'example' => 'hi', - ], - 'ContainCoreClasses' => [ - 'description' => '是否包含类目主词', - 'type' => 'string', - 'example' => 'true', - ], - 'WordCount' => [ - 'description' => '总单词数', - 'type' => 'string', - 'example' => '10', - ], - 'LanguageQualityScore' => [ - 'description' => '语言质量分', - 'type' => 'string', - 'example' => '2', - ], - 'AllUppercaseWords' => [ - 'description' => '全部大写的单词', - 'type' => 'string', - 'example' => 'Boy', - ], - 'OverLengthLimit' => [ - 'description' => '长度限制', - 'type' => 'string', - 'example' => '100', - ], - 'DisableWords' => [ - 'description' => '敏感词', - 'type' => 'string', - 'example' => 'baba', - ], - 'NoFirstUppercaseList' => [ - 'description' => '首字母未大写单词', - 'type' => 'string', - 'example' => 'no', - ], - 'TotalScore' => [ - 'description' => '总分数', - 'type' => 'string', - 'example' => '3', - ], - 'WordSpelledCorrectError' => [ - 'description' => '拼写错误单词', - 'type' => 'string', - 'example' => 'ahk', - ], + 'Translated' => ['description' => '翻译后的结果', 'type' => 'string', 'example' => 'Hello'], + 'WordCount' => ['description' => '总单词数', 'type' => 'string', 'example' => '10'], + 'DetectedLanguage' => ['description' => '源语言传入auto时,语种识别后的源语言代码', 'type' => 'string', 'example' => 'zh'], ], ], ], + 'description' => '', ], ], ], 'errorCodes' => [ 101 => [ - [ - 'errorCode' => 'System.RequestTimeOut', - 'errorMessage' => 'The request has timed out.', - ], + ['errorCode' => '10001', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.Error', - 'errorMessage' => 'A system error occurred.', - ], + ['errorCode' => '10002', 'errorMessage' => 'A system error occurred.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.UrlDecodingError', - 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', - ], + ['errorCode' => '10003', 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.ParameterError', - 'errorMessage' => 'Some required parameters are missing.', - ], + ['errorCode' => '10004', 'errorMessage' => 'Some required parameters are missing.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.LanguageNotSupported', - 'errorMessage' => 'The specified language pair is not supported.', - ], + ['errorCode' => '10005', 'errorMessage' => 'The specified language pair is not supported.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.LanguageDetectError', - 'errorMessage' => 'An error occurred while detecting the language.', - ], + ['errorCode' => '10006', 'errorMessage' => 'An error occurred while detecting the language.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.TranslateError', - 'errorMessage' => 'An error occurred while translating.', - ], + ['errorCode' => '10007', 'errorMessage' => 'An error occurred while translating.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.StringTooLong', - 'errorMessage' => 'The maximum length of the specified string is exceeded.', - ], + ['errorCode' => '10008', 'errorMessage' => 'The specified string is too long.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.subNotPermission', - 'errorMessage' => 'The sub-account is not authorized to perform the operation.', - ], + ['errorCode' => '10009', 'errorMessage' => '子账号没有权限', 'description' => ''], ], [ - [ - 'errorCode' => 'System.AccountNotActivated', - 'errorMessage' => 'The account has not activated the service.', - ], + ['errorCode' => '10010', 'errorMessage' => '账号没有开通服务', 'description' => ''], ], [ - [ - 'errorCode' => 'System.SubServiceFailed', - 'errorMessage' => 'Sub-account service failed.', - ], + ['errorCode' => '10011', 'errorMessage' => '子账号服务失败', 'description' => ''], ], [ - [ - 'errorCode' => 'System.TranslateServiceCallFailed', - 'errorMessage' => 'Failed to call the translation service.', - ], + ['errorCode' => '10012', 'errorMessage' => '翻译服务调用失败', 'description' => ''], ], [ - [ - 'errorCode' => 'System.AccountNotActivatedOrInArrears', - 'errorMessage' => 'The service is not activated or the account has an outstanding balance.', - ], + ['errorCode' => '10013', 'errorMessage' => '账号服务没有开通或者欠费', 'description' => ''], ], 199 => [ - [ - 'errorCode' => 'System.unknownError', - 'errorMessage' => 'An unknown error occurred.', - ], + ['errorCode' => '19999', 'errorMessage' => 'An unknown error occurred.', 'description' => ''], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"ok\\",\\n \\"RequestId\\": \\"DC2DCCC9-C3DF-4F59-8D8E-78185729F16D\\",\\n \\"Data\\": {\\n \\"DuplicateWords\\": \\"hi\\",\\n \\"ContainCoreClasses\\": \\"true\\",\\n \\"WordCount\\": \\"10\\",\\n \\"LanguageQualityScore\\": \\"2\\",\\n \\"AllUppercaseWords\\": \\"Boy\\",\\n \\"OverLengthLimit\\": \\"100\\",\\n \\"DisableWords\\": \\"baba\\",\\n \\"NoFirstUppercaseList\\": \\"no\\",\\n \\"TotalScore\\": \\"3\\",\\n \\"WordSpelledCorrectError\\": \\"ahk\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"DC2DCCC9-C3DF-4F59-8D8E-78185729F16D\\nok\\n\\n no\\n true\\n baba\\n 10\\n 100\\n 3\\n hi\\n ahk\\n Boy\\n 2\\n\\n200","errorExample":""}]', - 'title' => '标题诊断调用指南', - 'description' => '>该接口已计划下线,不建议继续调用。>', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"success\\",\\n \\"RequestId\\": \\"86D18195-D89C-4C8C-9DC4-5FCE789CE6D5\\",\\n \\"Data\\": {\\n \\"Translated\\": \\"Hello\\",\\n \\"WordCount\\": \\"10\\",\\n \\"DetectedLanguage\\": \\"zh\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n 14E447CA-B93B-4526-ACD7-42AE13CC2AF6\\n \\n Hello\\n \\n 200\\n","errorExample":""}]', + 'title' => '机器翻译通用版调用', + 'description' => '注意事项'."\n" + .'1、QPS限制50,如有扩展需求,请与我们联系。钉钉群号:23369411'."\n" + .'2、请确保在使用该接口前,已充分了解通用版翻译产品的收费方式和价格'."\n" + .'2、字符长度上限是5000字符,若超出上限,可以保存成文件,使用[文档翻译](https://help.aliyun.com/document_detail/164151.html)'."\n" + .'3、请确保在使用该接口前,已充分了解通用版翻译产品的收费方式和价格', 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', + 'responseParamsDescription' => '公共请求参数参见[《RPC 调用机制》公共请求参数组装方案](https://help.aliyun.com/document_detail/315526.html?spm=a2c4g.158244.0.0.34b627b5qv5gmt#sectiondiv-qq5-utu-r7a)', 'extraInfo' => ' ', - ], - 'GetTitleGenerate' => [ - 'summary' => '基于电商大数据,自动优化商品标题。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', + 'changeSet' => [ + ['createdAt' => '2023-05-25T09:33:06.000Z', 'description' => '响应参数发生变更'], + ['createdAt' => '2022-08-31T05:28:36.000Z', 'description' => '请求参数发生变更'], + ], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateGeneral', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'TranslateImage' => [ + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], + [ + 'BearerToken' => [], + ], ], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'], 'parameters' => [ [ - 'name' => 'Title', - 'in' => 'formData', - 'schema' => [ - 'description' => '标题内容', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => '10pcs 80ml Kitchen Disposable', - ], - ], - [ - 'name' => 'Language', + 'name' => 'ImageUrl', 'in' => 'formData', - 'schema' => [ - 'description' => '标题语种,[语向支持以及语言代码](https://help.aliyun.com/document_detail/182310.html)[语向支持以及语言代码](https://www.alibabacloud.com/help/zh/doc-detail/182310.html)'."\n", - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'en', - ], + 'schema' => ['description' => '原图 URL,跟 Base64 不能同时为空,优先取 Base64。', 'type' => 'string', 'required' => false, 'example' => 'https://example.com/example.jpg'], ], [ - 'name' => 'Platform', + 'name' => 'ImageBase64', 'in' => 'formData', - 'schema' => [ - 'description' => '商品标题所属平台,支持ae/icbu', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'ae', - ], + 'schema' => ['description' => '原图 Base64,跟 URL 不能同时为空,优先取 Base64。', 'type' => 'string', 'required' => false, 'example' => '/9j/4...H/9k='], ], [ - 'name' => 'CategoryId', + 'name' => 'SourceLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '类目ID,如没有类目数据则传入0', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => '127896018', - ], + 'schema' => ['description' => '源语种,支持的[语种参考](https://help.aliyun.com/document_detail/163584.html),必填(请忽略表格中“是否必填”中的“否”)', 'type' => 'string', 'required' => false, 'example' => 'zh'], ], [ - 'name' => 'HotWords', + 'name' => 'TargetLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '热词', - 'type' => 'string', - 'required' => false, - 'example' => 'None,Plastic', - ], + 'schema' => ['description' => '目标语种,支持的[语种参考](https://help.aliyun.com/document_detail/163584.html),必填(请忽略表格中“是否必填”中的“否”)', 'type' => 'string', 'required' => false, 'example' => 'en'], ], [ - 'name' => 'Attributes', + 'name' => 'Field', 'in' => 'formData', 'schema' => [ - 'description' => '商品属性,请如示例传入JSON数据'."\n", + 'description' => '翻译领域, 可选值如下。'."\n" + .'- `general`: 通用图片翻译'."\n" + .'- `e-commerce`: 电商领域图片翻译'."\n" + ."\n" + .'默认及未识别领域均按通用图片翻译处理。', 'type' => 'string', 'required' => false, - 'example' => '{2:"None",10:"Plastic"}', + 'enumValueTitles' => [], + 'example' => 'general', ], ], [ - 'name' => 'Extra', + 'name' => 'Ext', 'in' => 'formData', - 'schema' => [ - 'description' => '- 格式内容:{'."\n" - .' "product_id": "1",'."\n" - .' "platform": "ae"'."\n" - .'}'."\n" - .'- product_id 商品id'."\n" - .'- platform 商品所属平台', - 'type' => 'string', - 'required' => false, - 'example' => '{ "product_id": "1", "platform": "ae" }', - ], + 'schema' => ['description' => '扩展信息, JSON String 格式,里面可以包含的字段如下。'."\n" + .'- `needEditorData`: 取值为字符串 `true`/`false`,默认为`false`,是否需要在结果中返回图片翻译译后编辑器数据,仅用于[自行接入图片翻译译后编辑器](https://help.aliyun.com/document_detail/2507676.html)时,获取数据使用'."\n" + .'- `ignoreEntityRecognize`:取值为字符串 `true`/`false`,默认为 `false`,电商领域图片翻译会自动判断文字是否在图片中的商品主体上,如果在,则略过翻译;使用本字段来控制是否进行上述判断,本字段对通用图片翻译无效', 'type' => 'string', 'required' => false, 'example' => '{"needEditorData": "false", "ignoreEntityRecognize": "true"}'], ], ], 'responses' => [ 200 => [ 'schema' => [ + 'description' => '结果', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '状态码,正常返回200', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '错误的时候,返回错误信息', - 'type' => 'string', - 'example' => 'ok', - ], - 'RequestId' => [ - 'description' => '请求唯一串', - 'type' => 'string', - 'example' => 'DC2DCCC9-C3DF-4F59-8D8E-78185729F16D', - ], + 'RequestId' => ['description' => '请求标识', 'type' => 'string', 'example' => 'D774D33D-F1CB-5A2C-A787-E0A2179239CE'], + 'Code' => ['description' => '请求结果状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '请求错误信息', 'type' => 'string', 'example' => 'Error Message'], 'Data' => [ - 'description' => '返回内容', + 'description' => '图片翻译结果结构体', 'type' => 'object', 'properties' => [ - 'Titles' => [ - 'description' => '优化后的标题内容', - 'type' => 'string', - 'example' => '10pcs 80ml Kitchen Disposable Plastic Sauce Cup Pot Chutney Container', - ], + 'InPaintingUrl' => ['description' => '图片译后编辑器背景图', 'type' => 'string', 'example' => 'https://example.com/example.jpg'], + 'TemplateJson' => ['description' => '图片译后编辑器模版数据', 'type' => 'string', 'example' => 'Editor Template Json String'], + 'FinalImageUrl' => ['description' => '最终翻译结果图片 URL', 'type' => 'string', 'example' => 'https://example.com/example.jpg'], ], ], ], @@ -4126,213 +2714,130 @@ ], ], 'errorCodes' => [ - 101 => [ - [ - 'errorCode' => 'System.RequestTimeOut', - 'errorMessage' => 'The request has timed out.', - ], + 400 => [ + ['errorCode' => 'Parameter.SourceLangError', 'errorMessage' => 'Source languages are not supported.', 'description' => '源语种不支持。'], + ['errorCode' => 'Parameter.TargetLangError', 'errorMessage' => 'Target languages are not supported.', 'description' => '目标语种不支持。'], ], [ - [ - 'errorCode' => 'System.Error', - 'errorMessage' => 'A system error occurred.', - ], + ['errorCode' => 'System.subNotPermission', 'errorMessage' => 'The sub-account is not authorized to perform the operation.', 'description' => ''], + ['errorCode' => 'System.AccountNotActivated', 'errorMessage' => 'The account has not activated the service.', 'description' => ''], ], - [ - [ - 'errorCode' => 'System.UrlDecodingError', - 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', - ], + 406 => [ + ['errorCode' => 'System.ParameterError', 'errorMessage' => 'Some required parameters are missing.', 'description' => ''], + ['errorCode' => 'Parameter.ImageUrlError', 'errorMessage' => 'Failed to obtain the image from the URL.', 'description' => '从URL下载图片失败'], + ['errorCode' => 'Parameter.ImageSizeError', 'errorMessage' => 'Image size should be within 15px to 8192px.', 'description' => '图片尺寸超出限制,需在15px到8192px之间'], + ['errorCode' => 'Parameter.ImageFormatError', 'errorMessage' => 'The image format is not supported.', 'description' => '图片格式不支持'], + ['errorCode' => 'Parameter.ImageFileSizeError', 'errorMessage' => 'The image file size should be within 10 MB.', 'description' => '图片大小超出限制,需在10MB以内'], ], - [ - [ - 'errorCode' => 'System.ParameterError', - 'errorMessage' => 'Some required parameters are missing.', - ], + 500 => [ + ['errorCode' => 'System.unknownError', 'errorMessage' => 'An unknown error occurred.', 'description' => '未知错误'], + ['errorCode' => 'ImageTranslate.TranslationError', 'errorMessage' => 'Image translation error.', 'description' => '图片翻译错误'], + ['errorCode' => 'ImageTranslate.FusionError', 'errorMessage' => 'Image fusion error.', 'description' => '合图错误'], + ['errorCode' => 'ImageTranslate.EraseError', 'errorMessage' => 'Image erasing error.', 'description' => '擦图错误'], + ['errorCode' => 'ImageTranslate.TextTranslationError', 'errorMessage' => 'Text translation error.', 'description' => '文本翻译错误'], + ['errorCode' => 'ImageTranslate.TextToParagraphError', 'errorMessage' => 'Text to paragraph error.', 'description' => '段落合并错误'], ], - [ - [ - 'errorCode' => 'System.LanguageNotSupported', - 'errorMessage' => 'The specified language pair is not supported.', + ], + 'title' => '图片翻译', + 'summary' => '将图片上的文字从一种语言翻译成另一种语言,并输出一张尽可能忠于原图的新图片。', + 'description' => '请确保在使用该接口前,已充分了解图片翻译产品的[收费方式和价格](https://help.aliyun.com/document_detail/163332.html)。'."\n" + ."\n" + .'该接口适用于**通用图片翻译**和**电商图片翻译**。'."\n" + .'如需调用证件翻译,请参考[证件翻译调用指南](https://help.aliyun.com/document_detail/2505939.html)。'."\n" + ."\n" + .'**图片限制**'."\n" + ."\n" + .'- 文件大小限制:10M'."\n" + .'- 像素限制:长宽比 < 10:1'."\n" + .'- 支持的格式:jpg, jpeg, png, bmp, gif(仅翻译第一帧), webp'."\n" + ."\n" + .'> 仅支持通过POST方式调用', + 'changeSet' => [ + ['createdAt' => '2024-08-29T08:42:06.000Z', 'description' => '响应参数发生变更'], + ['createdAt' => '2023-01-10T08:01:25.000Z', 'description' => '错误码发生变更'], + ['createdAt' => '2023-01-05T03:37:40.000Z', 'description' => '错误码发生变更、响应参数发生变更'], + ['createdAt' => '2021-11-05T06:50:56.000Z', 'description' => '错误码发生变更'], + ['createdAt' => '2021-11-05T06:50:56.000Z', 'description' => '错误码发生变更'], + ], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateImage', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], - [ - [ - 'errorCode' => 'System.LanguageDetectError', - 'errorMessage' => 'An error occurred while detecting the language.', - ], - ], - [ - [ - 'errorCode' => 'System.TranslateError', - 'errorMessage' => 'An error occurred while translating.', - ], - ], - [ - [ - 'errorCode' => 'System.StringTooLong', - 'errorMessage' => 'The maximum length of the specified string is exceeded.', - ], - ], - [ - [ - 'errorCode' => 'System.subNotPermission', - 'errorMessage' => 'The sub-account is not authorized to perform the operation.', - ], - ], - [ - [ - 'errorCode' => 'System.AccountNotActivated', - 'errorMessage' => 'The account has not activated the service.', - ], - ], - [ - [ - 'errorCode' => 'System.SubServiceFailed', - 'errorMessage' => 'Sub-account service failed.', - ], - ], - [ - [ - 'errorCode' => 'System.TranslateServiceCallFailed', - 'errorMessage' => 'Failed to call the translation service.', - ], - ], - [ - [ - 'errorCode' => 'System.AccountNotActivatedOrInArrears', - 'errorMessage' => 'The service is not activated or the account has an outstanding balance.', - ], - ], - 199 => [ - [ - 'errorCode' => 'System.unknownError', - 'errorMessage' => 'An unknown error occurred.', - ], - ], - ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"ok\\",\\n \\"RequestId\\": \\"DC2DCCC9-C3DF-4F59-8D8E-78185729F16D\\",\\n \\"Data\\": {\\n \\"Titles\\": \\"10pcs 80ml Kitchen Disposable Plastic Sauce Cup Pot Chutney Container\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"DC2DCCC9-C3DF-4F59-8D8E-78185729F16D\\nok\\n\\n 10pcs 80ml Kitchen Disposable Plastic Sauce Cup Pot Chutney Container\\n\\n200","errorExample":""}]', - 'title' => '标题优化调用指南', - 'description' => '>该接口已计划下线,不建议继续调用。>', - 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', - 'extraInfo' => ' ', - ], - 'GetTitleIntelligence' => [ - 'summary' => '通过类目、平台、关键词,自动生成商品标题。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], - 'security' => [ + ], + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"D774D33D-F1CB-5A2C-A787-E0A2179239CE\\",\\n \\"Code\\": 200,\\n \\"Message\\": \\"Error Message\\",\\n \\"Data\\": {\\n \\"InPaintingUrl\\": \\"https://example.com/example.jpg\\",\\n \\"TemplateJson\\": \\"Editor Template Json String\\",\\n \\"FinalImageUrl\\": \\"https://example.com/example.jpg\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n 200\\n \\n https://example.com/example.jpg\\n \\n D774D33D-F1CB-5A2C-A787-E0A2179239CE\\n","errorExample":""}]', + ], + 'TranslateImageBatch' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], + 'security' => [ [ 'AK' => [], ], ], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - 'tenantRelevance' => 'publicInformation', - ], + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'], 'parameters' => [ [ - 'name' => 'Platform', + 'name' => 'ImageUrls', 'in' => 'formData', - 'schema' => [ - 'description' => '商品所在平台 ae、icbu、lazada', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'ae', - ], + 'schema' => ['description' => '原图 URL,多张图片使用半角逗号进行分割;单次请求 URL 总数不能超过 20,且相同的 URL 只会被处理一次', 'type' => 'string', 'required' => true, 'example' => 'https://example.com/1.jpg,https://example.com/2.jpg,https://example.com/3.jpg'], ], [ - 'name' => 'Extra', + 'name' => 'SourceLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '扩展信息,json数据格式,可选字段', - 'type' => 'string', - 'required' => false, - 'example' => '{"product_id":"1212"}', - ], + 'schema' => ['description' => '源语种,支持的语种及对应的代码请参考[语言code](https://help.aliyun.com/document_detail/163584.html)', 'type' => 'string', 'required' => true, 'example' => 'zh'], ], [ - 'name' => 'CatLevelThreeId', + 'name' => 'TargetLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '三级类目Id,如没有类目数据则传入0', - 'type' => 'integer', - 'format' => 'int64', - 'required' => true, - 'docRequired' => true, - 'maximum' => '99999999999', - 'minimum' => '0', - 'example' => '111', - ], + 'schema' => ['description' => '目标语种,支持的语种及对应的代码请参考[语言code](https://help.aliyun.com/document_detail/163584.html)', 'type' => 'string', 'required' => true, 'example' => 'en'], ], [ - 'name' => 'CatLevelTwoId', + 'name' => 'Ext', 'in' => 'formData', - 'schema' => [ - 'description' => '二级类目Id,如没有类目数据则传入0', - 'type' => 'integer', - 'format' => 'int64', - 'required' => true, - 'docRequired' => true, - 'maximum' => '99999999999', - 'minimum' => '0', - 'example' => '222', - ], + 'schema' => ['description' => '扩展信息, JSON String 格式,里面可以包含的字段如下。'."\n" + .'- `needEditorData`:取值为字符串 `true`/`false`,默认为`false`,是否需要在结果中返回图片翻译译后编辑器数据,仅用于[自行接入图片翻译译后编辑器](https://help.aliyun.com/document_detail/2507676.html)时,获取数据使用'."\n" + .'- `ignoreEntityRecognize`:取值为字符串 `true`/`false`,默认为 `false`,电商领域图片翻译会自动判断文字是否在图片中的商品主体上,如果在,则略过翻译;使用本字段来控制是否进行上述判断,本字段对通用图片翻译无效', 'type' => 'string', 'required' => false, 'example' => '{"needEditorData": "false", "ignoreEntityRecognize": "true"}'], ], [ - 'name' => 'Keywords', + 'name' => 'CustomTaskId', 'in' => 'formData', - 'schema' => [ - 'description' => '关键词,多个词英文逗号分隔比如:hello,apple', - 'type' => 'string', - 'required' => false, - 'docRequired' => true, - 'example' => 'hello,apple', - ], + 'schema' => ['description' => '自定义任务 ID,用于防止短时间误操作重复请求;3 分钟内,相同自定义任务 ID 的请求只会被处理一次', 'type' => 'string', 'required' => false, 'example' => 'my_awesome_task_1'], + ], + [ + 'name' => 'Field', + 'in' => 'formData', + 'schema' => ['description' => '翻译领域, 可选值如下。'."\n" + .'- `general`:通用图片翻译'."\n" + .'- `e-commerce`:电商领域图片翻译'."\n" + ."\n" + .'默认及未识别领域均按通用图片翻译处理。', 'type' => 'string', 'required' => false, 'example' => 'general'], ], ], 'responses' => [ 200 => [ 'schema' => [ + 'title' => 'Schema of Response', + 'description' => '请求结果结构', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '状态码,200 表示正常', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '如果有错误,会输出错误信息', - 'type' => 'string', - 'example' => 'success', - ], - 'RequestId' => [ - 'description' => '请求唯一串,方便后期排查定位问题', - 'type' => 'string', - 'example' => 'D70487B4-8891-4D24-BB64-8788E53671FB', - ], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求标识', 'type' => 'string', 'example' => 'D774D33D-F1CB-5A2C-A787-E0A2179239CE'], + 'Message' => ['description' => '请求信息', 'type' => 'string', 'example' => 'OK'], + 'Code' => ['description' => '请求结果状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], 'Data' => [ - 'description' => '返回数据', + 'description' => '数据内容', 'type' => 'object', 'properties' => [ - 'Titles' => [ - 'description' => '自动生成的标题信息', - 'type' => 'string', - 'example' => 'Custom Hello Kitty PVC Cartoon Apple for Home Garden Complete Apple Bath Shower', - ], + 'TaskId' => ['description' => '任务 ID,用于后续获取翻译结果', 'type' => 'string', 'example' => 'EEA28E6D-4828-5031-BD8C-8FF1B3216842'], ], ], ], @@ -4341,163 +2846,124 @@ ], 'errorCodes' => [ 101 => [ - [ - 'errorCode' => 'System.RequestTimeOut', - 'errorMessage' => 'The request has timed out.', - ], - ], - [ - [ - 'errorCode' => 'System.Error', - 'errorMessage' => 'A system error occurred.', - ], + ['errorCode' => 'System.RequestTimeOut', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.UrlDecodingError', - 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', - ], + ['errorCode' => 'System.Error', 'errorMessage' => 'A system error occurred.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.ParameterError', - 'errorMessage' => 'Some required parameters are missing.', - ], + ['errorCode' => 'System.UrlDecodingError', 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.LanguageNotSupported', - 'errorMessage' => 'The specified language pair is not supported.', - ], + ['errorCode' => 'System.ParameterError', 'errorMessage' => 'Some required parameters are missing.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.LanguageDetectError', - 'errorMessage' => 'An error occurred while detecting the language.', - ], + ['errorCode' => 'System.LanguageNotSupported', 'errorMessage' => 'The specified language pair is not supported.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.TranslateError', - 'errorMessage' => 'An error occurred while translating.', - ], + ['errorCode' => 'System.LanguageDetectError', 'errorMessage' => 'An error occurred while detecting the language.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.StringTooLong', - 'errorMessage' => 'The maximum length of the specified string is exceeded.', - ], + ['errorCode' => 'System.TranslateError', 'errorMessage' => 'An error occurred while translating.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.subNotPermission', - 'errorMessage' => 'The sub-account is not authorized to perform the operation.', - ], + ['errorCode' => 'System.StringTooLong', 'errorMessage' => 'The maximum length of the specified string is exceeded.', 'description' => ''], ], - [ - [ - 'errorCode' => 'System.AccountNotActivated', - 'errorMessage' => 'The account has not activated the service.', - ], + 110 => [ + ['errorCode' => 'System.AccountNotActivated', 'errorMessage' => 'The account has not activated the service.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.SubServiceFailed', - 'errorMessage' => 'Sub-account service failed.', - ], + ['errorCode' => 'System.SubServiceFailed', 'errorMessage' => 'Sub-account service failed.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.TranslateServiceCallFailed', - 'errorMessage' => 'Failed to call the translation service.', - ], + ['errorCode' => 'System.TranslateServiceCallFailed', 'errorMessage' => 'Failed to call the translation service.', 'description' => ''], ], [ - [ - 'errorCode' => 'System.AccountNotActivatedOrInArrears', - 'errorMessage' => 'The service is not activated or the account has an outstanding balance.', - ], + ['errorCode' => 'System.AccountNotActivatedOrInArrears', 'errorMessage' => 'The service is not activated or the account has an outstanding balance.', 'description' => ''], ], - 199 => [ - [ - 'errorCode' => 'System.unknownError', - 'errorMessage' => 'An unknown error occurred.', + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '图片异步批量翻译', + 'summary' => '异步将一批图片上的文字从一种语言翻译成另一种语言,并分别输出新的图片。', + 'description' => '请确保在使用该接口前,已充分了解图片翻译产品的[收费方式和价格](https://help.aliyun.com/document_detail/163332.html)。'."\n" + ."\n" + .'该接口适用于**通用图片翻译**和**电商图片翻译**;如需调用证件翻译,请参考[证件翻译调用指南](https://help.aliyun.com/document_detail/163527.html)。'."\n" + ."\n" + .'**图片限制**'."\n" + ."\n" + .'- 文件大小限制:10MB'."\n" + .'- 像素限制:长宽比 < 10:1'."\n" + .'- 支持的格式:jpg, jpeg, png, bmp, gif(仅翻译第一帧), webp', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateImageBatch', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"success\\",\\n \\"RequestId\\": \\"D70487B4-8891-4D24-BB64-8788E53671FB\\",\\n \\"Data\\": {\\n \\"Titles\\": \\"Custom Hello Kitty PVC Cartoon Apple for Home Garden Complete Apple Bath Shower\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"D70487B4-8891-4D24-BB64-8788E53671FB\\nsuccess\\n\\n Custom Hello Kitty PVC Cartoon Apple for Home Garden Complete Apple Bath Shower\\n\\n200","errorExample":""}]', - 'title' => '标题智能生成调用指南', - 'description' => '>该接口已计划下线,不建议继续调用。>', - 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', - 'extraInfo' => ' ', + 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"D774D33D-F1CB-5A2C-A787-E0A2179239CE\\",\\n \\"Message\\": \\"OK\\",\\n \\"Code\\": 200,\\n \\"Data\\": {\\n \\"TaskId\\": \\"EEA28E6D-4828-5031-BD8C-8FF1B3216842\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n D774D33D-F1CB-5A2C-A787-E0A2179239CE\\n OK\\n 200\\n \\n EEA28E6D-4828-5031-BD8C-8FF1B3216842\\n \\n","errorExample":""}]', ], - 'OpenAlimtService' => [ - 'summary' => '商品服务开通。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'TranslateSearch' => [ + 'summary' => '搜索翻译', + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], + ], + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'], + 'parameters' => [ [ - 'APP' => [], + 'name' => 'FormatType', + 'in' => 'formData', + 'allowEmptyValue' => false, + 'schema' => ['title' => '幂等参数', 'type' => 'string', 'required' => true, 'example' => 'text'], ], [ - 'PrivateKey' => [], + 'name' => 'SourceLanguage', + 'in' => 'formData', + 'schema' => ['type' => 'string', 'required' => true, 'example' => 'zh'], ], [ - 'BearerToken' => [], + 'name' => 'TargetLanguage', + 'in' => 'formData', + 'schema' => ['type' => 'string', 'required' => true, 'example' => 'en'], ], - ], - 'operationType' => 'readAndWrite', - 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'none', - 'riskType' => 'none', - 'chargeType' => 'free', - 'tenantRelevance' => 'publicInformation', - ], - 'parameters' => [ [ - 'name' => 'Type', - 'in' => 'query', - 'schema' => [ - 'description' => '- 机器翻译 alimt'."\n" - ."\n" - .'- 定制化翻译服务 type = automl'."\n" - ."\n" - .'- 证件翻译 type=ct'."\n" - ."\n" - .'- 文档翻译 type=dt'."\n" - ."\n" - .'- 语种识别type=id'."\n", - 'type' => 'string', - 'required' => false, - 'example' => 'id', - ], + 'name' => 'Scene', + 'in' => 'formData', + 'schema' => ['type' => 'string', 'required' => true, 'example' => 'query'], + ], + [ + 'name' => 'SourceText', + 'in' => 'formData', + 'schema' => ['type' => 'string', 'required' => true, 'example' => '今天天气不错'], ], ], 'responses' => [ 200 => [ 'schema' => [ + 'title' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'OrderId' => [ - 'description' => '订单ID。', - 'type' => 'string', - 'example' => '123456', - ], - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => 'xxxx-xxxxx', + 'RequestId' => ['title' => 'Id of the request', 'type' => 'string'], + 'Code' => ['type' => 'string'], + 'Message' => ['type' => 'string'], + 'Data' => [ + 'type' => 'object', + 'properties' => [ + 'Translated' => ['type' => 'string'], + ], ], ], ], @@ -4505,499 +2971,861 @@ ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ORDER.OPEND', - 'errorMessage' => 'You have already open the service. Go to the console to start using it', - ], - [ - 'errorCode' => 'PRICEING.PLAN.RESULT.NOT.FOUND', - 'errorMessage' => 'The order is not found', + ['errorCode' => 'IdempotentParameterMismatch', 'errorMessage' => 'The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.', 'description' => ''], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateSearch', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"OrderId\\": \\"123456\\",\\n \\"RequestId\\": \\"xxxx-xxxxx\\"\\n}","errorExample":""}]', - 'title' => '商品服务开通', - 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', - 'extraInfo' => ' ', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"\\",\\n \\"Code\\": \\"\\",\\n \\"Message\\": \\"\\",\\n \\"Data\\": {\\n \\"Translated\\": \\"\\"\\n }\\n}","type":"json"}]', ], - 'GetTranslateReport' => [ - 'summary' => '根据API名及开始结束时间获取API调用报表,并根据传入的group按照天或者小时聚合计算后返回。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', + ], + 'endpoints' => [ + ['regionId' => 'ap-northeast-1', 'regionName' => '日本(东京)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'mt.aliyuncs.com', 'endpoint' => 'mt.aliyuncs.com', 'vpc' => ''], + ['regionId' => 'ap-southeast-1', 'regionName' => '新加坡', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'mt.ap-southeast-1.aliyuncs.com', 'endpoint' => 'mt.ap-southeast-1.aliyuncs.com', 'vpc' => 'mt-vpc.ap-southeast-1.aliyuncs.com'], + ['regionId' => 'ap-southeast-2', 'regionName' => '澳大利亚(悉尼)已关停', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'mt.aliyuncs.com', 'endpoint' => 'mt.aliyuncs.com', 'vpc' => ''], + ['regionId' => 'ap-southeast-3', 'regionName' => '马来西亚(吉隆坡)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'mt.aliyuncs.com', 'endpoint' => 'mt.aliyuncs.com', 'vpc' => ''], + ['regionId' => 'cn-beijing', 'regionName' => '华北2(北京)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'mt.aliyuncs.com', 'endpoint' => 'mt.aliyuncs.com', 'vpc' => 'mt-vpc.cn-beijing.aliyuncs.com'], + ['regionId' => 'cn-chengdu', 'regionName' => '西南1(成都)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'mt.aliyuncs.com', 'endpoint' => 'mt.aliyuncs.com', 'vpc' => ''], + ['regionId' => 'cn-hangzhou', 'regionName' => '华东1(杭州)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'mt.cn-hangzhou.aliyuncs.com', 'endpoint' => 'mt.cn-hangzhou.aliyuncs.com', 'vpc' => 'mt-inner.vpc-proxy.aliyuncs.com'], + ['regionId' => 'cn-hongkong', 'regionName' => '中国香港', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'mt.aliyuncs.com', 'endpoint' => 'mt.aliyuncs.com', 'vpc' => ''], + ['regionId' => 'cn-huhehaote', 'regionName' => '华北5(呼和浩特)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'mt.aliyuncs.com', 'endpoint' => 'mt.aliyuncs.com', 'vpc' => ''], + ['regionId' => 'cn-qingdao', 'regionName' => '华北1(青岛)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'mt.aliyuncs.com', 'endpoint' => 'mt.aliyuncs.com', 'vpc' => ''], + ['regionId' => 'cn-shanghai', 'regionName' => '华东2(上海)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'mt.aliyuncs.com', 'endpoint' => 'mt.aliyuncs.com', 'vpc' => 'mt-vpc.cn-shanghai.aliyuncs.com'], + ['regionId' => 'cn-shenzhen', 'regionName' => '华南1(深圳)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'mt.aliyuncs.com', 'endpoint' => 'mt.aliyuncs.com', 'vpc' => ''], + ['regionId' => 'cn-zhangjiakou', 'regionName' => '华北3(张家口)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'mt.aliyuncs.com', 'endpoint' => 'mt.aliyuncs.com', 'vpc' => 'mt-inner.vpc-proxy.aliyuncs.com'], + ['regionId' => 'us-west-1', 'regionName' => '美国(硅谷)', 'areaId' => 'europeAmerica', 'areaName' => '欧洲与美洲', 'public' => 'mt.aliyuncs.com', 'endpoint' => 'mt.aliyuncs.com', 'vpc' => ''], + ['regionId' => 'us-east-1', 'regionName' => '美国(弗吉尼亚)', 'areaId' => 'europeAmerica', 'areaName' => '欧洲与美洲', 'public' => 'mt.aliyuncs.com', 'endpoint' => 'mt.aliyuncs.com', 'vpc' => ''], + ['regionId' => 'eu-west-1', 'regionName' => '英国(伦敦)', 'areaId' => 'europeAmerica', 'areaName' => '欧洲与美洲', 'public' => 'mt.aliyuncs.com', 'endpoint' => 'mt.aliyuncs.com', 'vpc' => ''], + ['regionId' => 'eu-central-1', 'regionName' => '德国(法兰克福)', 'areaId' => 'europeAmerica', 'areaName' => '欧洲与美洲', 'public' => 'mt.aliyuncs.com', 'endpoint' => 'mt.aliyuncs.com', 'vpc' => ''], + ['regionId' => 'me-east-1', 'regionName' => '阿联酋(迪拜)', 'areaId' => 'middleEast', 'areaName' => '中东', 'public' => 'alimt.me-east-1.aliyuncs.com', 'endpoint' => 'alimt.me-east-1.aliyuncs.com', 'vpc' => ''], + ['regionId' => 'me-central-1', 'regionName' => '沙特(利雅得)', 'areaId' => 'middleEast', 'areaName' => '中东', 'public' => 'mt.me-central-1.aliyuncs.com', 'endpoint' => 'mt.me-central-1.aliyuncs.com', 'vpc' => 'mt-vpc.me-central-1.aliyuncs.com'], + ['regionId' => 'ap-south-1', 'regionName' => '印度(孟买)已关停', 'areaId' => 'middleEast', 'areaName' => '中东', 'public' => 'mt.aliyuncs.com', 'endpoint' => 'mt.aliyuncs.com', 'vpc' => ''], + ['regionId' => 'cn-shenzhen-finance-1', 'regionName' => '华南1 金融云', 'areaId' => 'industryCloud', 'areaName' => '行业云', 'public' => 'mt.aliyuncs.com', 'endpoint' => 'mt.aliyuncs.com', 'vpc' => ''], + ['regionId' => 'cn-shanghai-finance-1', 'regionName' => '华东2 金融云', 'areaId' => 'industryCloud', 'areaName' => '行业云', 'public' => 'mt.aliyuncs.com', 'endpoint' => 'mt.aliyuncs.com', 'vpc' => ''], + ['regionId' => 'cn-north-2-gov-1', 'regionName' => '北京政务云', 'areaId' => 'industryCloud', 'areaName' => '行业云', 'public' => 'mt.aliyuncs.com', 'endpoint' => 'mt.aliyuncs.com', 'vpc' => ''], + ['regionId' => 'cn-hangzhou-finance', 'regionName' => '华东1 金融云', 'areaId' => 'industryCloud', 'areaName' => '行业云', 'public' => 'mt.aliyuncs.com', 'endpoint' => 'mt.aliyuncs.com', 'vpc' => ''], + ['regionId' => 'cn-beijing-finance-1', 'regionName' => '华北2 金融云(邀测)', 'areaId' => 'industryCloud', 'areaName' => '行业云', 'public' => 'mt.aliyuncs.com', 'endpoint' => 'mt.aliyuncs.com', 'vpc' => ''], + ], + 'errorCodes' => [ + ['code' => '10002', 'message' => 'A system error occurred.', 'http_code' => 500, 'description' => '系统错误'], + ['code' => '10009', 'message' => 'The RAM user is not authorized to perform this operation.', 'http_code' => 403, 'description' => '子账号没有权限'], + ['code' => '10010', 'message' => 'You have not activated this service.', 'http_code' => 400, 'description' => '账号没有开通服务'], + ['code' => '10011', 'message' => 'An error occurred while invoking the RAM user service.', 'http_code' => 500, 'description' => '子账号服务失败'], + ['code' => '10012', 'message' => 'An error occurred while calling the translation service.', 'http_code' => 500, 'description' => '翻译服务调用失败'], + ['code' => '10013', 'message' => 'You have not activated the account service or the account service has overdue bills.', 'http_code' => 400, 'description' => '账号服务没有开通或者欠费'], + ['code' => '10021', 'message' => 'The parameter is invalid.', 'http_code' => 400, 'description' => '参数无效。'], + ['code' => '10022', 'message' => 'The parameter fileUrl is invalid.', 'http_code' => 400, 'description' => '参数fileUrl非法。'], + ['code' => '10023', 'message' => 'The parameter fileUrl is not accessible.', 'http_code' => 400, 'description' => '参数fileUrl无法访问。'], + ['code' => '10024', 'message' => 'The parameter callbackUrl is invalid.', 'http_code' => 400, 'description' => '参数callbackUrl非法。'], + ['code' => '10025', 'message' => 'The specified task does not exist.', 'http_code' => 404, 'description' => '指定的任务不存在。'], + ['code' => '10026', 'message' => 'Failed to translate the certificate. Please check the parameters.', 'http_code' => 400, 'description' => '证件翻译失败,请检查提交的参数。'], + ['code' => '10027', 'message' => 'The parameter imageUrl is not accessible.', 'http_code' => 400, 'description' => '参数imageUrl无法访问。'], + ['code' => '10028', 'message' => 'The QPS of the API operation exceeds limit.', 'http_code' => 400, 'description' => '接口QPS过高'], + ['code' => '10029', 'message' => 'The number of calls per day exceeds the limit.', 'http_code' => 403, 'description' => '超出单日调用次数限制。'], + ['code' => '10030', 'message' => 'The file size exceeds the limit.', 'http_code' => 400, 'description' => '文件大小超过了限制。'], + ['code' => '10031', 'message' => 'The specified file type is invalid.', 'http_code' => 400, 'description' => '文件类型不支持。'], + ['code' => 'CidDebtOverQuota', 'message' => 'Your bill is overdue. Please check your bill.', 'http_code' => 400, 'description' => '用户账户已经欠费,请检查您的账单。'], + ['code' => 'Forbbiden', 'message' => 'You are not authorized to operate on the specified resource.', 'http_code' => 403, 'description' => '用户未被授权操作指定的资源。'], + ['code' => 'ImageTranslate.EraseError', 'message' => 'Image erasing error.', 'http_code' => 500, 'description' => '擦图错误'], + ['code' => 'ImageTranslate.FusionError', 'message' => 'Image fusion error.', 'http_code' => 500, 'description' => '合图错误'], + ['code' => 'ImageTranslate.TextToParagraphError', 'message' => 'Text to paragraph error.', 'http_code' => 500, 'description' => '段落合并错误'], + ['code' => 'ImageTranslate.TextTranslationError', 'message' => 'Text translation error.', 'http_code' => 500, 'description' => '文本翻译错误'], + ['code' => 'ImageTranslate.TranslationError', 'message' => 'Image translation error.', 'http_code' => 500, 'description' => '图片翻译错误'], + ['code' => 'ImageTranslateParamsInvalid', 'message' => 'Picture translation parameter error.', 'http_code' => 400, 'description' => '图片翻译参数错误'], + ['code' => 'Internal.Error', 'message' => 'The internal service connection timeout, please try again later.', 'http_code' => 503, 'description' => '后端服务超时,请稍后重试'], + ['code' => 'InternalError', 'message' => 'An error occurred while processing your request.', 'http_code' => 500, 'description' => '未知错误。'], + ['code' => 'InvalidAccountStatus', 'message' => 'The Machine Translation service has not been activated.', 'http_code' => 400, 'description' => '用户未开通机器翻译服务。'], + ['code' => 'InvalidAccountStatus.ServiceUnavailable', 'message' => 'The service has not been activated.', 'http_code' => 403, 'description' => '服务未开通。'], + ['code' => 'LanguageSpellingError', 'message' => 'Language spelling error.', 'http_code' => 400, 'description' => '语种拼写错误'], + ['code' => 'Limitexceeded', 'message' => 'Limit exceeded.', 'http_code' => 400, 'description' => '超出限制'], + ['code' => 'NewUserQuotaExceed', 'message' => 'One-day temporary limit for new users exceeded.', 'http_code' => 400, 'description' => '超出新用户单日临时限额'], + ['code' => 'ORDER.OPEND', 'message' => 'You have already open the service. Go to the console to start using it', 'http_code' => 400, 'description' => '您已经开通了服务,转到控制台开始使用'], + ['code' => 'Parameter.ImageFileSizeError', 'message' => 'The image file size should be within 10 MB.', 'http_code' => 406, 'description' => '图片大小超出限制,需在10MB以内'], + ['code' => 'Parameter.ImageFormatError', 'message' => 'The image format is not supported.', 'http_code' => 406, 'description' => '图片格式不支持'], + ['code' => 'Parameter.ImageSizeError', 'message' => 'Image size should be within 15px to 8192px.', 'http_code' => 406, 'description' => '图片尺寸超出限制,需在15px到8192px之间'], + ['code' => 'Parameter.ImageUrlError', 'message' => 'Failed to obtain the image from the URL.', 'http_code' => 406, 'description' => '从URL下载图片失败'], + ['code' => 'Parameter.SourceLangError', 'message' => 'Source languages are not supported.', 'http_code' => 400, 'description' => '源语种不支持。'], + ['code' => 'Parameter.TargetLangError', 'message' => 'Target languages are not supported.', 'http_code' => 400, 'description' => '目标语种不支持。'], + ['code' => 'RepeatInvoke', 'message' => 'Repeated calls.', 'http_code' => 400, 'description' => '重复调用'], + ['code' => 'RepeatInvoke', 'message' => 'repeat invoke.', 'http_code' => 400, 'description' => '重复调用'], + ['code' => 'REQUESTS.OVER.LIMIT', 'message' => 'The request is too frequent, please try again later.', 'http_code' => 429, 'description' => '请求过于频繁,请稍后重试'], + ['code' => 'ServiceUnavailable', 'message' => 'An error occurred while processing your request.', 'http_code' => 503, 'description' => '服务内部错误。'], + ['code' => 'SourceTextEmpty', 'message' => 'Originalempty.', 'http_code' => 400, 'description' => '原文空'], + ['code' => 'Sub account service failed', 'message' => 'Subaccountservicefailed.', 'http_code' => 111, 'description' => '子账号服务失败'], + ['code' => 'System.AccountNotActivated', 'message' => 'The account has not activated the service.', 'http_code' => 400, 'description' => '账号没有开通服务'], + ['code' => 'System.AccountNotActivatedOrInArrears', 'message' => 'The service is not activated or the account has an outstanding balance.', 'http_code' => 400, 'description' => '账号服务没有开通或者欠费'], + ['code' => 'System.Error', 'message' => 'A system error occurred.', 'http_code' => 500, 'description' => '系统错误'], + ['code' => 'System.LanguageDetectError', 'message' => 'An error occurred while detecting the language.', 'http_code' => 500, 'description' => '语种识别错误'], + ['code' => 'System.LanguageNotSupported', 'message' => 'The specified language pair is not supported.', 'http_code' => 400, 'description' => '该语向不支持'], + ['code' => 'System.ParameterError', 'message' => 'Some required parameters are missing.', 'http_code' => 400, 'description' => '参数错误'], + ['code' => 'System.RequestTimeOut', 'message' => 'The request has timed out.', 'http_code' => 500, 'description' => '请求超时'], + ['code' => 'System.StringTooLong', 'message' => 'The maximum length of the specified string is exceeded.', 'http_code' => 400, 'description' => '字符过长'], + ['code' => 'System.subNotPermission', 'message' => 'The sub-account is not authorized to perform the operation.', 'http_code' => 403, 'description' => '子账号没有权限'], + ['code' => 'System.SubServiceFailed', 'message' => 'Sub-account service failed.', 'http_code' => 500, 'description' => '子账号服务失败'], + ['code' => 'System.TranslateError', 'message' => 'An error occurred while translating.', 'http_code' => 500, 'description' => '翻译错误'], + ['code' => 'System.TranslateServiceCallFailed', 'message' => 'Failed to call the translation service.', 'http_code' => 500, 'description' => '翻译服务调用失败'], + ['code' => 'System.unknownError', 'message' => 'An unknown error occurred.', 'http_code' => 500, 'description' => '未知错误'], + ['code' => 'System.UrlDecodingError', 'message' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', 'http_code' => 500, 'description' => 'URL编码错误'], + ['code' => 'Timeout', 'message' => 'Request timeout. Please retry again later.', 'http_code' => 500, 'description' => '请求超时'], + ], + 'changeSet' => [], + 'ram' => [ + 'productCode' => 'Alimt', + 'productName' => '机器翻译', + 'ramCodes' => ['alimtautoml', 'alimt'], + 'ramLevel' => '操作级', + 'ramConditions' => [], + 'ramActions' => [ + [ + 'apiName' => 'QueryResourcePackage', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:QueryResourcePackage', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], ], - 'security' => [ - [ - 'AK' => [], + [ + 'apiName' => 'CreateImageTranslateTask', + 'description' => '创建异步图片翻译调用指南', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'alimt:CreateImageTranslateTask', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], - 'operationType' => 'read', - 'systemTags' => [ + [ + 'apiName' => 'GetTranslateReport', + 'description' => '获取调用接口报表', 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - 'tenantRelevance' => 'publicInformation', - ], - 'parameters' => [ - [ - 'name' => 'BeginTime', - 'in' => 'query', - 'schema' => [ - 'description' => '起始时间。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => '2021-03-01 00:00:00', + 'ramAction' => [ + 'action' => 'alimt:GetTranslateReport', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'EndTime', - 'in' => 'query', - 'schema' => [ - 'description' => '结束时间', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => '2021-03-01 23:59:59', + ], + [ + 'apiName' => 'GetDocTranslateTask', + 'description' => '查询文档翻译任务', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetDocTranslateTask', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'ApiName', - 'in' => 'query', - 'schema' => [ - 'description' => 'API名称'."\n" - ."\n" - .'- 机器翻译通用版:translate_standard'."\n" - .'- 机器翻译专业版:translate_ecommerce'."\n" - .'- 语种识别:predict_detect'."\n" - .'- 通用图片翻译:it_general'."\n" - .'- 电商图片翻译:it_ecommerce'."\n" - .'- 文档翻译:dt_page'."\n" - .'- 身份证翻译:ct_idcard'."\n" - .'- 驾照翻译:ct_driving', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'translate_standard', + ], + [ + 'apiName' => 'GetCertificateUserStatus', + 'description' => '', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetCertificateUserStatus', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'Group', - 'in' => 'query', - 'schema' => [ - 'description' => '分组。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'hour或者day', + ], + [ + 'apiName' => 'GetMtUserStatus', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:GetMtUserStatus', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'type' => 'object', - 'properties' => [ - 'Code' => [ - 'description' => '错误码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '返回信息', - 'type' => 'string', - 'example' => 'success', - ], - 'Data' => [ - 'description' => '返回内容', - 'type' => 'string', - 'example' => '{"result":[{"time":"2021-10-21 00:00:00","total":100}]}', - ], - 'RequestId' => [ - 'description' => '请求ID', - 'type' => 'string', - 'example' => '86D18195-D89C-4C8C-9DC4-5FCE789CE6D5', - ], - ], + [ + 'apiName' => 'OcrPluginService', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:OcrPluginService', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'errorCodes' => [ - 109 => [ - [ - 'errorCode' => '10009', - 'errorMessage' => '子账号没有权限', + [ + 'apiName' => 'DoCheckResource', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:DoCheckResource', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - [ - 'errorCode' => '10010', - 'errorMessage' => '账号没有开通服务', + ], + [ + 'apiName' => 'DeleteIntervention', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:DeleteIntervention', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - [ - 'errorCode' => '10011', - 'errorMessage' => '子账号服务失败', + ], + [ + 'apiName' => 'GetAsyncTranslate', + 'description' => '获取文本异步翻译任务', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:GetAsyncTranslate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - [ - 'errorCode' => '10012', - 'errorMessage' => '翻译服务调用失败', + ], + [ + 'apiName' => 'GetOssInfo', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:GetOssInfo', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - [ - 'errorCode' => '10013', - 'errorMessage' => '账号服务没有开通或者欠费', + ], + [ + 'apiName' => 'GetImageTranslate', + 'description' => '商品图片智能翻译', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetImageTranslate', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - 199 => [ - [ - 'errorCode' => '19999', - 'errorMessage' => 'An unknown error occurred.', + ], + [ + 'apiName' => 'GetBatchTranslate', + 'description' => '机器批量翻译调用指南', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetBatchTranslate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"success\\",\\n \\"Data\\": \\"{\\\\\\"result\\\\\\":[{\\\\\\"time\\\\\\":\\\\\\"2021-10-21 00:00:00\\\\\\",\\\\\\"total\\\\\\":100}]}\\",\\n \\"RequestId\\": \\"86D18195-D89C-4C8C-9DC4-5FCE789CE6D5\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 200\\n success\\n {\\"result\\":[{\\"time\\":\\"2021-10-21 00:00:00\\",\\"total\\":100}]}\\n 86D18195-D89C-4C8C-9DC4-5FCE789CE6D5\\n","errorExample":""}]', - 'title' => '获取调用接口报表', - 'description' => '请确保在使用该接口前,已充分了解机器翻译产品的收费方式和[价格](https://help.aliyun.com/document_detail/457279.html)', - ], - 'TranslateSearch' => [ - 'summary' => '搜索翻译', - 'methods' => [ - 'post', + [ + 'apiName' => 'GetDetectLanguage', + 'description' => '语种识别调用指南', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetDetectLanguage', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], ], - 'schemes' => [ - 'https', + [ + 'apiName' => 'UpdateInterventionData', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:UpdateInterventionData', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], ], - 'security' => [ - [ - 'AK' => [], + [ + 'apiName' => 'TranslateECommerce', + 'description' => '机器翻译电商版调用', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateECommerce', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], - 'operationType' => 'readAndWrite', - 'deprecated' => false, - 'systemTags' => [ + [ + 'apiName' => 'DeleteInterventionData', + 'description' => '', 'operationType' => 'none', - 'riskType' => 'none', - 'chargeType' => 'free', - 'tenantRelevance' => 'publicInformation', + 'ramAction' => [ + 'action' => 'alimt:DeleteInterventionData', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], ], - 'parameters' => [ - [ - 'name' => 'FormatType', - 'in' => 'formData', - 'allowEmptyValue' => false, - 'schema' => [ - 'title' => '幂等参数', - 'type' => 'string', - 'required' => true, - 'example' => 'text', + [ + 'apiName' => 'Translate', + 'description' => '机器翻译专业版调用', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:Translate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'SourceLanguage', - 'in' => 'formData', - 'schema' => [ - 'type' => 'string', - 'required' => true, - 'example' => 'zh', + ], + [ + 'apiName' => 'FindInterventionData', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:FindInterventionData', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'TargetLanguage', - 'in' => 'formData', - 'schema' => [ - 'type' => 'string', - 'required' => true, - 'example' => 'en', + ], + [ + 'apiName' => 'OpenAlimtService', + 'description' => '商品服务开通', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:OpenAlimtService', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'Scene', - 'in' => 'formData', - 'schema' => [ - 'type' => 'string', - 'required' => true, - 'example' => 'query', + ], + [ + 'apiName' => 'GetImageDiagnose', + 'description' => '图片诊断', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetImageDiagnose', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'SourceText', - 'in' => 'formData', - 'schema' => [ - 'type' => 'string', - 'required' => true, - 'example' => '今天天气不错', + ], + [ + 'apiName' => 'GetImageTranslateTask', + 'description' => '获取异步图片翻译结果', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetImageTranslateTask', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'title' => 'Schema of Response', - 'type' => 'object', - 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'type' => 'string', - ], - 'Code' => [ - 'type' => 'string', - ], - 'Message' => [ - 'type' => 'string', - ], - 'Data' => [ - 'type' => 'object', - 'properties' => [ - 'Translated' => [ - 'type' => 'string', - ], - ], - ], - ], + [ + 'apiName' => 'TranslateBatchProduct', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateBatchProduct', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'errorCodes' => [ - 400 => [ - [ - 'errorCode' => 'IdempotentParameterMismatch', - 'errorMessage' => 'The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.', + [ + 'apiName' => 'DomainSearch', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:DomainSearch', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + [ + 'apiName' => 'TranslateBySPInner', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateBySPInner', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], ], - 'responseDemo' => '', - ], - ], - 'endpoints' => [ - [ - 'regionId' => 'me-central-1', - 'endpoint' => 'mt.me-central-1.aliyuncs.com', - ], - [ - 'regionId' => 'ap-southeast-1', - 'endpoint' => 'mt.ap-southeast-1.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hangzhou', - 'endpoint' => 'mt.cn-hangzhou.aliyuncs.com', - ], - [ - 'regionId' => 'ap-northeast-1', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'ap-northeast-2-pop', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'ap-south-1', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'ap-southeast-2', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'ap-southeast-3', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-beijing', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-beijing-finance-1', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-beijing-finance-pop', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-beijing-gov-1', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-beijing-nu16-b01', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-chengdu', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-edge-1', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-fujian', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-haidian-cm12-c01', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hangzhou-bj-b01', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hangzhou-finance', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hangzhou-internal-prod-1', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hangzhou-internal-test-1', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hangzhou-internal-test-2', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hangzhou-internal-test-3', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hangzhou-test-306', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hongkong', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-hongkong-finance-pop', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-huhehaote', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-north-2-gov-1', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-qingdao', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-qingdao-nebula', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shanghai', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shanghai-et15-b01', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shanghai-et2-b01', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shanghai-finance-1', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shanghai-inner', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shanghai-internal-test-1', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shenzhen', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shenzhen-finance-1', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shenzhen-inner', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shenzhen-st4-d01', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-shenzhen-su18-b01', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-wuhan', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-yushanfang', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-zhangbei-na61-b01', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-zhangjiakou', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-zhangjiakou-na62-a01', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'cn-zhengzhou-nebula-1', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'eu-central-1', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'eu-west-1', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'eu-west-1-oxs', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'me-east-1', - 'endpoint' => 'alimt.me-east-1.aliyuncs.com', - ], - [ - 'regionId' => 'rus-west-1-pop', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'us-east-1', - 'endpoint' => 'mt.aliyuncs.com', - ], - [ - 'regionId' => 'us-west-1', - 'endpoint' => 'mt.aliyuncs.com', + [ + 'apiName' => 'TranslateProduct', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateProduct', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'GetDetectLanguageVpc', + 'description' => '', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetDetectLanguageVpc', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'FindInterventionTask', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:FindInterventionTask', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'QueryOpenStatusLingjie', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:QueryOpenStatusLingjie', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'TranslateImageBatch', + 'description' => '图片异步批量翻译', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateImageBatch', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'SaveInterventionData', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:SaveInterventionData', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'TranslateImage', + 'description' => '图片翻译', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateImage', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'TranslateSearch', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateSearch', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'QueryApiInvokeCountLingjie', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:QueryApiInvokeCountLingjie', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'GetTranslateImageBatchResult', + 'description' => '图片异步批量翻译结果获取', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:GetTranslateImageBatchResult', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'GetUser', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:GetUser', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'QueryOpenStatusDetailLingjie', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:QueryOpenStatusDetailLingjie', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'RecommendProject', + 'description' => '', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:RecommendProject', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'TranslateInterventionDataReview', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateInterventionDataReview', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'CreateInterventionTask', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:CreateInterventionTask', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'GetTranslatedFile', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:GetTranslatedFile', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'GetTitleDiagnose', + 'description' => '标题诊断调用指南', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetTitleDiagnose', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'SubmitTranslateFile', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:SubmitTranslateFile', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'TranslateBySP', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateBySP', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'GetTitleIntelligence', + 'description' => '标题智能生成调用指南', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetTitleIntelligence', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'TranslateGeneral', + 'description' => '机器翻译通用版调用', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateGeneral', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'TranslateGeneralVpc', + 'description' => '通用文本翻译', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateGeneralVpc', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'DolphinDomainSearch', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:DolphinDomainSearch', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'RecommendCompany', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:RecommendCompany', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'CreateAsyncTranslate', + 'description' => '创建文本异步翻译任务', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:CreateAsyncTranslate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'TranslateCertificate', + 'description' => '证件翻译', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateCertificate', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'GetTitleGenerate', + 'description' => '标题优化调用指南', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetTitleGenerate', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'CreateDocTranslateTask', + 'description' => '创建文档翻译任务', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'alimt:CreateDocTranslateTask', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'GetBatchTranslateByVPC', + 'description' => '文本批量翻译', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetBatchTranslateByVPC', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'QueryApiInvokeQpsLingjie', + 'description' => '', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:QueryApiInvokeQpsLingjie', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + ], + 'resourceTypes' => [ + ['validationType' => 'always', 'resourceType' => 'QueryResourcePackage', 'arn' => 'acs:alimt::{#accountId}:queryresourcepackage/*'], + ['validationType' => 'always', 'resourceType' => 'CreateImageTranslateTask', 'arn' => 'acs:alimt:*:{#accountId}:*'], + ['validationType' => 'always', 'resourceType' => 'GetTranslateReport', 'arn' => 'acs:alimt:*:{#accountId}:*'], + ['validationType' => 'always', 'resourceType' => 'GetImageTranslate', 'arn' => 'acs:alimt:*:{#accountId}:*'], + ['validationType' => 'always', 'resourceType' => 'UpdateInterventionData', 'arn' => 'acs:alimt::{#accountId}:updateinterventiondata/*'], + ['validationType' => 'always', 'resourceType' => 'DeleteInterventionData', 'arn' => 'acs:alimt::{#accountId}:deleteinterventiondata/*'], + ['validationType' => 'always', 'resourceType' => 'OpenAlimtService', 'arn' => 'acs:alimt:*:{#accountId}:*'], + ['validationType' => 'always', 'resourceType' => 'GetImageDiagnose', 'arn' => 'acs:alimt::{#accountId}:getimagediagnose/*'], + ['validationType' => 'always', 'resourceType' => 'GetImageTranslateTask', 'arn' => 'acs:alimt:*:{#accountId}:*'], + ['validationType' => 'always', 'resourceType' => 'TranslateBatchProduct', 'arn' => 'acs:alimt::{#accountId}:translatebatchproduct/*'], + ['validationType' => 'always', 'resourceType' => 'FindInterventionTask', 'arn' => 'acs:alimt::{#accountId}:findinterventiontask/*'], + ['validationType' => 'always', 'resourceType' => 'TranslateImageBatch', 'arn' => 'acs:alimt:*:{#accountId}:*'], + ['validationType' => 'always', 'resourceType' => 'SaveInterventionData', 'arn' => 'acs:alimt::{#accountId}:saveinterventiondata/*'], + ['validationType' => 'always', 'resourceType' => 'GetTranslateImageBatchResult', 'arn' => 'acs:alimt:*:{#accountId}:*'], + ['validationType' => 'always', 'resourceType' => 'GetUser', 'arn' => 'acs:alimt:*:{#accountId}:*'], + ['validationType' => 'always', 'resourceType' => 'TranslateInterventionDataReview', 'arn' => 'acs:alimt:{#regionId}:{#accountId}:translateinterventiondatareview/*'], + ['validationType' => 'always', 'resourceType' => 'GetTitleDiagnose', 'arn' => 'acs:alimt:*:{#accountId}:*'], + ['validationType' => 'always', 'resourceType' => 'GetTitleIntelligence', 'arn' => 'acs:alimt:*:{#accountId}:*'], + ['validationType' => 'always', 'resourceType' => 'Unrestricted', 'arn' => 'acs:alimt:*:{#accountid}:*'], + ['validationType' => 'always', 'resourceType' => 'GetTitleGenerate', 'arn' => 'acs:alimt:*:{#accountId}:*'], ], ], ]; -- cgit v1.2.3