diff options
| author | Zhineng Li <im@zhineng.li> | 2026-07-12 17:11:17 +0800 |
|---|---|---|
| committer | Zhineng Li <im@zhineng.li> | 2026-07-12 17:11:17 +0800 |
| commit | 1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634 (patch) | |
| tree | 5f0857666365b7e40cdaa3733ebe1f3ba9e13c67 /data/zh_cn/alimt/2018-10-12 | |
| parent | 7347bac4ab7e136157fc94777e6cf87ef9e08599 (diff) | |
| download | afterglow-metadata-full-1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634.tar.gz afterglow-metadata-full-1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634.zip | |
update APIs 20260712
Diffstat (limited to 'data/zh_cn/alimt/2018-10-12')
| -rw-r--r-- | data/zh_cn/alimt/2018-10-12/api-docs.php | 6322 |
1 files changed, 2575 insertions, 3747 deletions
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 @@ <?php return [ 'version' => '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' => '原文语言,<props="china">[参考语言code](https://help.aliyun.com/document_detail/215387.html)</ph></props><props="intl">[参考语言code](https://www.alibabacloud.com/help/zh/machine-translation/latest/machine-translation-language-code-list)</ph></props>', - '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' => '译文语言,<props="china">[参考语言code](https://help.aliyun.com/document_detail/215387.html)</ph></props><props="intl">[参考语言code](https://www.alibabacloud.com/help/zh/machine-translation/latest/machine-translation-language-code-list)</ph></props>', - '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,324 @@ ], '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.', 'description' => ''], ], [ - [ - 'errorCode' => '10002', - 'errorMessage' => 'A system error occurred.', - ], + ['errorCode' => '10004', 'errorMessage' => 'Some required parameters are missing.', 'description' => ''], ], [ - [ - 'errorCode' => '10003', - 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', - ], + ['errorCode' => '10005', 'errorMessage' => 'The specified language pair is not supported.', 'description' => ''], ], [ - [ - 'errorCode' => '10004', - 'errorMessage' => 'Some required parameters are missing.', - ], + ['errorCode' => '10006', 'errorMessage' => 'An error occurred while detecting the language.', 'description' => ''], ], [ - [ - 'errorCode' => '10005', - 'errorMessage' => 'The specified language pair is not supported.', - ], + ['errorCode' => '10007', 'errorMessage' => 'An error occurred while translating.', 'description' => ''], ], [ - [ - 'errorCode' => '10006', - 'errorMessage' => 'An error occurred while detecting the language.', - ], + ['errorCode' => '10008', 'errorMessage' => 'The specified string is too long.', 'description' => ''], + ], + 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' => '证件翻译失败,请检查提交的参数。'], + ], + 403 => [ + ['errorCode' => '10009', 'errorMessage' => 'The RAM user is not authorized to perform this operation.', 'description' => '子账号没有权限'], ], [ - [ - 'errorCode' => '10007', - 'errorMessage' => 'An error occurred while translating.', + ['errorCode' => '10025', 'errorMessage' => 'The specified task does not exist.', 'description' => '指定的任务不存在。'], + ], + 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' => '翻译服务调用失败'], + ], + ], + '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' => '*'], + ], ], ], + ], + ], + 'CreateDocTranslateTask' => [ + 'summary' => '创建文档翻译任务。', + 'methods' => ['post'], + 'schemes' => ['http', 'https'], + 'security' => [ [ - [ - 'errorCode' => '10008', - 'errorMessage' => 'The specified string is too long.', - ], + 'AK' => [], ], + ], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ [ - [ - 'errorCode' => '10009', - 'errorMessage' => '子账号没有权限', - ], + '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'], ], [ - [ - 'errorCode' => '10010', - 'errorMessage' => '账号没有开通服务', - ], + 'name' => 'TargetLanguage', + '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'], ], [ - [ - 'errorCode' => '10011', - 'errorMessage' => '子账号服务失败', - ], + 'name' => 'FileUrl', + 'in' => 'formData', + 'schema' => ['description' => '文档URL。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'http://fileUrl', 'isFileTransferUrl' => true], ], [ - [ - 'errorCode' => '10012', - 'errorMessage' => '翻译服务调用失败', - ], + 'name' => 'Scene', + 'in' => 'formData', + 'schema' => ['description' => '场景,支持:通用(general)、商品标题(title)、商品详情(description)、买卖家沟通(message)、医疗(medical)、社交(social)、科技(tech)。', 'type' => 'string', 'required' => false, 'docRequired' => false, 'example' => 'general', 'default' => 'general'], + ], + [ + 'name' => 'CallbackUrl', + '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'], ], [ - [ - 'errorCode' => '10013', - 'errorMessage' => '账号服务没有开通或者欠费', + 'name' => 'ClientToken', + 'in' => 'formData', + 'schema' => ['description' => '提供幂等能力,3分钟内,相同的值只会生效一次。', 'type' => 'string', 'required' => false, 'docRequired' => false, 'example' => 'token'], + ], + ], + 'responses' => [ + 200 => [ + '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'], + ], + 'description' => '', ], ], + ], + 'errorCodes' => [ + 109 => [ + ['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.', - ], + ['errorCode' => '19999', 'errorMessage' => 'An unknown error occurred.', 'description' => ''], + ], + 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' => '重复调用'], + ], + 403 => [ + ['errorCode' => '10029', 'errorMessage' => 'The number of calls per day exceeds the limit.', 'description' => '超出单日调用次数限制。'], + ], + 429 => [ + ['errorCode' => 'REQUESTS.OVER.LIMIT', 'errorMessage' => 'The request is too frequent, please try again later.', '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":"<TranslateGeneralResponse>\\n <RequestId>14E447CA-B93B-4526-ACD7-42AE13CC2AF6</RequestId>\\n <Data>\\n <Translated>Hello</Translated>\\n </Data>\\n <Code>200</Code>\\n</TranslateGeneralResponse>","errorExample":""}]', - 'title' => '机器翻译通用版调用', - 'description' => '注意事项'."\n" - .'1、QPS限制50,如有扩展需求,请与我们联系。钉钉群号:23369411'."\n" - .'<props="intl">2、请确保在使用该接口前,已充分了解通用版翻译产品的收费方式和价格</ph></props>'."\n" - .'<props="china">2、字符长度上限是5000字符,若超出上限,可以保存成文件,使用[文档翻译](https://help.aliyun.com/document_detail/164151.html)</ph></props>'."\n" - .'<props="china">3、请确保在使用该接口前,已充分了解通用版翻译产品的收费方式和价格</ph></props>', + 'title' => '创建文档翻译任务', + 'description' => '> 仅支持通过POST方式调用', 'requestParamsDescription' => ' ', - 'responseParamsDescription' => '<props="china">公共请求参数参见[《RPC 调用机制》公共请求参数组装方案](https://help.aliyun.com/document_detail/315526.html?spm=a2c4g.158244.0.0.34b627b5qv5gmt#sectiondiv-qq5-utu-r7a)</ph></props>', + 'responseParamsDescription' => ' ', 'extraInfo' => ' ', - ], - 'Translate' => [ - 'summary' => '调用机器翻译专业版获取翻译结果。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', + '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":"<CreateDocTranslateTaskResponse>\\n <requestId>D3920BC3-A395-4CAD-9E84-7C39EB07507B</requestId>\\n <taskId>0586df512c8b4bb382d7d9a6a01b5854</taskId>\\n <status>ready</status>\\n</CreateDocTranslateTaskResponse>","errorExample":""}]', + ], + 'CreateImageTranslateTask' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], - [ - 'BearerToken' => [], - ], ], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'none', - 'riskType' => 'none', - 'chargeType' => 'free', - 'tenantRelevance' => 'publicInformation', - ], + 'systemTags' => ['operationType' => 'create', 'riskType' => 'high', 'chargeType' => 'paid', 'tenantRelevance' => 'publicInformation'], 'parameters' => [ [ - 'name' => 'FormatType', - 'in' => 'formData', - 'schema' => [ - 'description' => '翻译文本的格式,**html**( 网页格式。设置此参数将对待翻译文本以及翻译后文本按照html格式进行处理)、**text**(文本格式。设置此参数将对传入待翻译文本以及翻译后结果不做文本格式处理,统一按纯文本格式处理。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'text', - ], - ], - [ - 'name' => 'TargetLanguage', + 'name' => 'UrlList', 'in' => 'formData', - 'schema' => [ - 'description' => '译文语言,<props="china">[参考语言code](https://help.aliyun.com/document_detail/215387.html)</ph></props><props="intl">[参考语言code](https://www.alibabacloud.com/help/zh/machine-translation/latest/machine-translation-language-code-list)</ph></props>', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'en', - ], + 'schema' => ['description' => '图片翻译链接,多张图片通过英文逗号分隔,图片数量不能超过20张', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'http://xxx,http://yyy'], ], [ 'name' => 'SourceLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '原文语言,<props="china">[参考语言code](https://help.aliyun.com/document_detail/215387.html)</ph></props><props="intl">[参考语言code](https://www.alibabacloud.com/help/zh/machine-translation/latest/machine-translation-language-code-list)</ph></props>', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'zh', - ], + 'schema' => ['description' => '图片原始语种', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'zh'], ], [ - 'name' => 'SourceText', + 'name' => 'TargetLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '待翻译内容', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => '你好', - 'maxLength' => 256000, - ], + 'schema' => ['description' => '图片翻译目标语种', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'en'], ], [ - 'name' => 'Scene', + 'name' => 'Extra', 'in' => 'formData', - 'schema' => [ - 'description' => '场景可选取值:商品标题(title),商品描述(description),商品沟通(communication),医疗(medical),社交(social),金融(finance)', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'title', - ], + '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' => 'Context', - 'in' => 'query', - 'schema' => [ - 'title' => '新增context', - 'description' => '上下文信息,可选填', - 'type' => 'string', - 'required' => false, - 'example' => '早上我在家里吃了面包', - ], + 'name' => 'ClientToken', + 'in' => 'formData', + 'schema' => ['description' => '提供幂等能力,3分钟内,相同的值只会生效一次', 'type' => 'string', 'required' => false, 'example' => '1'], ], ], 'responses' => [ @@ -421,265 +451,237 @@ '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' => '状态码,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' => 'Hello', - ], - 'WordCount' => [ - 'description' => '总单词数', - 'type' => 'string', - 'example' => '10', - ], - 'DetectedLanguage' => [ - 'description' => '源语言传入auto时,语种识别后的源语言代码', - 'type' => 'string', - 'example' => 'zh', - ], + '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' => '><notice>该接口已计划下线,不建议继续调用。></notice>', + '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":"<Message>ok</Message>\\n<RequestId>A41F6E25-8520-4AF0-90EF-AF7E32840108</RequestId>\\n<Data>\\n <TaskId>A41F6E25-8520-4AF0-90EF-111111</TaskId>\\n</Data>\\n<Code>200</Code>","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'], + ], + ], + ], ], ], ], - '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":"<Message>success</Message>\\n<RequestId>86D18195-D89C-4C8C-9DC4-5FCE789CE6D5</RequestId>\\n<Data>\\n <Translated>Hello</Translated>\\n</Data>\\n<Code>200</Code>","errorExample":""}]', - 'title' => '机器翻译专业版调用', - 'description' => '注意事项'."\n" - .'1、QPS限制50,如有扩展需求,请与我们联系。钉钉群号:23369411'."\n" - .'<props="intl">2、请确保在使用该接口前,已充分了解专业版翻译产品的收费方式和价格</ph></props>'."\n" - .'<props="china">2、字符长度上限是5000字符,若超出上限,可以保存成文件,使用[文档翻译](https://help.aliyun.com/document_detail/164151.html)</ph></props>'."\n" - .'<props="china">3、请确保在使用该接口前,已充分了解专业版翻译产品的收费方式和价格</ph></props>', - 'requestParamsDescription' => '### 场景说明'."\n" - .'我们在针对不同场景,都有不同的引擎,每个引擎都是特别优化过的,可以通过scene参数控制(场景可选取值:商品标题(title),商品描述(description),商品沟通(communication),医疗(medical),社交(social)) ,金融(finance)'."\n" - ."\n" - .'商品标题:运用阿里电商标题数据,单独训练出来的,翻译标题特别好'."\n" - ."\n" - .'商品详描:运用阿里商品详描数据,单独训练出来,专门翻译商品详描比较好'."\n" - ."\n" - .'商品沟通:在电商买卖家沟通场景下,翻译效果会很好'."\n" - ."\n" - .'医疗:是针对医疗文献、术语、药品单独训练出来的引擎,在这个场景下翻译效果会很好'."\n" - ."\n" - .'社交:面向口语化的翻译,在这个场景下翻译结果会比较好'."\n" - ."\n" - .'金融:面向金融领域的翻译', - 'responseParamsDescription' => ' <props="china">公共请求参数参见[《RPC 调用机制》公共请求参数组装方案](https://help.aliyun.com/document_detail/315526.html?spm=a2c4g.158244.0.0.34b627b5qv5gmt#sectiondiv-qq5-utu-r7a)</ph></props>', - 'extraInfo' => ' ', - ], - 'TranslateECommerce' => [ - 'summary' => '调用机器翻译专业版获取翻译结果。', - 'methods' => [ - 'post', - 'get', + '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编码错误'], + ], ], - 'schemes' => [ - 'http', - 'https', + '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' => '*'], + ], + ], + ], ], + ], + 'GetBatchTranslate' => [ + 'summary' => '机器批量翻译,支持多段文本进行翻译。', + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], - [ - 'BearerToken' => [], - ], ], 'operationType' => 'read', - 'deprecated' => true, - 'systemTags' => [ - 'operationType' => 'none', - 'riskType' => 'none', - 'chargeType' => 'free', - 'tenantRelevance' => 'publicInformation', - ], + 'deprecated' => false, + '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, - 'enumValueTitles' => [ - 'html' => 'html', - 'text' => 'text', - ], - 'example' => 'text', - ], + 'schema' => ['description' => '翻译文本的格式,html( 网页格式。设置此参数将对待翻译文本以及翻译后文本按照html格式进行处理)、text(文本格式。设置此参数将对传入待翻译文本以及翻译后结果不做文本格式处理,统一按纯文本格式处理。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'text '], ], [ 'name' => 'TargetLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '目标语种,支持的[语种参考](https://help.aliyun.com/document_detail/163584.html)。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'zh', - ], + 'schema' => ['description' => '译文语言<props="china">[参考语言code](https://help.aliyun.com/document_detail/158269.html?spm=a2c4g.11186623.2.8.53746614hvrF2G)</props><props="intl">[参考语言code](https://www.alibabacloud.com/help/zh/doc-detail/158269.html)</props>'."\n", 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'zh'], ], [ 'name' => 'SourceLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '原文语言<props="china">[参考语言code](https://help.aliyun.com/document_detail/158269.html?spm=a2c4g.11186623.2.8.53746614hvrF2G)</props><props="intl">[参考语言code](https://www.alibabacloud.com/help/zh/doc-detail/158269.html)</props>'."\n", - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'en', - ], + 'schema' => ['description' => '原文语言<props="china">[参考语言code](https://help.aliyun.com/document_detail/158269.html?spm=a2c4g.11186623.2.8.53746614hvrF2G)</props><props="intl">[参考语言code](https://www.alibabacloud.com/help/zh/doc-detail/158269.html)</props>'."\n", 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'en'], ], [ - 'name' => 'SourceText', + 'name' => 'Scene', 'in' => 'formData', - 'schema' => [ - 'description' => '待翻译内容', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'Hello', - ], + 'schema' => ['description' => '- 专业版本支持的场景:商品标题(title),商品描述(description),商品沟通(communication),医疗(medical),社交(social)'."\n" + ."\n" + .'- 通用版本支持的场景:general', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'general'], ], [ - 'name' => 'Scene', + 'name' => 'ApiType', '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', - ], + 'schema' => ['description' => '- 版本类型,必须选择一个版本'."\n" + ."\n" + .'- 通用版本:translate_standard'."\n" + ."\n" + .'- 专业版本:translate_ecommerce', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'translate_standard'], ], [ - 'name' => 'Context', - 'in' => 'query', - 'schema' => [ - 'title' => 'context信息', - 'description' => 'context信息', - 'type' => 'string', - 'required' => false, - 'example' => 'context信息', - ], + '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], ], ], 'responses' => [ @@ -687,257 +689,342 @@ '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', - ], - 'Data' => [ - 'description' => '返回数据', - 'type' => 'object', - 'properties' => [ - 'Translated' => [ - 'description' => '翻译结果', - 'type' => 'string', - 'example' => '你好', - ], - 'WordCount' => [ - 'description' => '原文的字符数', - 'type' => 'string', - 'example' => '10', - ], - 'DetectedLanguage' => [ - 'type' => 'string', - ], - ], + '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" + .']'], + 'description' => '', ], ], + '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' => '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.', - ], + ['errorCode' => 'System.unknownError', 'errorMessage' => 'An unknown error occurred.', 'description' => ''], + ['errorCode' => 'System.UnknownError', 'errorMessage' => 'An unknown system error occurred.', 'description' => ''], ], ], - 'staticInfo' => [ - 'substitutions' => [ - 'alimt::2018-10-12::Translate', + '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":"<Message>success</Message>\\n<RequestId>86D18195-D89C-4C8C-9DC4-5FCE789CE6D5</RequestId>\\n<TranslatedList>[{\\"code\\":\\"200\\",\\"wordCount\\":\\"9\\",\\"index\\":\\"11\\",\\"translated\\":\\"你好男孩\\"},{\\"code\\":\\"200\\",\\"wordCount\\":\\"7\\",\\"index\\":\\"12\\",\\"translated\\":\\"回家\\"},{\\"code\\":\\"200\\",\\"wordCount\\":\\"6\\",\\"index\\":\\"13\\",\\"translated\\":\\"我们可以\\"}]</TranslatedList>\\n<Code>200</Code>","errorExample":""}]', + 'title' => '机器批量翻译调用指南', + 'description' => '1、调用接口QPS限制50,如有扩展需求,请与我们联系钉钉群号:23369411'."\n" + .'<props="china">2、批量翻译单条字符长度上限是1000字符,一次最多可翻译50条,若超出上限,可以保存成文件,使用[文档翻译](https://help.aliyun.com/document_detail/164151.html)</props>'."\n" + .'<props="china">3、请确保在使用该接口前,已充分了解通用版和专业版翻译产品的收费方式和价格</props>'."\n" + .'<props="china">4、批量翻译接口参考阿里云OpenAPI开发者门户[调试](https://next.api.aliyun.com/api/alimt/2018-10-12/GetBatchTranslate)调用</props>'."\n" + .'<props="intl">2、批量翻译单条字符长度上限是1000字符,一次最多可翻译50条,请确保在使用该接口前,已充分了解通用版和专业版翻译产品的收费方式和价格</props>'."\n", + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => ' ', + 'extraInfo' => ' ', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetBatchTranslate', + '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', - ], + 'GetDetectLanguage' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], 'operationType' => 'read', - 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'high', - 'chargeType' => 'paid', - 'tenantRelevance' => 'publicInformation', - ], + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'], 'parameters' => [ [ - 'name' => 'FormatType', + 'name' => 'SourceText', 'in' => 'formData', + 'schema' => ['description' => '待识别的语种', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '你好'], + ], + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => '翻译文本的格式,html( 网页格式。设置此参数将对待翻译文本以及翻译后文本按照html格式进行处理)、text(文本格式。设置此参数将对传入待翻译文本以及翻译后结果不做文本格式处理,统一按纯文本格式处理。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'text ', + 'type' => 'object', + 'properties' => [ + '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.', 'description' => ''], + ], [ - 'name' => 'TargetLanguage', - 'in' => 'formData', - 'schema' => [ - 'description' => '译文语言<props="china">[参考语言code](https://help.aliyun.com/document_detail/158269.html?spm=a2c4g.11186623.2.8.53746614hvrF2G)</props><props="intl">[参考语言code](https://www.alibabacloud.com/help/zh/doc-detail/158269.html)</props>'."\n", - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'zh', + ['errorCode' => '10002', 'errorMessage' => 'A system error occurred.', 'description' => ''], + ], + [ + ['errorCode' => '10003', 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', 'description' => ''], + ], + [ + ['errorCode' => '10004', 'errorMessage' => 'Some required parameters are missing.', 'description' => ''], + ], + [ + ['errorCode' => '10005', 'errorMessage' => 'The specified language pair is not supported.', 'description' => ''], + ], + [ + ['errorCode' => '10006', 'errorMessage' => 'An error occurred while detecting the language.', 'description' => ''], + ], + [ + ['errorCode' => '10007', 'errorMessage' => 'An error occurred while translating.', 'description' => ''], + ], + [ + ['errorCode' => '10008', 'errorMessage' => 'The specified string is too long.', 'description' => ''], + ], + [ + ['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' => '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' => '后端服务超时,请稍后重试'], + ], + ], + 'title' => '语种识别', + 'summary' => '语种识别API说明文档。', + 'description' => '1、字符长度限制5000,调用接口QPS限制50;如有扩展需求,请与我们联系,钉钉群号:23369411'."\n" + ."\n" + .'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":"<GetDetectLanguageResponse>\\n <RequestId>0C5EC1EC-1A06-4D60-97E6-4D41350945E4</RequestId>\\n <DetectedLanguage>zh</DetectedLanguage>\\n</GetDetectLanguageResponse>","errorExample":""}]', + ], + 'GetDocTranslateTask' => [ + 'summary' => '查询文档翻译任务。', + 'methods' => ['get'], + 'schemes' => ['http', 'https'], + 'security' => [ [ - 'name' => 'SourceLanguage', - 'in' => 'formData', + 'AK' => [], + ], + ], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free'], + 'parameters' => [ + [ + 'name' => 'TaskId', + 'in' => 'query', + 'schema' => ['description' => '任务ID。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '0586df512c8b4bb382d7d9a6a01b5854'], + ], + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => '原文语言<props="china">[参考语言code](https://help.aliyun.com/document_detail/158269.html?spm=a2c4g.11186623.2.8.53746614hvrF2G)</props><props="intl">[参考语言code](https://www.alibabacloud.com/help/zh/doc-detail/158269.html)</props>'."\n", - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'en', + '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.'], + ], + 'description' => '', ], ], + ], + 'errorCodes' => [ + 109 => [ + ['errorCode' => '10009', 'errorMessage' => '子账号没有权限', 'description' => ''], + ], [ - 'name' => 'Scene', - 'in' => 'formData', - 'schema' => [ - 'description' => '- 专业版本支持的场景:商品标题(title),商品描述(description),商品沟通(communication),医疗(medical),社交(social)'."\n" - ."\n" - .'- 通用版本支持的场景:general', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'general', + ['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' => '10021', 'errorMessage' => 'The parameter is invalid.', 'description' => '参数无效。'], + ['errorCode' => 'InvalidAccountStatus', 'errorMessage' => 'The Machine Translation service has not been activated.', 'description' => '用户未开通机器翻译服务。'], + ], + 404 => [ + ['errorCode' => '10025', 'errorMessage' => 'The specified task does not exist.', 'description' => '指定的任务不存在。'], + ], + ], + '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' => '*'], + ], ], ], + ], + '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":"<GetDocTranslateTaskResponse>\\n <Status>translated</Status>\\n <TranslateErrorMessage>Fail to get the page number of document.</TranslateErrorMessage>\\n <TaskId>0586df512c8b4bb382d7d9a6a01b5854</TaskId>\\n <RequestId>12952E92-FDF3-4D3C-88E3-242D72BA7150</RequestId>\\n <PageCount>20</PageCount>\\n <TranslateFileUrl>http://translateFileUrl</TranslateFileUrl>\\n <TranslateErrorCode>Error</TranslateErrorCode>\\n</GetDocTranslateTaskResponse>","errorExample":""}]', + ], + 'GetImageDiagnose' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'get'], + 'parameters' => [ [ - 'name' => 'ApiType', + 'name' => 'Url', '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' => 'http://xxxxx.oss-cn-shenzhen.aliyuncs.com/jd/41209/xxxxx.jpg'], ], [ - 'name' => 'SourceText', + 'name' => 'Extra', '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' => '- 格式内容:{'."\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' => [ @@ -945,430 +1032,229 @@ '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', - ], - '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" - .']', + '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' => '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.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' => ''], ], ], - '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":"<Message>success</Message>\\n<RequestId>86D18195-D89C-4C8C-9DC4-5FCE789CE6D5</RequestId>\\n<TranslatedList>[{\\"code\\":\\"200\\",\\"wordCount\\":\\"9\\",\\"index\\":\\"11\\",\\"translated\\":\\"你好男孩\\"},{\\"code\\":\\"200\\",\\"wordCount\\":\\"7\\",\\"index\\":\\"12\\",\\"translated\\":\\"回家\\"},{\\"code\\":\\"200\\",\\"wordCount\\":\\"6\\",\\"index\\":\\"13\\",\\"translated\\":\\"我们可以\\"}]</TranslatedList>\\n<Code>200</Code>","errorExample":""}]', - 'title' => '机器批量翻译调用指南', - 'description' => '1、调用接口QPS限制50,如有扩展需求,请与我们联系钉钉群号:23369411'."\n" - .'<props="china">2、批量翻译单条字符长度上限是1000字符,一次最多可翻译50条,若超出上限,可以保存成文件,使用[文档翻译](https://help.aliyun.com/document_detail/164151.html)</props>'."\n" - .'<props="china">3、请确保在使用该接口前,已充分了解通用版和专业版翻译产品的收费方式和价格</props>'."\n" - .'<props="china">4、批量翻译接口参考阿里云OpenAPI开发者门户[调试](https://next.api.aliyun.com/api/alimt/2018-10-12/GetBatchTranslate)调用</props>'."\n" - .'<props="intl">2、批量翻译单条字符长度上限是1000字符,一次最多可翻译50条,请确保在使用该接口前,已充分了解通用版和专业版翻译产品的收费方式和价格</props>'."\n", + 'title' => '图片诊断', + 'summary' => '能够识别图片中的文字的语种。', + 'description' => '><notice>该接口已计划下线,不建议继续调用。></notice>', 'requestParamsDescription' => ' ', 'responseParamsDescription' => ' ', 'extraInfo' => ' ', - ], - 'CreateAsyncTranslate' => [ - 'summary' => '机器异步翻译创建任务接口,支持100万以下字符翻译。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - '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":"<RequestId>DC2DCCC9-C3DF-4F59-8D8E-78185729F16D</RequestId>\\n<Message>ok</Message>\\n<Data>\\n <Language>zh</Language>\\n</Data>\\n<Code>200</Code>","errorExample":""}]', + ], + 'GetImageTranslate' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], - [ - 'BearerToken' => [], - ], ], - 'operationType' => 'readAndWrite', + 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'none', - 'riskType' => 'none', - 'chargeType' => 'free', - 'tenantRelevance' => 'publicInformation', - ], + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free'], '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', + 'name' => 'Url', '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', - ], + 'schema' => ['description' => '需要翻译的图片链接', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'http://xxxxxxx.oss-cn-shenzhen.aliyuncs.com/xxxxxx.jpg'], ], [ - 'name' => 'Scene', + 'name' => 'SourceLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '场景,支持:通用(general)、商品标题(title)、商品详情(description)、买卖家沟通(message)、医疗(medical)、社交(social)、科技(tech)。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'general', - ], + 'schema' => ['description' => '图片中的文字语种,<props="intl">[语向支持以及语言代码](https://www.alibabacloud.com/help/zh/doc-detail/182310.html)</props>'."\n" + .'<props="china">[语向支持以及语言代码](https://help.aliyun.com/document_detail/182310.html?spm=a2c4g.11186623.6.543.106340eblV3QUo)</props>', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'zh'], ], [ - 'name' => 'FormatType', + 'name' => 'TargetLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '翻译文本的格式,**html**( 网页格式。设置此参数将对待翻译文本以及翻译后文本按照html格式进行处理)、**text**(文本格式。设置此参数将对传入待翻译文本以及翻译后结果不做文本格式处理,统一按纯文本格式处理。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'text', - ], + 'schema' => ['description' => '图片中文字翻译后的语种,<props="intl">[语向支持以及语言代码](https://www.alibabacloud.com/help/zh/doc-detail/182310.html)</props>'."\n" + .'<props="china">[语向支持以及语言代码](https://help.aliyun.com/document_detail/182310.html?spm=a2c4g.11186623.6.543.106340eblV3QUo)</props>', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'en'], ], [ - 'name' => 'ApiType', + 'name' => 'Extra', 'in' => 'formData', - 'schema' => [ - 'description' => '- 版本类型,必须选择一个版本'."\n" - ."\n" - .'- 通用版本:translate_standard'."\n" - ."\n" - .'- 专业版本:translate_ecommerce', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'translate_standard', - ], + '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' => [ - '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', - ], + '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' => [ - 'JobId' => [ - 'description' => '异步任务ID。', - 'type' => 'string', - 'required' => true, - 'example' => '98bbb007-71bb-448b-bab0-2695ce8f8599', - ], - 'Status' => [ - 'description' => '任务状态', - 'type' => 'string', - 'required' => true, - 'example' => 'ready', - ], + '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' => [ 101 => [ - [ - 'errorCode' => '10001', - 'errorMessage' => 'The request has timed out.', - ], + ['errorCode' => 'System.RequestTimeOut', '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' => 'System.Error', 'errorMessage' => 'A system error occurred.', 'description' => ''], ], [ - [ - 'errorCode' => '10004', - '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' => '10005', - 'errorMessage' => 'The specified language pair is not supported.', - ], + ['errorCode' => 'System.ParameterError', 'errorMessage' => 'Some required parameters are missing.', 'description' => ''], ], [ - [ - 'errorCode' => '10006', - 'errorMessage' => 'An error occurred while detecting the language.', - ], + ['errorCode' => 'System.LanguageNotSupported', 'errorMessage' => 'The specified language pair is not supported.', 'description' => ''], ], [ - [ - 'errorCode' => '10007', - 'errorMessage' => 'An error occurred while translating.', - ], + ['errorCode' => 'System.LanguageDetectError', 'errorMessage' => 'An error occurred while detecting the language.', 'description' => ''], ], [ - [ - 'errorCode' => '10008', - 'errorMessage' => 'The specified string is too long.', - ], + ['errorCode' => 'System.TranslateError', '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' => 'System.StringTooLong', 'errorMessage' => 'The maximum length of the specified string is exceeded.', 'description' => ''], ], - 403 => [ - [ - 'errorCode' => '10009', - 'errorMessage' => 'The RAM user is not authorized to perform this operation.', - ], + [ + ['errorCode' => 'System.subNotPermission', 'errorMessage' => 'The sub-account is not authorized to perform the operation.', 'description' => ''], ], [ - [ - 'errorCode' => '10025', - 'errorMessage' => 'The specified task does not exist.', - ], + ['errorCode' => 'System.AccountNotActivated', 'errorMessage' => 'The account has not activated the service.', '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' => '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' => ''], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + 'title' => '商品图片智能翻译', + 'summary' => '包含文字识别、文本翻译、文字回填等能力。', + 'description' => '><notice>该接口已计划下线,不建议继续调用。><notice>'."\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' => '[{"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" - .'}', + '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":"<Message>ok</Message>\\n<RequestId>A41F6E25-8520-4AF0-90EF-AF7E32840108</RequestId>\\n<Data>\\n <PictureEditor>{\\"text\\":\\"P翼-至草款\\",\\"width\\":750,\\"wordNum\\":10}</PictureEditor>\\n <Orc>{\\"text\\":\\"P翼-至草款\\",\\"width\\":750,\\"wordNum\\":10}</Orc>\\n <Url>https://ae01.alicdn.com/kf/xxxxx.jpeg</Url>\\n</Data>\\n<Code>200</Code>","errorExample":""}]', ], - 'GetAsyncTranslate' => [ - 'summary' => '获取文本异步翻译任务内容。', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'https', - ], + 'GetImageTranslateTask' => [ + 'summary' => '通过任务ID获取异步图片翻译结果。', + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -1376,194 +1262,159 @@ ], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'none', - ], + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'JobId', + 'name' => 'TaskId', 'in' => 'formData', - 'schema' => [ - 'description' => '异步任务ID。您调用CreateAsyncTranslate创建异步任务返回的JobId', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => '77056ab7-7be1-4c2a-91a1-f20f63894048', - ], + 'schema' => ['description' => '异步图片翻译任务Id', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'xxxxxx'], ], ], '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', - ], + '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' => [ - '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', - ], + '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' => [ - 109 => [ - [ - 'errorCode' => 'System.SubNotPermission', - 'errorMessage' => 'The sub account is not authorized to perform the operation.', - ], + 101 => [ + ['errorCode' => 'System.RequestTimeOut', 'errorMessage' => 'The request has timed out.', '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' => 'System.Error', 'errorMessage' => 'A system error occurred.', 'description' => ''], ], - 403 => [ - [ - 'errorCode' => 'System.subNotPermission', - 'errorMessage' => 'The sub-account is not authorized to perform the operation.', - ], + [ + ['errorCode' => 'System.UrlDecodingError', 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', '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.', - ], + [ + ['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' => ''], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + 'title' => '获取异步图片翻译结果', + 'description' => '><notice>该接口已计划下线,不建议继续调用。></notice>', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => ' ', + 'extraInfo' => ' ', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetImageTranslateTask', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], - '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 \\"Code\\": 200,\\n \\"Message\\": \\"ok\\",\\n \\"RequestId\\": \\"xxxxxxx\\",\\n \\"Data\\": {\\n \\"ImageData\\": \\"[{xxxxxx}]\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"","errorExample":""}]', ], - 'GetDetectLanguage' => [ - 'summary' => '语种识别API说明文档。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'GetTitleDiagnose' => [ + 'summary' => '通过商品标题质量诊断服务,产出可视化的标题质量分,便于卖家对现有的商品标题质量有实际体感。', + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], 'operationType' => 'read', - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - 'tenantRelevance' => 'publicInformation', - ], + 'deprecated' => false, + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ - 'name' => 'SourceText', + 'name' => 'Title', 'in' => 'formData', - 'schema' => [ - 'description' => '待识别的语种', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => '你好', - ], + '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' => '标题文字的语种,<props="china">[语向支持以及语言代码](https://help.aliyun.com/document_detail/182310.html?spm=a2c4g.11186623.6.543.106340eblV3QUo)</props><props="intl">[语向支持以及语言代码](https://www.alibabacloud.com/help/zh/doc-detail/182310.html)</props>'."\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' => [ @@ -1571,370 +1422,238 @@ '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' => '请求ID', 'type' => 'string', 'example' => 'DC2DCCC9-C3DF-4F59-8D8E-78185729F16D'], + 'Data' => [ + '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'], + ], ], ], + '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":"<GetDetectLanguageResponse>\\n <RequestId>0C5EC1EC-1A06-4D60-97E6-4D41350945E4</RequestId>\\n <DetectedLanguage>zh</DetectedLanguage>\\n</GetDetectLanguageResponse>","errorExample":""}]', - 'title' => '语种识别', - 'description' => '1、字符长度限制5000,调用接口QPS限制50;如有扩展需求,请与我们联系,钉钉群号:23369411'."\n" - ."\n" - .'2、请确保在使用该接口前,已充分了解通用版翻译产品的收费方式和价格', + 'title' => '标题诊断调用指南', + 'description' => '><notice>该接口已计划下线,不建议继续调用。></notice>', '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:GetTitleDiagnose', + '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 \\"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":"<RequestId>DC2DCCC9-C3DF-4F59-8D8E-78185729F16D</RequestId>\\n<Message>ok</Message>\\n<Data>\\n <NoFirstUppercaseList>no</NoFirstUppercaseList>\\n <ContainCoreClasses>true</ContainCoreClasses>\\n <DisableWords>baba</DisableWords>\\n <WordCount>10</WordCount>\\n <OverLengthLimit>100</OverLengthLimit>\\n <TotalScore>3</TotalScore>\\n <DuplicateWords>hi</DuplicateWords>\\n <WordSpelledCorrectError>ahk</WordSpelledCorrectError>\\n <AllUppercaseWords>Boy</AllUppercaseWords>\\n <LanguageQualityScore>2</LanguageQualityScore>\\n</Data>\\n<Code>200</Code>","errorExample":""}]', + ], + 'GetTitleGenerate' => [ + 'summary' => '基于电商大数据,自动优化商品标题。', + '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', + 'name' => 'Title', 'in' => 'formData', - 'schema' => [ - 'description' => '原图 URL,跟 Base64 不能同时为空,优先取 Base64。', - 'type' => 'string', - 'required' => false, - 'example' => 'https://example.com/example.jpg', - ], + 'schema' => ['description' => '标题内容', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '10pcs 80ml Kitchen Disposable'], ], [ - 'name' => 'ImageBase64', + 'name' => 'Language', 'in' => 'formData', - 'schema' => [ - 'description' => '原图 Base64,跟 URL 不能同时为空,优先取 Base64。', - 'type' => 'string', - 'required' => false, - 'example' => '/9j/4...H/9k=', - ], + 'schema' => ['description' => '标题语种,<props="china">[语向支持以及语言代码](https://help.aliyun.com/document_detail/182310.html)</props><props="intl">[语向支持以及语言代码](https://www.alibabacloud.com/help/zh/doc-detail/182310.html)</props>'."\n", 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'en'], ], [ - 'name' => 'SourceLanguage', + 'name' => 'Platform', 'in' => 'formData', - 'schema' => [ - 'description' => '源语种,支持的[语种参考](https://help.aliyun.com/document_detail/163584.html),必填(请忽略表格中“是否必填”中的“否”)', - 'type' => 'string', - 'required' => false, - 'example' => 'zh', - ], + 'schema' => ['description' => '商品标题所属平台,支持ae/icbu', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'ae'], ], [ - 'name' => 'TargetLanguage', + 'name' => 'CategoryId', 'in' => 'formData', - 'schema' => [ - 'description' => '目标语种,支持的[语种参考](https://help.aliyun.com/document_detail/163584.html),必填(请忽略表格中“是否必填”中的“否”)', - 'type' => 'string', - 'required' => false, - 'example' => 'en', - ], + 'schema' => ['description' => '类目ID,如没有类目数据则传入0', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '127896018'], ], [ - 'name' => 'Field', + 'name' => 'HotWords', 'in' => 'formData', - 'schema' => [ - 'description' => '翻译领域, 可选值如下。'."\n" - .'- `general`: 通用图片翻译'."\n" - .'- `e-commerce`: 电商领域图片翻译'."\n" - ."\n" - .'默认及未识别领域均按通用图片翻译处理。', - 'type' => 'string', - 'required' => false, - 'enumValueTitles' => [], - 'example' => 'general', - ], + 'schema' => ['description' => '热词', 'type' => 'string', 'required' => false, 'example' => 'None,Plastic'], ], [ - 'name' => 'Ext', + 'name' => 'Attributes', '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", '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' => [ 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' => 'DC2DCCC9-C3DF-4F59-8D8E-78185729F16D'], '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', - ], + 'Titles' => ['description' => '优化后的标题内容', 'type' => 'string', 'example' => '10pcs 80ml Kitchen Disposable Plastic Sauce Cup Pot Chutney Container'], ], ], ], + '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' => ''], + ], + [ + ['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' => ''], + ], + [ + ['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' => ''], + ], + ], + 'title' => '标题优化调用指南', + 'description' => '><notice>该接口已计划下线,不建议继续调用。></notice>', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => ' ', + 'extraInfo' => ' ', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetTitleGenerate', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], ], - '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":"<TranslateImageResponse>\\n <code>200</code>\\n <data>\\n <finalImageUrl>https://example.com/example.jpg</finalImageUrl>\\n </data>\\n <requestId>D774D33D-F1CB-5A2C-A787-E0A2179239CE</requestId>\\n</TranslateImageResponse>","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方式调用', + '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":"<RequestId>DC2DCCC9-C3DF-4F59-8D8E-78185729F16D</RequestId>\\n<Message>ok</Message>\\n<Data>\\n <Titles>10pcs 80ml Kitchen Disposable Plastic Sauce Cup Pot Chutney Container</Titles>\\n</Data>\\n<Code>200</Code>","errorExample":""}]', ], - 'TranslateImageBatch' => [ - 'summary' => '异步将一批图片上的文字从一种语言翻译成另一种语言,并分别输出新的图片。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'GetTitleIntelligence' => [ + 'summary' => '通过类目、平台、关键词,自动生成商品标题。', + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -1942,218 +1661,123 @@ ], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'none', - 'riskType' => 'none', - 'chargeType' => 'free', - 'tenantRelevance' => 'publicInformation', - ], + 'systemTags' => ['operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'], 'parameters' => [ [ - 'name' => 'ImageUrls', + 'name' => 'Platform', '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', - ], + 'schema' => ['description' => '商品所在平台 ae、icbu、lazada', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'ae'], ], [ - 'name' => 'SourceLanguage', + 'name' => 'Extra', 'in' => 'formData', - 'schema' => [ - 'description' => '源语种,支持的语种及对应的代码请参考[语言code](https://help.aliyun.com/document_detail/163584.html)', - 'type' => 'string', - 'required' => true, - 'example' => 'zh', - ], + 'schema' => ['description' => '扩展信息,json数据格式,可选字段', 'type' => 'string', 'required' => false, 'example' => '{"product_id":"1212"}'], ], [ - 'name' => 'TargetLanguage', + 'name' => 'CatLevelThreeId', 'in' => 'formData', - 'schema' => [ - 'description' => '目标语种,支持的语种及对应的代码请参考[语言code](https://help.aliyun.com/document_detail/163584.html)', - 'type' => 'string', - 'required' => true, - 'example' => 'en', - ], + 'schema' => ['description' => '三级类目Id,如没有类目数据则传入0', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'docRequired' => true, 'maximum' => '99999999999', 'minimum' => '0', 'example' => '111'], ], [ - 'name' => 'Ext', + 'name' => 'CatLevelTwoId', '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' => '二级类目Id,如没有类目数据则传入0', 'type' => 'integer', 'format' => 'int64', 'required' => true, 'docRequired' => true, 'maximum' => '99999999999', 'minimum' => '0', 'example' => '222'], ], [ - 'name' => 'CustomTaskId', - 'in' => 'formData', - 'schema' => [ - 'description' => '自定义任务 ID,用于防止短时间误操作重复请求;3 分钟内,相同自定义任务 ID 的请求只会被处理一次', - 'type' => 'string', - 'required' => false, - 'example' => 'my_awesome_task_1', - ], - ], - [ - 'name' => 'Field', + 'name' => 'Keywords', 'in' => 'formData', - 'schema' => [ - 'description' => '翻译领域, 可选值如下。'."\n" - .'- `general`:通用图片翻译'."\n" - .'- `e-commerce`:电商领域图片翻译'."\n" - ."\n" - .'默认及未识别领域均按通用图片翻译处理。', - 'type' => 'string', - 'required' => false, - 'example' => 'general', - ], + 'schema' => ['description' => '关键词,多个词英文逗号分隔比如:hello,apple', 'type' => 'string', 'required' => false, 'docRequired' => true, 'example' => 'hello,apple'], ], ], '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 表示正常', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '如果有错误,会输出错误信息', 'type' => 'string', 'example' => 'success'], + 'RequestId' => ['description' => '请求唯一串,方便后期排查定位问题', 'type' => 'string', 'example' => 'D70487B4-8891-4D24-BB64-8788E53671FB'], 'Data' => [ - 'description' => '数据内容', + 'description' => '返回数据', 'type' => 'object', 'properties' => [ - 'TaskId' => [ - 'description' => '任务 ID,用于后续获取翻译结果', - 'type' => 'string', - 'example' => 'EEA28E6D-4828-5031-BD8C-8FF1B3216842', - ], + 'Titles' => ['description' => '自动生成的标题信息', 'type' => 'string', 'example' => 'Custom Hello Kitty PVC Cartoon Apple for Home Garden Complete Apple Bath Shower'], ], ], ], + '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' => '><notice>该接口已计划下线,不建议继续调用。></notice>', + '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 \\"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":"<TranslateImageBatchResponse>\\n <RequestId>D774D33D-F1CB-5A2C-A787-E0A2179239CE</RequestId>\\n <Message>OK</Message>\\n <Code>200</Code>\\n <Data>\\n <TaskId>EEA28E6D-4828-5031-BD8C-8FF1B3216842</TaskId>\\n </Data>\\n</TranslateImageBatchResponse>","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\\": \\"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":"<RequestId>D70487B4-8891-4D24-BB64-8788E53671FB</RequestId>\\n<Message>success</Message>\\n<Data>\\n <Titles>Custom Hello Kitty PVC Cartoon Apple for Home Garden Complete Apple Bath Shower</Titles>\\n</Data>\\n<Code>200</Code>","errorExample":""}]', ], 'GetTranslateImageBatchResult' => [ 'summary' => '获取图片异步批量翻译的结果。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -2161,21 +1785,12 @@ ], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'none', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free'], 'parameters' => [ [ 'name' => 'TaskId', 'in' => 'formData', - 'schema' => [ - 'description' => '调用图片异步批量翻译接口获得的任务 ID', - 'type' => 'string', - 'required' => true, - 'example' => 'EEA28E6D-4828-5031-BD8C-8FF1B3216842', - ], + 'schema' => ['description' => '调用图片异步批量翻译接口获得的任务 ID', 'type' => 'string', 'required' => true, 'example' => 'EEA28E6D-4828-5031-BD8C-8FF1B3216842'], ], ], 'responses' => [ @@ -2185,22 +1800,9 @@ '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' => '请求结果状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '请求信息', 'type' => 'string', 'example' => 'OK'], + 'RequestId' => ['description' => '请求标识', 'type' => 'string', 'example' => 'DACD263C-C068-5116-83EC-117245AA35CF'], 'Data' => [ 'description' => '数据内容', 'type' => 'object', @@ -2212,55 +1814,22 @@ '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', - ], + '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', - ], + 'Status' => ['description' => '标识当前任务的运行状态,可能的值及含义如下:'."\n" + ."\n" + .'- `created`:批量翻译任务创建成功,等待运行'."\n" + .'- `running`:批量翻译任务正在运行中'."\n" + .'- `finished`:批量翻译任务运行结束,图片均已翻译完毕,此时 `Result` 字段会包含每张图片的翻译结果'."\n" + .'- `invalid`:传入的任务 ID 非法,或者任务的翻译结果已经过期被清理', 'type' => 'string', 'example' => 'finished'], ], ], ], @@ -2269,255 +1838,103 @@ ], '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', - ], - '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":"<GetTranslateImageBatchResultResponse>\\n <Code>200</Code>\\n <Message>OK</Message>\\n <RequestId>DACD263C-C068-5116-83EC-117245AA35CF</RequestId>\\n <Data>\\n <Result>\\n <InPaintingUrl>https://example.com/example.jpg</InPaintingUrl>\\n <FinalImageUrl>https://example.com/example.jpg</FinalImageUrl>\\n <TemplateJson>{\\"TemplateJson\\": \\"Editor Template Json String\\t\\"}</TemplateJson>\\n <SourceImageUrl>https://example.com/example.jpg</SourceImageUrl>\\n <Code>200</Code>\\n <Message>OK</Message>\\n <Success>true</Success>\\n </Result>\\n <Status>finished</Status>\\n </Data>\\n</GetTranslateImageBatchResultResponse>","errorExample":""}]', + 'staticInfo' => ['returnType' => 'synchronous'], 'title' => '图片异步批量翻译结果获取', 'description' => '请确保在使用该接口前,已充分了解图片翻译产品的[收费方式和价格](https://help.aliyun.com/document_detail/163332.html)。'."\n" ."\n" .'图片异步批量翻译的结果,翻译完毕后,会保存 1 小时,过期后会被清理,请及时获取结果。', - ], - 'CreateDocTranslateTask' => [ - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', + '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":"<GetTranslateImageBatchResultResponse>\\n <Code>200</Code>\\n <Message>OK</Message>\\n <RequestId>DACD263C-C068-5116-83EC-117245AA35CF</RequestId>\\n <Data>\\n <Result>\\n <InPaintingUrl>https://example.com/example.jpg</InPaintingUrl>\\n <FinalImageUrl>https://example.com/example.jpg</FinalImageUrl>\\n <TemplateJson>{\\"TemplateJson\\": \\"Editor Template Json String\\t\\"}</TemplateJson>\\n <SourceImageUrl>https://example.com/example.jpg</SourceImageUrl>\\n <Code>200</Code>\\n <Message>OK</Message>\\n <Success>true</Success>\\n </Result>\\n <Status>finished</Status>\\n </Data>\\n</GetTranslateImageBatchResultResponse>","errorExample":""}]', + ], + 'GetTranslateReport' => [ + 'summary' => '根据API名及开始结束时间获取API调用报表,并根据传入的group按照天或者小时聚合计算后返回。', + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'write', - 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'create', - ], + '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参考](https://help.aliyun.com/document_detail/158269.html?spm=a2c4g.11186623.6.542.7da22b9fayuNoj)', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'zh', - ], - ], - [ - 'name' => 'FileUrl', - 'in' => 'formData', - 'schema' => [ - 'description' => '文档URL。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'http://fileUrl', - 'isFileTransferUrl' => true, - ], + 'name' => 'BeginTime', + 'in' => 'query', + 'schema' => ['description' => '起始时间。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '2021-03-01 00:00:00'], ], [ - 'name' => 'Scene', - 'in' => 'formData', - 'schema' => [ - 'description' => '场景,支持:通用(general)、商品标题(title)、商品详情(description)、买卖家沟通(message)、医疗(medical)、社交(social)、科技(tech)。', - 'type' => 'string', - 'required' => false, - 'docRequired' => false, - 'example' => 'general', - 'default' => 'general', - ], + 'name' => 'EndTime', + 'in' => 'query', + 'schema' => ['description' => '结束时间', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '2021-03-01 23:59:59'], ], [ - 'name' => 'CallbackUrl', - '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', - ], + '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' => 'ClientToken', - 'in' => 'formData', - 'schema' => [ - 'description' => '提供幂等能力,3分钟内,相同的值只会生效一次。', - 'type' => 'string', - 'required' => false, - 'docRequired' => false, - 'example' => 'token', - ], + 'name' => 'Group', + 'in' => 'query', + 'schema' => ['description' => '分组。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'hour或者day'], ], ], 'responses' => [ @@ -2525,145 +1942,172 @@ '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' => '错误码', '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' => [ 109 => [ - [ - 'errorCode' => '10009', - 'errorMessage' => '子账号没有权限', - ], + ['errorCode' => '10009', 'errorMessage' => '子账号没有权限', 'description' => ''], ], [ - [ - 'errorCode' => '10010', - 'errorMessage' => '账号没有开通服务', - ], + ['errorCode' => '10010', 'errorMessage' => '账号没有开通服务', 'description' => ''], ], [ - [ - 'errorCode' => '10011', - 'errorMessage' => '子账号服务失败', - ], + ['errorCode' => '10011', 'errorMessage' => '子账号服务失败', 'description' => ''], ], [ - [ - 'errorCode' => '10012', - 'errorMessage' => '翻译服务调用失败', - ], + ['errorCode' => '10012', 'errorMessage' => '翻译服务调用失败', 'description' => ''], ], [ - [ - 'errorCode' => '10013', - 'errorMessage' => '账号服务没有开通或者欠费', - ], + ['errorCode' => '10013', 'errorMessage' => '账号服务没有开通或者欠费', 'description' => ''], ], 199 => [ - [ - 'errorCode' => '19999', - 'errorMessage' => 'An unknown error occurred.', - ], + ['errorCode' => '19999', 'errorMessage' => 'An unknown error occurred.', '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.', + ], + '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' => '*'], + ], ], ], - 403 => [ - [ - 'errorCode' => '10029', - 'errorMessage' => 'The number of calls per day exceeds the limit.', - ], + ], + '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":"<GetTranslateReportResponse>\\n <Code>200</Code>\\n <Message>success</Message>\\n <Data>{\\"result\\":[{\\"time\\":\\"2021-10-21 00:00:00\\",\\"total\\":100}]}</Data>\\n <RequestId>86D18195-D89C-4C8C-9DC4-5FCE789CE6D5</RequestId>\\n</GetTranslateReportResponse>","errorExample":""}]', + ], + 'OpenAlimtService' => [ + 'summary' => '商品服务开通。', + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], + 'security' => [ + [ + 'AK' => [], ], - 429 => [ - [ - 'errorCode' => 'REQUESTS.OVER.LIMIT', - 'errorMessage' => 'The request is too frequent, please try again later.', + [ + 'APP' => [], + ], + [ + 'PrivateKey' => [], + ], + [ + 'BearerToken' => [], + ], + ], + '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'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'type' => 'object', + 'properties' => [ + 'OrderId' => ['description' => '订单ID。', 'type' => 'string', 'example' => '123456'], + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => 'xxxx-xxxxx'], + ], + 'description' => '', ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"Status\\": \\"ready\\",\\n \\"RequestId\\": \\"D3920BC3-A395-4CAD-9E84-7C39EB07507B\\",\\n \\"TaskId\\": \\"0586df512c8b4bb382d7d9a6a01b5854\\"\\n}","errorExample":""},{"type":"xml","example":"<CreateDocTranslateTaskResponse>\\n <requestId>D3920BC3-A395-4CAD-9E84-7C39EB07507B</requestId>\\n <taskId>0586df512c8b4bb382d7d9a6a01b5854</taskId>\\n <status>ready</status>\\n</CreateDocTranslateTaskResponse>","errorExample":""}]', - 'title' => '创建文档翻译任务', - 'summary' => '创建文档翻译任务。', - 'description' => '> 仅支持通过POST方式调用', + '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 \\"OrderId\\": \\"123456\\",\\n \\"RequestId\\": \\"xxxx-xxxxx\\"\\n}","errorExample":""}]', + 'title' => '商品服务开通', 'requestParamsDescription' => ' ', 'responseParamsDescription' => ' ', 'extraInfo' => ' ', - ], - 'GetDocTranslateTask' => [ - 'summary' => '查询文档翻译任务。', - 'methods' => [ - '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' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'], 'parameters' => [ [ - 'name' => 'TaskId', + 'name' => 'FormatType', + 'in' => 'formData', + 'schema' => ['description' => '翻译文本的格式,**html**( 网页格式。设置此参数将对待翻译文本以及翻译后文本按照html格式进行处理)、**text**(文本格式。设置此参数将对传入待翻译文本以及翻译后结果不做文本格式处理,统一按纯文本格式处理。', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'text'], + ], + [ + 'name' => 'TargetLanguage', + 'in' => 'formData', + 'schema' => ['description' => '译文语言,<props="china">[参考语言code](https://help.aliyun.com/document_detail/215387.html)</ph></props><props="intl">[参考语言code](https://www.alibabacloud.com/help/zh/machine-translation/latest/machine-translation-language-code-list)</ph></props>', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'en'], + ], + [ + 'name' => 'SourceLanguage', + 'in' => 'formData', + 'schema' => ['description' => '原文语言,<props="china">[参考语言code](https://help.aliyun.com/document_detail/215387.html)</ph></props><props="intl">[参考语言code](https://www.alibabacloud.com/help/zh/machine-translation/latest/machine-translation-language-code-list)</ph></props>', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'zh'], + ], + [ + 'name' => 'SourceText', + 'in' => 'formData', + 'schema' => ['description' => '待翻译内容', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => '你好', 'maxLength' => 256000], + ], + [ + 'name' => 'Scene', + 'in' => 'formData', + 'schema' => ['description' => '场景可选取值:商品标题(title),商品描述(description),商品沟通(communication),医疗(medical),社交(social),金融(finance)', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'title'], + ], + [ + 'name' => 'Context', 'in' => 'query', - 'schema' => [ - 'description' => '任务ID。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => '0586df512c8b4bb382d7d9a6a01b5854', - ], + 'schema' => ['title' => '新增context', 'description' => '上下文信息,可选填', 'type' => 'string', 'required' => false, 'example' => '早上我在家里吃了面包'], ], ], 'responses' => [ @@ -2671,117 +2115,116 @@ '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' => '错误码', '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'], + ], ], ], + 'description' => '', ], ], ], 'errorCodes' => [ - 109 => [ - [ - 'errorCode' => '10009', - 'errorMessage' => '子账号没有权限', - ], + 101 => [ + ['errorCode' => '10001', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], [ - [ - 'errorCode' => '10010', - 'errorMessage' => '账号没有开通服务', - ], + ['errorCode' => '10002', 'errorMessage' => 'A system error occurred.', 'description' => ''], ], [ - [ - 'errorCode' => '10011', - 'errorMessage' => '子账号服务失败', - ], + ['errorCode' => '10003', 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', 'description' => ''], ], [ - [ - 'errorCode' => '10012', - 'errorMessage' => '翻译服务调用失败', - ], + ['errorCode' => '10004', 'errorMessage' => 'Some required parameters are missing.', 'description' => ''], ], [ - [ - 'errorCode' => '10013', - 'errorMessage' => '账号服务没有开通或者欠费', - ], + ['errorCode' => '10005', 'errorMessage' => 'The specified language pair is not supported.', 'description' => ''], ], - 199 => [ - [ - 'errorCode' => '19999', - 'errorMessage' => 'An unknown error occurred.', - ], + [ + ['errorCode' => '10006', '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' => '10007', 'errorMessage' => 'An error occurred while translating.', 'description' => ''], ], - 404 => [ - [ - 'errorCode' => '10025', - 'errorMessage' => 'The specified task does not exist.', - ], + [ + ['errorCode' => '10008', 'errorMessage' => 'The specified string is too long.', 'description' => ''], + ], + [ + ['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' => ''], ], ], - '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":"<GetDocTranslateTaskResponse>\\n <Status>translated</Status>\\n <TranslateErrorMessage>Fail to get the page number of document.</TranslateErrorMessage>\\n <TaskId>0586df512c8b4bb382d7d9a6a01b5854</TaskId>\\n <RequestId>12952E92-FDF3-4D3C-88E3-242D72BA7150</RequestId>\\n <PageCount>20</PageCount>\\n <TranslateFileUrl>http://translateFileUrl</TranslateFileUrl>\\n <TranslateErrorCode>Error</TranslateErrorCode>\\n</GetDocTranslateTaskResponse>","errorExample":""}]', - 'title' => '查询文档翻译任务', - 'description' => '请确保在使用该接口前,已充分了解文档翻译产品的收费方式和价格'."\n" - .'> 仅支持通过GET方式调用', - 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', + '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":"<Message>success</Message>\\n<RequestId>86D18195-D89C-4C8C-9DC4-5FCE789CE6D5</RequestId>\\n<Data>\\n <Translated>Hello</Translated>\\n</Data>\\n<Code>200</Code>","errorExample":""}]', + 'title' => '机器翻译专业版调用', + 'description' => '注意事项'."\n" + .'1、QPS限制50,如有扩展需求,请与我们联系。钉钉群号:23369411'."\n" + .'<props="intl">2、请确保在使用该接口前,已充分了解专业版翻译产品的收费方式和价格</ph></props>'."\n" + .'<props="china">2、字符长度上限是5000字符,若超出上限,可以保存成文件,使用[文档翻译](https://help.aliyun.com/document_detail/164151.html)</ph></props>'."\n" + .'<props="china">3、请确保在使用该接口前,已充分了解专业版翻译产品的收费方式和价格</ph></props>', + 'requestParamsDescription' => '### 场景说明'."\n" + .'我们在针对不同场景,都有不同的引擎,每个引擎都是特别优化过的,可以通过scene参数控制(场景可选取值:商品标题(title),商品描述(description),商品沟通(communication),医疗(medical),社交(social)) ,金融(finance)'."\n" + ."\n" + .'商品标题:运用阿里电商标题数据,单独训练出来的,翻译标题特别好'."\n" + ."\n" + .'商品详描:运用阿里商品详描数据,单独训练出来,专门翻译商品详描比较好'."\n" + ."\n" + .'商品沟通:在电商买卖家沟通场景下,翻译效果会很好'."\n" + ."\n" + .'医疗:是针对医疗文献、术语、药品单独训练出来的引擎,在这个场景下翻译效果会很好'."\n" + ."\n" + .'社交:面向口语化的翻译,在这个场景下翻译结果会比较好'."\n" + ."\n" + .'金融:面向金融领域的翻译', + 'responseParamsDescription' => ' <props="china">公共请求参数参见[《RPC 调用机制》公共请求参数组装方案](https://help.aliyun.com/document_detail/315526.html?spm=a2c4g.158244.0.0.34b627b5qv5gmt#sectiondiv-qq5-utu-r7a)</ph></props>', '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', - ], + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -2792,67 +2235,32 @@ ], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'none', - 'riskType' => 'none', - 'chargeType' => 'free', - 'tenantRelevance' => 'publicInformation', - ], + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'], 'parameters' => [ [ 'name' => 'SourceLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '原图语言', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'zh', - ], + 'schema' => ['description' => '原图语言', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'zh'], ], [ 'name' => 'TargetLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '译文语言', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'en', - ], + '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, - ], + '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', - ], + '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', - ], + 'schema' => ['description' => '翻译结果类型:文本(text),图片(image),不传值默认:text', 'type' => 'string', 'required' => false, 'example' => 'text'], ], ], 'responses' => [ @@ -2860,11 +2268,7 @@ 'schema' => [ 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '请求Id', - 'type' => 'string', - 'example' => '6640DE48-201C-4110-AE87-FB8FA34412B9', - ], + 'RequestId' => ['description' => '请求Id', 'type' => 'string', 'example' => '6640DE48-201C-4110-AE87-FB8FA34412B9'], 'Data' => [ 'description' => '翻译结果', 'type' => 'object', @@ -2875,56 +2279,32 @@ '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', - ], + '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' => [ 400 => [ - [ - 'errorCode' => '10026', - 'errorMessage' => 'Failed to translate the certificate. Please check the parameters.', - ], + ['errorCode' => '10026', 'errorMessage' => 'Failed to translate the certificate. Please check the parameters.', 'description' => '证件翻译失败,请检查提交的参数。'], ], 403 => [ - [ - 'errorCode' => 'InvalidAccountStatus.ServiceUnavailable', - 'errorMessage' => 'The service has not been activated.', - ], + ['errorCode' => 'InvalidAccountStatus.ServiceUnavailable', 'errorMessage' => 'The service has not been activated.', 'description' => '服务未开通。'], ], 503 => [ - [ - 'errorCode' => 'ServiceUnavailable', - 'errorMessage' => 'An error occurred while processing your request.', - ], + ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'An error occurred while processing your request.', '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":"<TranslateCertificateResponse>\\n <RequestId>BA8DAAE0-1985-4B19-86BA-97C1753FCF3A</RequestId>\\n <Data>\\n <TranslatedValues>\\n <ValueTranslation>Huang Jia</ValueTranslation>\\n <KeyTranslation>name</KeyTranslation>\\n <Value>黄佳</Value>\\n <Key>姓名</Key>\\n </TranslatedValues>\\n <TranslatedValues>\\n <ValueTranslation>2019-07-05</ValueTranslation>\\n <KeyTranslation>effective start date</KeyTranslation>\\n <Value>2019-07-05</Value>\\n <Key>有效起始日期</Key>\\n </TranslatedValues>\\n <TranslatedValues>\\n <ValueTranslation>331021190</ValueTranslation>\\n <KeyTranslation>certificate number</KeyTranslation>\\n <Value>331021190</Value>\\n <Key>证号</Key>\\n </TranslatedValues>\\n <TranslatedValues>\\n <ValueTranslation>1999-11-04</ValueTranslation>\\n <KeyTranslation>date of birth</KeyTranslation>\\n <Value>1999-11-04</Value>\\n <Key>出生日期</Key>\\n </TranslatedValues>\\n <TranslatedValues>\\n <ValueTranslation>No. 3 Damaiyu Street, Yuhuan county, Zhejiang province</ValueTranslation>\\n <KeyTranslation>address</KeyTranslation>\\n <Value>浙江省玉环县大麦屿街道3号</Value>\\n <Key>住址</Key>\\n </TranslatedValues>\\n <TranslatedValues>\\n <ValueTranslation>Fujian Ningde, traffic police division, public security bureau</ValueTranslation>\\n <KeyTranslation>license issuing unit</KeyTranslation>\\n <Value>福建省宁德市公安局交通警察支队</Value>\\n <Key>发证单位</Key>\\n </TranslatedValues>\\n <TranslatedValues>\\n <ValueTranslation>Chinese</ValueTranslation>\\n <KeyTranslation>nationality</KeyTranslation>\\n <Value>中国</Value>\\n <Key>国籍</Key>\\n </TranslatedValues>\\n <TranslatedValues>\\n <ValueTranslation>2019-07-05</ValueTranslation>\\n <KeyTranslation>date of first issue</KeyTranslation>\\n <Value>2019-07-05</Value>\\n <Key>初次领证日期</Key>\\n </TranslatedValues>\\n <TranslatedValues>\\n <ValueTranslation>C1</ValueTranslation>\\n <KeyTranslation>class</KeyTranslation>\\n <Value>C1</Value>\\n <Key>准驾车型</Key>\\n </TranslatedValues>\\n <TranslatedValues>\\n <ValueTranslation>Women\'s</ValueTranslation>\\n <KeyTranslation>sex</KeyTranslation>\\n <Value>女</Value>\\n <Key>性别</Key>\\n </TranslatedValues>\\n <TranslatedValues>\\n <ValueTranslation>2019-07-05至2025-07-05</ValueTranslation>\\n <KeyTranslation>validity period</KeyTranslation>\\n <Value>2019-07-05至2025-07-05</Value>\\n <Key>有效期限</Key>\\n </TranslatedValues>\\n </Data>\\n</TranslateCertificateResponse>","errorExample":""}]', 'title' => '证件翻译', 'description' => '请确保在使用该接口前,已充分了解图片翻译产品的[收费方式和价格](https://help.aliyun.com/document_detail/163332.html)。'."\n" ."\n" @@ -2941,321 +2321,222 @@ 'requestParamsDescription' => ' ', 'responseParamsDescription' => ' ', 'extraInfo' => ' ', - ], - 'GetImageTranslate' => [ - 'summary' => '包含文字识别、文本翻译、文字回填等能力。', - '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":"<TranslateCertificateResponse>\\n <RequestId>BA8DAAE0-1985-4B19-86BA-97C1753FCF3A</RequestId>\\n <Data>\\n <TranslatedValues>\\n <ValueTranslation>Huang Jia</ValueTranslation>\\n <KeyTranslation>name</KeyTranslation>\\n <Value>黄佳</Value>\\n <Key>姓名</Key>\\n </TranslatedValues>\\n <TranslatedValues>\\n <ValueTranslation>2019-07-05</ValueTranslation>\\n <KeyTranslation>effective start date</KeyTranslation>\\n <Value>2019-07-05</Value>\\n <Key>有效起始日期</Key>\\n </TranslatedValues>\\n <TranslatedValues>\\n <ValueTranslation>331021190</ValueTranslation>\\n <KeyTranslation>certificate number</KeyTranslation>\\n <Value>331021190</Value>\\n <Key>证号</Key>\\n </TranslatedValues>\\n <TranslatedValues>\\n <ValueTranslation>1999-11-04</ValueTranslation>\\n <KeyTranslation>date of birth</KeyTranslation>\\n <Value>1999-11-04</Value>\\n <Key>出生日期</Key>\\n </TranslatedValues>\\n <TranslatedValues>\\n <ValueTranslation>No. 3 Damaiyu Street, Yuhuan county, Zhejiang province</ValueTranslation>\\n <KeyTranslation>address</KeyTranslation>\\n <Value>浙江省玉环县大麦屿街道3号</Value>\\n <Key>住址</Key>\\n </TranslatedValues>\\n <TranslatedValues>\\n <ValueTranslation>Fujian Ningde, traffic police division, public security bureau</ValueTranslation>\\n <KeyTranslation>license issuing unit</KeyTranslation>\\n <Value>福建省宁德市公安局交通警察支队</Value>\\n <Key>发证单位</Key>\\n </TranslatedValues>\\n <TranslatedValues>\\n <ValueTranslation>Chinese</ValueTranslation>\\n <KeyTranslation>nationality</KeyTranslation>\\n <Value>中国</Value>\\n <Key>国籍</Key>\\n </TranslatedValues>\\n <TranslatedValues>\\n <ValueTranslation>2019-07-05</ValueTranslation>\\n <KeyTranslation>date of first issue</KeyTranslation>\\n <Value>2019-07-05</Value>\\n <Key>初次领证日期</Key>\\n </TranslatedValues>\\n <TranslatedValues>\\n <ValueTranslation>C1</ValueTranslation>\\n <KeyTranslation>class</KeyTranslation>\\n <Value>C1</Value>\\n <Key>准驾车型</Key>\\n </TranslatedValues>\\n <TranslatedValues>\\n <ValueTranslation>Women\'s</ValueTranslation>\\n <KeyTranslation>sex</KeyTranslation>\\n <Value>女</Value>\\n <Key>性别</Key>\\n </TranslatedValues>\\n <TranslatedValues>\\n <ValueTranslation>2019-07-05至2025-07-05</ValueTranslation>\\n <KeyTranslation>validity period</KeyTranslation>\\n <Value>2019-07-05至2025-07-05</Value>\\n <Key>有效期限</Key>\\n </TranslatedValues>\\n </Data>\\n</TranslateCertificateResponse>","errorExample":""}]', + ], + 'TranslateECommerce' => [ + 'summary' => '调用机器翻译专业版获取翻译结果。', + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], + [ + 'BearerToken' => [], + ], ], 'operationType' => 'read', - 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + '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://xxxxxxx.oss-cn-shenzhen.aliyuncs.com/xxxxxx.jpg', + 'enumValueTitles' => ['html' => 'html', 'text' => 'text'], + 'example' => 'text', ], ], [ + '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' => '图片中的文字语种,<props="intl">[语向支持以及语言代码](https://www.alibabacloud.com/help/zh/doc-detail/182310.html)</props>'."\n" - .'<props="china">[语向支持以及语言代码](https://help.aliyun.com/document_detail/182310.html?spm=a2c4g.11186623.6.543.106340eblV3QUo)</props>', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'zh', - ], + 'schema' => ['description' => '原文语言<props="china">[参考语言code](https://help.aliyun.com/document_detail/158269.html?spm=a2c4g.11186623.2.8.53746614hvrF2G)</props><props="intl">[参考语言code](https://www.alibabacloud.com/help/zh/doc-detail/158269.html)</props>'."\n", 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'en'], ], [ - 'name' => 'TargetLanguage', + 'name' => 'SourceText', 'in' => 'formData', - 'schema' => [ - 'description' => '图片中文字翻译后的语种,<props="intl">[语向支持以及语言代码](https://www.alibabacloud.com/help/zh/doc-detail/182310.html)</props>'."\n" - .'<props="china">[语向支持以及语言代码](https://help.aliyun.com/document_detail/182310.html?spm=a2c4g.11186623.6.543.106340eblV3QUo)</props>', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'en', - ], + 'schema' => ['description' => '待翻译内容', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'Hello'], ], [ - 'name' => 'Extra', + 'name' => 'Scene', '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:不忽略', + 'description' => '场景可选取值:商品标题(title),商品描述(description),商品沟通(communication),医疗(medical),社交(social),金融(finance)', 'type' => 'string', - 'required' => false, + 'required' => true, 'docRequired' => true, - 'example' => '{"have_ocr": "false", "without_text":"true", "have_psd": "false", "ignore_entity": "false"}', + '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' => [ 200 => [ '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', - ], + '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' => [ - '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}', - ], + '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\\": \\"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":"<Message>ok</Message>\\n<RequestId>A41F6E25-8520-4AF0-90EF-AF7E32840108</RequestId>\\n<Data>\\n <PictureEditor>{\\"text\\":\\"P翼-至草款\\",\\"width\\":750,\\"wordNum\\":10}</PictureEditor>\\n <Orc>{\\"text\\":\\"P翼-至草款\\",\\"width\\":750,\\"wordNum\\":10}</Orc>\\n <Url>https://ae01.alicdn.com/kf/xxxxx.jpeg</Url>\\n</Data>\\n<Code>200</Code>","errorExample":""}]', - 'title' => '商品图片智能翻译', - 'description' => '><notice>该接口已计划下线,不建议继续调用。><notice>'."\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' => ' ', - ], - 'CreateImageTranslateTask' => [ - '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' => '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', 'in' => 'formData', - 'schema' => [ - 'description' => '图片原始语种', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'zh', - ], + 'schema' => ['description' => '原文语言,<props="china">[参考语言code](https://help.aliyun.com/document_detail/215387.html)</ph></props><props="intl">[参考语言code](https://www.alibabacloud.com/help/zh/machine-translation/latest/machine-translation-language-code-list)</ph></props>', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'zh'], ], [ 'name' => 'TargetLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '图片翻译目标语种', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'en', - ], + 'schema' => ['description' => '译文语言,<props="china">[参考语言code](https://help.aliyun.com/document_detail/215387.html)</ph></props><props="intl">[参考语言code](https://www.alibabacloud.com/help/zh/machine-translation/latest/machine-translation-language-code-list)</ph></props>', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'en'], ], [ - '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' => '你好'], ], [ - 'name' => 'ClientToken', + 'name' => 'Scene', 'in' => 'formData', - 'schema' => [ - 'description' => '提供幂等能力,3分钟内,相同的值只会生效一次', - 'type' => 'string', - 'required' => false, - 'example' => '1', - ], + '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' => [ @@ -3263,369 +2544,169 @@ '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":"<Message>ok</Message>\\n<RequestId>A41F6E25-8520-4AF0-90EF-AF7E32840108</RequestId>\\n<Data>\\n <TaskId>A41F6E25-8520-4AF0-90EF-111111</TaskId>\\n</Data>\\n<Code>200</Code>","errorExample":""}]', - 'title' => '创建异步图片翻译调用指南', - 'description' => '><notice>该接口已计划下线,不建议继续调用。></notice>', + '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":"<TranslateGeneralResponse>\\n <RequestId>14E447CA-B93B-4526-ACD7-42AE13CC2AF6</RequestId>\\n <Data>\\n <Translated>Hello</Translated>\\n </Data>\\n <Code>200</Code>\\n</TranslateGeneralResponse>","errorExample":""}]', + 'title' => '机器翻译通用版调用', + 'description' => '注意事项'."\n" + .'1、QPS限制50,如有扩展需求,请与我们联系。钉钉群号:23369411'."\n" + .'<props="intl">2、请确保在使用该接口前,已充分了解通用版翻译产品的收费方式和价格</ph></props>'."\n" + .'<props="china">2、字符长度上限是5000字符,若超出上限,可以保存成文件,使用[文档翻译](https://help.aliyun.com/document_detail/164151.html)</ph></props>'."\n" + .'<props="china">3、请确保在使用该接口前,已充分了解通用版翻译产品的收费方式和价格</ph></props>', 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', + 'responseParamsDescription' => '<props="china">公共请求参数参见[《RPC 调用机制》公共请求参数组装方案](https://help.aliyun.com/document_detail/315526.html?spm=a2c4g.158244.0.0.34b627b5qv5gmt#sectiondiv-qq5-utu-r7a)</ph></props>', 'extraInfo' => ' ', - ], - 'GetImageTranslateTask' => [ - 'summary' => '通过任务ID获取异步图片翻译结果。', - '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' => 'TaskId', + 'name' => 'ImageUrl', 'in' => 'formData', - 'schema' => [ - 'description' => '异步图片翻译任务Id', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'xxxxxx', - ], - ], - ], - 'responses' => [ - 200 => [ - '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', - ], - 'Data' => [ - 'description' => '返回的数据内容'."\n", - '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}]', - ], - ], - ], - ], - ], - ], - ], - '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.', - ], + 'schema' => ['description' => '原图 URL,跟 Base64 不能同时为空,优先取 Base64。', 'type' => 'string', 'required' => false, 'example' => 'https://example.com/example.jpg'], ], [ - [ - '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.', - ], + 'name' => 'ImageBase64', + 'in' => 'formData', + 'schema' => ['description' => '原图 Base64,跟 URL 不能同时为空,优先取 Base64。', 'type' => 'string', 'required' => false, 'example' => '/9j/4...H/9k='], ], [ - [ - 'errorCode' => 'System.TranslateServiceCallFailed', - 'errorMessage' => 'Failed to call the translation service.', - ], + 'name' => 'SourceLanguage', + 'in' => 'formData', + 'schema' => ['description' => '源语种,支持的[语种参考](https://help.aliyun.com/document_detail/163584.html),必填(请忽略表格中“是否必填”中的“否”)', 'type' => 'string', 'required' => false, 'example' => 'zh'], ], [ - [ - 'errorCode' => 'System.AccountNotActivatedOrInArrears', - 'errorMessage' => 'The service is not activated or the account has an outstanding balance.', - ], + 'name' => 'TargetLanguage', + 'in' => 'formData', + 'schema' => ['description' => '目标语种,支持的[语种参考](https://help.aliyun.com/document_detail/163584.html),必填(请忽略表格中“是否必填”中的“否”)', 'type' => 'string', 'required' => false, 'example' => 'en'], ], - ], - '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' => '><notice>该接口已计划下线,不建议继续调用。></notice>', - 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', - 'extraInfo' => ' ', - ], - 'GetImageDiagnose' => [ - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], - 'security' => [ [ - 'AK' => [], - ], - ], - 'operationType' => 'read', - 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - ], - 'parameters' => [ - [ - 'name' => 'Url', + 'name' => 'Field', 'in' => 'formData', 'schema' => [ - 'description' => '图片链接', + 'description' => '翻译领域, 可选值如下。'."\n" + .'- `general`: 通用图片翻译'."\n" + .'- `e-commerce`: 电商领域图片翻译'."\n" + ."\n" + .'默认及未识别领域均按通用图片翻译处理。', 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'http://xxxxx.oss-cn-shenzhen.aliyuncs.com/jd/41209/xxxxx.jpg', + 'required' => false, + '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 商品所属平台,支持ae/icbu/lazada', - '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' => [ - 'Language' => [ - 'description' => '图片中的文字识别后的语种', - 'type' => 'string', - 'example' => 'zh', - ], + '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'], ], ], ], @@ -3633,109 +2714,69 @@ ], ], '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.', - ], - ], - [ - [ - '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.', - ], + 400 => [ + ['errorCode' => 'Parameter.SourceLangError', 'errorMessage' => 'Source languages are not supported.', 'description' => '源语种不支持。'], + ['errorCode' => 'Parameter.TargetLangError', 'errorMessage' => 'Target languages are not supported.', 'description' => '目标语种不支持。'], ], [ - [ - 'errorCode' => 'System.SubServiceFailed', - 'errorMessage' => 'Sub-account service failed.', - ], + ['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.TranslateServiceCallFailed', - 'errorMessage' => 'Failed to call the translation service.', - ], + 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.AccountNotActivatedOrInArrears', - 'errorMessage' => 'The service is not activated or the account has an outstanding balance.', - ], + 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' => '段落合并错误'], ], - 199 => [ - [ - 'errorCode' => 'System.unknownError', - 'errorMessage' => 'An unknown error occurred.', + ], + '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' => '*'], + ], ], ], ], - '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":"<RequestId>DC2DCCC9-C3DF-4F59-8D8E-78185729F16D</RequestId>\\n<Message>ok</Message>\\n<Data>\\n <Language>zh</Language>\\n</Data>\\n<Code>200</Code>","errorExample":""}]', - 'title' => '图片诊断', - 'summary' => '能够识别图片中的文字的语种。', - 'description' => '><notice>该接口已计划下线,不建议继续调用。></notice>', - 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', - 'extraInfo' => ' ', + '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":"<TranslateImageResponse>\\n <code>200</code>\\n <data>\\n <finalImageUrl>https://example.com/example.jpg</finalImageUrl>\\n </data>\\n <requestId>D774D33D-F1CB-5A2C-A787-E0A2179239CE</requestId>\\n</TranslateImageResponse>","errorExample":""}]', ], - 'GetTitleDiagnose' => [ - 'summary' => '通过商品标题质量诊断服务,产出可视化的标题质量分,便于卖家对现有的商品标题质量有实际体感。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'TranslateImageBatch' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -3743,150 +2784,60 @@ ], 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - ], + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free', 'tenantRelevance' => 'publicInformation'], 'parameters' => [ [ - 'name' => 'Title', + 'name' => 'ImageUrls', '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' => '原图 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' => 'Language', + 'name' => 'SourceLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '标题文字的语种,<props="china">[语向支持以及语言代码](https://help.aliyun.com/document_detail/182310.html?spm=a2c4g.11186623.6.543.106340eblV3QUo)</props><props="intl">[语向支持以及语言代码](https://www.alibabacloud.com/help/zh/doc-detail/182310.html)</props>'."\n", - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'zh', - ], + 'schema' => ['description' => '源语种,支持的语种及对应的代码请参考[语言code](https://help.aliyun.com/document_detail/163584.html)', 'type' => 'string', 'required' => 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/163584.html)', 'type' => 'string', 'required' => true, 'example' => 'en'], ], [ - 'name' => 'CategoryId', + 'name' => 'Ext', 'in' => 'formData', - 'schema' => [ - 'description' => '类目id,如没有类目数据则传入0', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => '123', - ], + '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' => 'Extra', + 'name' => 'CustomTaskId', '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' => '自定义任务 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' => 'ok', - ], - 'RequestId' => [ - 'description' => '请求ID', - 'type' => 'string', - 'example' => 'DC2DCCC9-C3DF-4F59-8D8E-78185729F16D', - ], + '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' => [ - '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', - ], + 'TaskId' => ['description' => '任务 ID,用于后续获取翻译结果', 'type' => 'string', 'example' => 'EEA28E6D-4828-5031-BD8C-8FF1B3216842'], ], ], ], @@ -3895,230 +2846,123 @@ ], '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\\": \\"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":"<RequestId>DC2DCCC9-C3DF-4F59-8D8E-78185729F16D</RequestId>\\n<Message>ok</Message>\\n<Data>\\n <NoFirstUppercaseList>no</NoFirstUppercaseList>\\n <ContainCoreClasses>true</ContainCoreClasses>\\n <DisableWords>baba</DisableWords>\\n <WordCount>10</WordCount>\\n <OverLengthLimit>100</OverLengthLimit>\\n <TotalScore>3</TotalScore>\\n <DuplicateWords>hi</DuplicateWords>\\n <WordSpelledCorrectError>ahk</WordSpelledCorrectError>\\n <AllUppercaseWords>Boy</AllUppercaseWords>\\n <LanguageQualityScore>2</LanguageQualityScore>\\n</Data>\\n<Code>200</Code>","errorExample":""}]', - 'title' => '标题诊断调用指南', - 'description' => '><notice>该接口已计划下线,不建议继续调用。></notice>', - '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":"<TranslateImageBatchResponse>\\n <RequestId>D774D33D-F1CB-5A2C-A787-E0A2179239CE</RequestId>\\n <Message>OK</Message>\\n <Code>200</Code>\\n <Data>\\n <TaskId>EEA28E6D-4828-5031-BD8C-8FF1B3216842</TaskId>\\n </Data>\\n</TranslateImageBatchResponse>","errorExample":""}]', ], - 'GetTitleGenerate' => [ - 'summary' => '基于电商大数据,自动优化商品标题。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'TranslateSearch' => [ + 'summary' => '搜索翻译', + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'read', + 'operationType' => 'readAndWrite', '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', - 'in' => 'formData', - 'schema' => [ - 'description' => '标题语种,<props="china">[语向支持以及语言代码](https://help.aliyun.com/document_detail/182310.html)</props><props="intl">[语向支持以及语言代码](https://www.alibabacloud.com/help/zh/doc-detail/182310.html)</props>'."\n", - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'en', - ], - ], - [ - 'name' => 'Platform', + 'name' => 'FormatType', 'in' => 'formData', - 'schema' => [ - 'description' => '商品标题所属平台,支持ae/icbu', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'ae', - ], + 'allowEmptyValue' => false, + 'schema' => ['title' => '幂等参数', 'type' => 'string', 'required' => true, 'example' => 'text'], ], [ - 'name' => 'CategoryId', + 'name' => 'SourceLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '类目ID,如没有类目数据则传入0', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => '127896018', - ], + 'schema' => ['type' => 'string', 'required' => true, 'example' => 'zh'], ], [ - 'name' => 'HotWords', + 'name' => 'TargetLanguage', 'in' => 'formData', - 'schema' => [ - 'description' => '热词', - 'type' => 'string', - 'required' => false, - 'example' => 'None,Plastic', - ], + 'schema' => ['type' => 'string', 'required' => true, 'example' => 'en'], ], [ - 'name' => 'Attributes', + 'name' => 'Scene', 'in' => 'formData', - 'schema' => [ - 'description' => '商品属性,请如示例传入JSON数据'."\n", - 'type' => 'string', - 'required' => false, - 'example' => '{2:"None",10:"Plastic"}', - ], + 'schema' => ['type' => 'string', 'required' => true, 'example' => 'query'], ], [ - 'name' => 'Extra', + 'name' => 'SourceText', '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' => ['type' => 'string', 'required' => true, 'example' => '今天天气不错'], ], ], 'responses' => [ 200 => [ 'schema' => [ + 'title' => 'Schema of Response', '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' => ['title' => 'Id of the request', 'type' => 'string'], + 'Code' => ['type' => 'string'], + 'Message' => ['type' => 'string'], 'Data' => [ - 'description' => '返回内容', 'type' => 'object', 'properties' => [ - 'Titles' => [ - 'description' => '优化后的标题内容', - 'type' => 'string', - 'example' => '10pcs 80ml Kitchen Disposable Plastic Sauce Cup Pot Chutney Container', - ], + 'Translated' => ['type' => 'string'], ], ], ], @@ -4126,878 +2970,862 @@ ], ], 'errorCodes' => [ - 101 => [ - [ - 'errorCode' => 'System.RequestTimeOut', - 'errorMessage' => 'The request has timed out.', - ], - ], - [ - [ - 'errorCode' => 'System.Error', - 'errorMessage' => 'A system error occurred.', - ], + 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.', 'description' => ''], ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'changeSet' => [], + 'ramActions' => [ [ - [ - 'errorCode' => 'System.UrlDecodingError', - 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateSearch', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], - [ - [ - 'errorCode' => 'System.ParameterError', - 'errorMessage' => 'Some required parameters are missing.', + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"\\",\\n \\"Code\\": \\"\\",\\n \\"Message\\": \\"\\",\\n \\"Data\\": {\\n \\"Translated\\": \\"\\"\\n }\\n}","type":"json"}]', + ], + ], + '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' => '*'], ], ], - [ - [ - 'errorCode' => 'System.LanguageNotSupported', - 'errorMessage' => 'The specified language pair is not supported.', + ], + [ + 'apiName' => 'CreateImageTranslateTask', + 'description' => '创建异步图片翻译调用指南', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'alimt:CreateImageTranslateTask', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - [ - 'errorCode' => 'System.LanguageDetectError', - 'errorMessage' => 'An error occurred while detecting the language.', + ], + [ + 'apiName' => 'GetTranslateReport', + 'description' => '获取调用接口报表', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetTranslateReport', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - [ - 'errorCode' => 'System.TranslateError', - 'errorMessage' => 'An error occurred while translating.', + ], + [ + 'apiName' => 'GetDocTranslateTask', + 'description' => '查询文档翻译任务', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetDocTranslateTask', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - [ - 'errorCode' => 'System.StringTooLong', - 'errorMessage' => 'The maximum length of the specified string is exceeded.', + ], + [ + 'apiName' => 'GetCertificateUserStatus', + 'description' => '', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetCertificateUserStatus', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - [ - 'errorCode' => 'System.subNotPermission', - 'errorMessage' => 'The sub-account is not authorized to perform the operation.', + ], + [ + 'apiName' => 'GetMtUserStatus', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:GetMtUserStatus', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - [ - 'errorCode' => 'System.AccountNotActivated', - 'errorMessage' => 'The account has not activated the service.', + ], + [ + 'apiName' => 'OcrPluginService', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:OcrPluginService', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - [ - 'errorCode' => 'System.SubServiceFailed', - 'errorMessage' => 'Sub-account service failed.', + ], + [ + 'apiName' => 'DoCheckResource', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:DoCheckResource', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - [ - 'errorCode' => 'System.TranslateServiceCallFailed', - 'errorMessage' => 'Failed to call the translation service.', + ], + [ + 'apiName' => 'DeleteIntervention', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:DeleteIntervention', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - [ - 'errorCode' => 'System.AccountNotActivatedOrInArrears', - 'errorMessage' => 'The service is not activated or the account has an outstanding balance.', + ], + [ + 'apiName' => 'GetAsyncTranslate', + 'description' => '获取文本异步翻译任务', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:GetAsyncTranslate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - 199 => [ - [ - 'errorCode' => 'System.unknownError', - 'errorMessage' => 'An unknown error occurred.', + ], + [ + 'apiName' => 'GetOssInfo', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:GetOssInfo', + '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 \\"Titles\\": \\"10pcs 80ml Kitchen Disposable Plastic Sauce Cup Pot Chutney Container\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<RequestId>DC2DCCC9-C3DF-4F59-8D8E-78185729F16D</RequestId>\\n<Message>ok</Message>\\n<Data>\\n <Titles>10pcs 80ml Kitchen Disposable Plastic Sauce Cup Pot Chutney Container</Titles>\\n</Data>\\n<Code>200</Code>","errorExample":""}]', - 'title' => '标题优化调用指南', - 'description' => '><notice>该接口已计划下线,不建议继续调用。></notice>', - 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', - 'extraInfo' => ' ', - ], - 'GetTitleIntelligence' => [ - 'summary' => '通过类目、平台、关键词,自动生成商品标题。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], - 'security' => [ - [ - 'AK' => [], + [ + 'apiName' => 'GetImageTranslate', + 'description' => '商品图片智能翻译', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetImageTranslate', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], - 'operationType' => 'read', - 'deprecated' => false, - 'systemTags' => [ + [ + 'apiName' => 'GetBatchTranslate', + 'description' => '机器批量翻译调用指南', 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - 'tenantRelevance' => 'publicInformation', - ], - 'parameters' => [ - [ - 'name' => 'Platform', - 'in' => 'formData', - 'schema' => [ - 'description' => '商品所在平台 ae、icbu、lazada', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'ae', + 'ramAction' => [ + 'action' => 'alimt:GetBatchTranslate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'Extra', - 'in' => 'formData', - 'schema' => [ - 'description' => '扩展信息,json数据格式,可选字段', - 'type' => 'string', - 'required' => false, - 'example' => '{"product_id":"1212"}', + ], + [ + 'apiName' => 'GetDetectLanguage', + 'description' => '语种识别调用指南', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetDetectLanguage', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'CatLevelThreeId', - 'in' => 'formData', - 'schema' => [ - 'description' => '三级类目Id,如没有类目数据则传入0', - 'type' => 'integer', - 'format' => 'int64', - 'required' => true, - 'docRequired' => true, - 'maximum' => '99999999999', - 'minimum' => '0', - 'example' => '111', + ], + [ + 'apiName' => 'UpdateInterventionData', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:UpdateInterventionData', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'CatLevelTwoId', - 'in' => 'formData', - 'schema' => [ - 'description' => '二级类目Id,如没有类目数据则传入0', - 'type' => 'integer', - 'format' => 'int64', - 'required' => true, - 'docRequired' => true, - 'maximum' => '99999999999', - 'minimum' => '0', - 'example' => '222', + ], + [ + 'apiName' => 'TranslateECommerce', + 'description' => '机器翻译电商版调用', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateECommerce', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'Keywords', - 'in' => 'formData', - 'schema' => [ - 'description' => '关键词,多个词英文逗号分隔比如:hello,apple', - 'type' => 'string', - 'required' => false, - 'docRequired' => true, - 'example' => 'hello,apple', + ], + [ + 'apiName' => 'DeleteInterventionData', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:DeleteInterventionData', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'responses' => [ - 200 => [ - 'schema' => [ - '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', - ], - 'Data' => [ - 'description' => '返回数据', - 'type' => 'object', - 'properties' => [ - 'Titles' => [ - 'description' => '自动生成的标题信息', - 'type' => 'string', - 'example' => 'Custom Hello Kitty PVC Cartoon Apple for Home Garden Complete Apple Bath Shower', - ], - ], - ], - ], + [ + 'apiName' => 'Translate', + 'description' => '机器翻译专业版调用', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:Translate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'errorCodes' => [ - 101 => [ - [ - 'errorCode' => 'System.RequestTimeOut', - 'errorMessage' => 'The request has timed out.', + [ + 'apiName' => 'FindInterventionData', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:FindInterventionData', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - [ - 'errorCode' => 'System.Error', - 'errorMessage' => 'A system error occurred.', + ], + [ + 'apiName' => 'OpenAlimtService', + 'description' => '商品服务开通', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:OpenAlimtService', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - [ - 'errorCode' => 'System.UrlDecodingError', - 'errorMessage' => 'An error occurred while decoding the URL. Verify that the specified URL is encoded.', + ], + [ + 'apiName' => 'GetImageDiagnose', + 'description' => '图片诊断', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetImageDiagnose', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - [ - 'errorCode' => 'System.ParameterError', - 'errorMessage' => 'Some required parameters are missing.', + ], + [ + 'apiName' => 'GetImageTranslateTask', + 'description' => '获取异步图片翻译结果', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetImageTranslateTask', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - [ - 'errorCode' => 'System.LanguageNotSupported', - 'errorMessage' => 'The specified language pair is not supported.', + ], + [ + 'apiName' => 'TranslateBatchProduct', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateBatchProduct', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - [ - 'errorCode' => 'System.LanguageDetectError', - 'errorMessage' => 'An error occurred while detecting the language.', + ], + [ + 'apiName' => 'DomainSearch', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:DomainSearch', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - [ - 'errorCode' => 'System.TranslateError', - 'errorMessage' => 'An error occurred while translating.', + ], + [ + 'apiName' => 'TranslateBySPInner', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateBySPInner', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - [ - 'errorCode' => 'System.StringTooLong', - 'errorMessage' => 'The maximum length of the specified string is exceeded.', + ], + [ + 'apiName' => 'TranslateProduct', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateProduct', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - [ - 'errorCode' => 'System.subNotPermission', - 'errorMessage' => 'The sub-account is not authorized to perform the operation.', + ], + [ + 'apiName' => 'GetDetectLanguageVpc', + 'description' => '', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetDetectLanguageVpc', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - [ - 'errorCode' => 'System.AccountNotActivated', - 'errorMessage' => 'The account has not activated the service.', + ], + [ + 'apiName' => 'FindInterventionTask', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:FindInterventionTask', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - [ - 'errorCode' => 'System.SubServiceFailed', - 'errorMessage' => 'Sub-account service failed.', + ], + [ + 'apiName' => 'QueryOpenStatusLingjie', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:QueryOpenStatusLingjie', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - [ - 'errorCode' => 'System.TranslateServiceCallFailed', - 'errorMessage' => 'Failed to call the translation service.', + ], + [ + 'apiName' => 'TranslateImageBatch', + 'description' => '图片异步批量翻译', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateImageBatch', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - [ - 'errorCode' => 'System.AccountNotActivatedOrInArrears', - 'errorMessage' => 'The service is not activated or the account has an outstanding balance.', + ], + [ + 'apiName' => 'SaveInterventionData', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:SaveInterventionData', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - 199 => [ - [ - 'errorCode' => 'System.unknownError', - 'errorMessage' => 'An unknown error occurred.', + ], + [ + 'apiName' => 'TranslateImage', + 'description' => '图片翻译', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateImage', + 'authLevel' => 'operate', + '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":"<RequestId>D70487B4-8891-4D24-BB64-8788E53671FB</RequestId>\\n<Message>success</Message>\\n<Data>\\n <Titles>Custom Hello Kitty PVC Cartoon Apple for Home Garden Complete Apple Bath Shower</Titles>\\n</Data>\\n<Code>200</Code>","errorExample":""}]', - 'title' => '标题智能生成调用指南', - 'description' => '><notice>该接口已计划下线,不建议继续调用。></notice>', - 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', - 'extraInfo' => ' ', - ], - 'OpenAlimtService' => [ - 'summary' => '商品服务开通。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], - 'security' => [ - [ - 'AK' => [], - ], - [ - 'APP' => [], - ], - [ - 'PrivateKey' => [], - ], - [ - 'BearerToken' => [], + [ + 'apiName' => 'TranslateSearch', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateSearch', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], - 'operationType' => 'readAndWrite', - 'deprecated' => false, - 'systemTags' => [ + [ + 'apiName' => 'QueryApiInvokeCountLingjie', + 'description' => '', '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', + 'ramAction' => [ + 'action' => 'alimt:QueryApiInvokeCountLingjie', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'type' => 'object', - 'properties' => [ - 'OrderId' => [ - 'description' => '订单ID。', - 'type' => 'string', - 'example' => '123456', - ], - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => 'xxxx-xxxxx', - ], - ], + [ + 'apiName' => 'GetTranslateImageBatchResult', + 'description' => '图片异步批量翻译结果获取', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:GetTranslateImageBatchResult', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - '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', + [ + 'apiName' => 'GetUser', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:GetUser', + 'authLevel' => 'resource', + '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' => ' ', - ], - 'GetTranslateReport' => [ - 'summary' => '根据API名及开始结束时间获取API调用报表,并根据传入的group按照天或者小时聚合计算后返回。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], - 'security' => [ - [ - 'AK' => [], + [ + 'apiName' => 'QueryOpenStatusDetailLingjie', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:QueryOpenStatusDetailLingjie', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], - 'operationType' => 'read', - 'systemTags' => [ + [ + 'apiName' => 'RecommendProject', + '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', - ], - ], - [ - 'name' => 'EndTime', - 'in' => 'query', - 'schema' => [ - 'description' => '结束时间', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => '2021-03-01 23:59:59', + 'ramAction' => [ + 'action' => 'alimt:RecommendProject', + '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', - ], - ], - [ - 'name' => 'Group', - 'in' => 'query', - 'schema' => [ - 'description' => '分组。', - 'type' => 'string', - 'required' => true, - 'docRequired' => true, - 'example' => 'hour或者day', + ], + [ + 'apiName' => 'TranslateInterventionDataReview', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateInterventionDataReview', + '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' => 'CreateInterventionTask', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:CreateInterventionTask', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'errorCodes' => [ - 109 => [ - [ - 'errorCode' => '10009', - 'errorMessage' => '子账号没有权限', + [ + 'apiName' => 'GetTranslatedFile', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:GetTranslatedFile', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - [ - 'errorCode' => '10010', - 'errorMessage' => '账号没有开通服务', + ], + [ + 'apiName' => 'GetTitleDiagnose', + 'description' => '标题诊断调用指南', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetTitleDiagnose', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - [ - 'errorCode' => '10011', - 'errorMessage' => '子账号服务失败', + ], + [ + 'apiName' => 'SubmitTranslateFile', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:SubmitTranslateFile', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - [ - 'errorCode' => '10012', - 'errorMessage' => '翻译服务调用失败', + ], + [ + 'apiName' => 'TranslateBySP', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateBySP', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - [ - 'errorCode' => '10013', - 'errorMessage' => '账号服务没有开通或者欠费', + ], + [ + 'apiName' => 'GetTitleIntelligence', + 'description' => '标题智能生成调用指南', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetTitleIntelligence', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - 199 => [ - [ - 'errorCode' => '19999', - 'errorMessage' => 'An unknown error occurred.', + ], + [ + 'apiName' => 'TranslateGeneral', + 'description' => '机器翻译通用版调用', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateGeneral', + '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":"<GetTranslateReportResponse>\\n <Code>200</Code>\\n <Message>success</Message>\\n <Data>{\\"result\\":[{\\"time\\":\\"2021-10-21 00:00:00\\",\\"total\\":100}]}</Data>\\n <RequestId>86D18195-D89C-4C8C-9DC4-5FCE789CE6D5</RequestId>\\n</GetTranslateReportResponse>","errorExample":""}]', - 'title' => '获取调用接口报表', - 'description' => '请确保在使用该接口前,已充分了解机器翻译产品的收费方式和[价格](https://help.aliyun.com/document_detail/457279.html)', - ], - 'TranslateSearch' => [ - 'summary' => '搜索翻译', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'https', - ], - 'security' => [ - [ - 'AK' => [], + [ + 'apiName' => 'TranslateGeneralVpc', + 'description' => '通用文本翻译', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateGeneralVpc', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], - 'operationType' => 'readAndWrite', - 'deprecated' => false, - 'systemTags' => [ + [ + 'apiName' => 'DolphinDomainSearch', + 'description' => '', 'operationType' => 'none', - 'riskType' => 'none', - 'chargeType' => 'free', - 'tenantRelevance' => 'publicInformation', - ], - 'parameters' => [ - [ - 'name' => 'FormatType', - 'in' => 'formData', - 'allowEmptyValue' => false, - 'schema' => [ - 'title' => '幂等参数', - 'type' => 'string', - 'required' => true, - 'example' => 'text', + 'ramAction' => [ + 'action' => 'alimt:DolphinDomainSearch', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'SourceLanguage', - 'in' => 'formData', - 'schema' => [ - 'type' => 'string', - 'required' => true, - 'example' => 'zh', + ], + [ + 'apiName' => 'RecommendCompany', + 'description' => '', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:RecommendCompany', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'TargetLanguage', - 'in' => 'formData', - 'schema' => [ - 'type' => 'string', - 'required' => true, - 'example' => 'en', + ], + [ + 'apiName' => 'CreateAsyncTranslate', + 'description' => '创建文本异步翻译任务', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:CreateAsyncTranslate', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'Scene', - 'in' => 'formData', - 'schema' => [ - 'type' => 'string', - 'required' => true, - 'example' => 'query', + ], + [ + 'apiName' => 'TranslateCertificate', + 'description' => '证件翻译', + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'alimt:TranslateCertificate', + 'authLevel' => 'resource', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'SourceText', - 'in' => 'formData', - 'schema' => [ - 'type' => 'string', - 'required' => true, - 'example' => '今天天气不错', + ], + [ + 'apiName' => 'GetTitleGenerate', + 'description' => '标题优化调用指南', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetTitleGenerate', + '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' => 'CreateDocTranslateTask', + 'description' => '创建文档翻译任务', + 'operationType' => 'create', + 'ramAction' => [ + 'action' => 'alimt:CreateDocTranslateTask', + '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' => 'GetBatchTranslateByVPC', + 'description' => '文本批量翻译', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'alimt:GetBatchTranslateByVPC', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'Alimt', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - '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' => '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}:*'], ], ], ]; |
