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/rai/2024-07-01 | |
| parent | 7347bac4ab7e136157fc94777e6cf87ef9e08599 (diff) | |
| download | afterglow-metadata-full-1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634.tar.gz afterglow-metadata-full-1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634.zip | |
update APIs 20260712
Diffstat (limited to 'data/zh_cn/rai/2024-07-01')
| -rw-r--r-- | data/zh_cn/rai/2024-07-01/api-docs.php | 9728 |
1 files changed, 3547 insertions, 6181 deletions
diff --git a/data/zh_cn/rai/2024-07-01/api-docs.php b/data/zh_cn/rai/2024-07-01/api-docs.php index 8726bc4..903493c 100644 --- a/data/zh_cn/rai/2024-07-01/api-docs.php +++ b/data/zh_cn/rai/2024-07-01/api-docs.php @@ -1,186 +1,213 @@ <?php return [ 'version' => '1.0', - 'info' => [ - 'style' => 'RPC', - 'product' => 'RAI', - 'version' => '2024-07-01', - ], + 'info' => ['style' => 'RPC', 'product' => 'RAI', 'version' => '2024-07-01'], 'directories' => [ [ - 'id' => 295704, - 'title' => '安全专家模型管理', + 'children' => ['ListModelCategory', 'CreateModelInstance', 'UpdateModelInstance', 'ListModelInstance', 'GetModelInstanceInfo', 'DeleteModelInstance'], 'type' => 'directory', - 'children' => [ - 'ListModelCategory', - 'CreateModelInstance', - 'UpdateModelInstance', - 'ListModelInstance', - 'GetModelInstanceInfo', - 'DeleteModelInstance', - ], + 'title' => '安全专家模型管理', + 'id' => 330651, ], [ - 'id' => 204680, - 'title' => '在线数据毒性检测', + 'children' => ['ModelInputContentSyncDetect', 'ModelOutputContentSyncDetect', 'ModelInputContentAsyncDetect', 'ModelOutputContentAsyncDetect', 'GetModelInputContentDetectResult', 'GetModelOutputContentDetectResult'], 'type' => 'directory', - 'children' => [ - 'ModelInputContentSyncDetect', - 'ModelOutputContentSyncDetect', - 'ModelInputContentAsyncDetect', - 'ModelOutputContentAsyncDetect', - 'GetModelInputContentDetectResult', - 'GetModelOutputContentDetectResult', - ], + 'title' => '在线数据毒性检测', + 'id' => 330625, ], [ - 'id' => 204681, - 'title' => '在线检测策略管理', + 'children' => ['GetPolicyDefaultOptions', 'CreatePolicy', 'UpdatePolicy', 'ListPolicy', 'GetPolicyInfo', 'DeletePolicy'], 'type' => 'directory', - 'children' => [ - 'GetPolicyDefaultOptions', - 'CreatePolicy', - 'UpdatePolicy', - 'ListPolicy', - 'GetPolicyInfo', - 'DeletePolicy', - ], + 'title' => '在线检测策略管理', + 'id' => 330632, ], [ - 'id' => 204682, - 'title' => '在线关键词管理', + 'children' => ['CreateWordGroup', 'UpdateWordGroup', 'ListWordGroup', 'GetWordGroup', 'DeleteWordGroup'], 'type' => 'directory', - 'children' => [ - 'CreateWordGroup', - 'UpdateWordGroup', - 'ListWordGroup', - 'GetWordGroup', - 'DeleteWordGroup', - ], + 'title' => '在线关键词管理', + 'id' => 330639, ], [ - 'id' => 220403, - 'title' => '敏感主题管理', + 'children' => ['CreateTopic', 'UpdateTopic', 'ListTopic', 'GetTopic', 'DeleteTopic'], 'type' => 'directory', - 'children' => [ - 'CreateTopic', - 'UpdateTopic', - 'ListTopic', - 'GetTopic', - 'DeleteTopic', - ], + 'title' => '敏感主题管理', + 'id' => 330645, ], [ - 'id' => 204361, - 'title' => '离线数据毒性检测', + 'children' => ['ContentSyncDetect', 'ContentAsyncDetect', 'GetContentDetectResult', 'BatchContentSyncDetect', 'BatchContentAsyncDetect'], 'type' => 'directory', - 'children' => [ - 'ContentSyncDetect', - 'ContentAsyncDetect', - 'GetContentDetectResult', - 'BatchContentSyncDetect', - 'BatchContentAsyncDetect', - ], + 'title' => '离线数据毒性检测', + 'id' => 330616, ], [ - 'id' => 204362, - 'title' => '服务开通', + 'children' => ['RegisterAccount', 'CheckAccount'], 'type' => 'directory', - 'children' => [ - 'RegisterAccount', - 'CheckAccount', - ], + 'title' => '服务开通', + 'id' => 330622, ], ], 'components' => [ 'schemas' => [], ], 'apis' => [ - 'ListModelCategory' => [ - 'summary' => '查询模型类别列表。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', - ], + 'BatchContentAsyncDetect' => [ + 'summary' => '批量内容异步检测。', + 'methods' => ['post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], 'operationType' => 'readAndWrite', + 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], ], 'parameters' => [ [ - 'name' => 'ModelSource', + 'name' => 'RegionId', 'in' => 'query', - 'schema' => [ - 'description' => '模型来源:1-PAI,2-其他', - 'type' => 'string', - 'required' => false, - 'example' => '1', - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], ], [ - 'name' => 'ContentSafeTextSupported', + 'name' => 'SceneName', 'in' => 'query', - 'schema' => [ - 'description' => '是否支持文本内容安全检测', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => 'True', - ], + 'schema' => ['description' => '场景名称', 'type' => 'string', 'required' => false, 'example' => '""'], ], [ - 'name' => 'ContentSafeImageSupported', + 'name' => 'ServiceName', 'in' => 'query', + 'schema' => ['description' => '服务名称。', 'type' => 'string', 'required' => false, 'example' => 'textDetection'], + ], + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', 'schema' => [ - 'description' => '是否支持图片内容安全检测', - 'type' => 'integer', - 'format' => 'int32', + 'description' => '检测内容', + 'type' => 'object', + 'properties' => [ + 'serviceParameterList' => [ + 'description' => '检测对象列表', + 'type' => 'array', + 'items' => [ + 'description' => '检测对象', + 'type' => 'object', + 'properties' => [ + 'content' => ['description' => '1. 要审核的文本内容,最大限制10000个字符。(包括英文和中文)'."\n" + .'2. 或者图片URL地址。', 'type' => 'string', 'required' => false, 'example' => '"XXXXXXXX"'], + ], + 'required' => false, + ], + 'required' => false, + ], + ], 'required' => false, - 'example' => 'False', ], ], - [ - 'name' => 'PromptAttackTextSupported', - 'in' => 'query', + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => '是否支持文本提示词攻击检测', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => 'False', + 'title' => 'Schema of Response', + 'description' => '响应', + 'type' => 'object', + 'properties' => [ + 'Code' => ['description' => '调用失败时,返回的错误码。更多信息,请参见错误码。', 'type' => 'string', 'example' => '00000'], + 'Data' => [ + 'description' => '返回的数据。', + 'type' => 'object', + 'properties' => [ + 'TaskId' => ['description' => '任务ID。', 'type' => 'string', 'example' => '19657954336'], + ], + ], + 'HttpStatusCode' => ['description' => 'http状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '如有错误,返回错误信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['description' => '请求ID。', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****F68692'], + 'Success' => ['description' => '操作是否成功。true表示成功,false表示失败。', 'type' => 'boolean', 'example' => 'True'], + ], ], ], + ], + 'errorCodes' => [], + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"Data\\": {\\n \\"TaskId\\": \\"19657954336\\"\\n },\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****F68692\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => '批量内容异步检测', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:BatchContentAsyncDetect', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + 'additionalActions' => [], + ], + ], + ], + 'BatchContentSyncDetect' => [ + 'summary' => '批量内容同步检测。', + 'methods' => ['get', 'post'], + 'schemes' => ['https'], + 'security' => [ [ - 'name' => 'SensitiveTopicTextSupported', + 'AK' => [], + ], + ], + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'get', + 'riskType' => 'none', + 'chargeType' => 'paid', + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], + ], + 'parameters' => [ + [ + 'name' => 'RegionId', 'in' => 'query', - 'schema' => [ - 'description' => '是否支持文本敏感主题检测', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => 'False', - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], ], [ - 'name' => 'ModelCategoryName', + 'name' => 'SceneName', + 'in' => 'query', + 'schema' => ['description' => '场景名称。', 'type' => 'string', 'required' => false, 'example' => '""'], + ], + [ + 'name' => 'ServiceName', 'in' => 'query', + 'schema' => ['description' => '服务名称。', 'type' => 'string', 'required' => false, 'example' => 'textDetection'], + ], + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', 'schema' => [ - 'description' => '模型类别名称', - 'type' => 'string', + 'description' => '请求Body。', + 'type' => 'object', + 'properties' => [ + 'serviceParameterList' => [ + 'description' => '批量内容安全检测列表,最大限制条数20条', + 'type' => 'array', + 'items' => [ + 'description' => '批量内容安全检测列表,最大限制条数20条', + 'type' => 'object', + 'properties' => [ + 'content' => ['description' => '要审核的文本内容,最大限制10000个字符。(包括英文和中文)', 'type' => 'string', 'required' => false, 'example' => '"要检测的内容"'], + ], + 'required' => false, + ], + 'required' => false, + ], + ], 'required' => false, - 'example' => 'demo', ], ], ], @@ -188,204 +215,284 @@ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => 'Schema of Response', + 'description' => '响应', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '状态码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'ModelCategoryInfoList' => [ - 'description' => '模型类别对象列表', - 'type' => 'array', - 'items' => [ - 'description' => '模型类别对象', - 'type' => 'object', - 'properties' => [ - 'ModelCategoryId' => [ - 'description' => '模型类别Id', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '2', - ], - 'ModelCategoryName' => [ - 'description' => '模型类别名称', - 'type' => 'string', - 'example' => 'Qwen2.5-3B-Intruct-PAI-Guard', - ], - 'ModelSource' => [ - 'description' => '模型来源:1-PAI,2-其他', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'ContentSafeTextSupported' => [ - 'description' => '是否支持文本内容安全检测', - 'type' => 'integer', - 'format' => 'int32', - 'example' => 'True', - ], - 'ContentSafeImageSupported' => [ - 'description' => '是否支持图片内容安全检测', - 'type' => 'integer', - 'format' => 'int32', - 'example' => 'False', - ], - 'PromptAttackTextSupported' => [ - 'description' => '是否支持文本提示词攻击检测', - 'type' => 'integer', - 'format' => 'int32', - 'example' => 'False', - ], - 'SensitiveTopicTextSupported' => [ - 'description' => '是否支持文本敏感主题检测', - 'type' => 'integer', - 'format' => 'int32', - 'example' => 'True', - ], - 'Priority' => [ - 'description' => '出方向规则的优先级。数字越小,优先级越高。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '12', + 'Code' => ['description' => '状态码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'Data' => [ + 'description' => '响应数据', + 'type' => 'object', + 'properties' => [ + 'DetectResultList' => [ + 'description' => '检测结果对象列表', + 'type' => 'array', + 'items' => [ + 'description' => '检测结果对象', + 'type' => 'object', + 'properties' => [ + 'RiskInfo' => ['description' => '风险标签,如有多个逗号分割', 'type' => 'string', 'example' => '色情'], + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + ], ], ], ], ], - 'HttpStatusCode' => [ - 'description' => 'http状态码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '如有错误,返回错误信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '表示是否调用成功。true:调用成功。 false:调用失败。', - 'type' => 'boolean', - 'example' => 'True', - ], + 'HttpStatusCode' => ['description' => '错误码描述', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '如有错误,返回错误信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求ID', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '操作是否成功。true表示成功,false表示失败。', 'type' => 'boolean', 'example' => 'True'], ], ], ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"ModelCategoryInfoList\\": [\\n {\\n \\"ModelCategoryId\\": 2,\\n \\"ModelCategoryName\\": \\"Qwen2.5-3B-Intruct-PAI-Guard\\",\\n \\"ModelSource\\": 1,\\n \\"ContentSafeTextSupported\\": 0,\\n \\"ContentSafeImageSupported\\": 0,\\n \\"PromptAttackTextSupported\\": 0,\\n \\"SensitiveTopicTextSupported\\": 0,\\n \\"Priority\\": 12\\n }\\n ],\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => '查询模型类别列表', - ], - 'CreateModelInstance' => [ - 'summary' => '创建模型实例。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', + 'errorCodes' => [], + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"Data\\": {\\n \\"DetectResultList\\": [\\n {\\n \\"RiskInfo\\": \\"色情\\",\\n \\"RiskResult\\": 1\\n }\\n ]\\n },\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => '批量内容同步检测', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:BatchContentSyncDetect', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + 'additionalActions' => [], + ], ], + ], + 'CheckAccount' => [ + 'summary' => '检查用户是否已开通服务,返回该账户的状态。', + 'path' => '', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], 'operationType' => 'readAndWrite', + 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', 'riskType' => 'none', - 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], + 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], ], 'parameters' => [ [ - 'name' => 'ModelCategoryId', + 'name' => 'RegionId', 'in' => 'query', + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], + ], + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => '模型类别Id', - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - 'example' => '1', + 'title' => 'Schema of Response', + 'description' => '响应。', + 'type' => 'object', + 'properties' => [ + 'Code' => ['description' => '状态码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'Data' => [ + 'description' => '响应数据。', + 'type' => 'object', + 'properties' => [ + 'CheckResult' => ['description' => '- -1:该账号未注册'."\n" + .'- 0:该账号正常使用中'."\n" + .'- 1:该账号已被冻结,无法使用RAI服务', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + ], + ], + 'HttpStatusCode' => ['description' => '错误码描述。', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '如有错误,返回错误信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求ID。', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '候选值:True/False,代表了是否当前API调用本身是成功的。不代表后续业务操作的成功。', 'type' => 'boolean', 'example' => 'True'], + ], + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"Data\\": {\\n \\"CheckResult\\": 1\\n },\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => '检查账号状态', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:CheckAccount', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], + ], + ], + 'ContentAsyncDetect' => [ + 'summary' => '单条内容异步检测。', + 'methods' => ['post'], + 'schemes' => ['https'], + 'security' => [ [ - 'name' => 'EasServiceName', + 'AK' => [], + ], + ], + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'get', + 'riskType' => 'none', + 'chargeType' => 'paid', + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], + ], + 'parameters' => [ + [ + 'name' => 'RegionId', 'in' => 'query', - 'schema' => [ - 'description' => 'EAS服务名称。', - 'type' => 'string', - 'required' => false, - 'example' => 'demo', - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], ], [ - 'name' => 'EasServiceId', + 'name' => 'SceneName', 'in' => 'query', - 'schema' => [ - 'description' => 'EAS服务Id', - 'type' => 'string', - 'required' => false, - 'example' => 'eas-m-12345678', - ], + 'schema' => ['description' => '场景名称。', 'type' => 'string', 'required' => false, 'example' => '""'], ], [ - 'name' => 'ModelUrl', + 'name' => 'ServiceName', 'in' => 'query', + 'schema' => ['description' => '服务名称。', 'type' => 'string', 'required' => false, 'example' => 'textDetection'."\n" + .'imageDetection'], + ], + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', 'schema' => [ - 'description' => 'EAS 公网调用地址', - 'type' => 'string', + 'description' => '检测内容', + 'type' => 'object', + 'properties' => [ + 'serviceParameter' => [ + 'description' => '检测参数对象', + 'type' => 'object', + 'properties' => [ + 'content' => ['description' => '1. 要审核的文本内容,最大限制10000个字符。(包括英文和中文)'."\n" + .'2. 或者要审核的图片URL地址', 'type' => 'string', 'required' => false, 'example' => '"要检测的内容"'], + ], + 'required' => false, + ], + ], 'required' => false, - 'example' => 'http://12345*****.cn-shanghai.aliyuncs.com/api/predict/demo', ], ], - [ - 'name' => 'ModelVpcUrl', - 'in' => 'query', + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => 'EAS VPC调用地址', - 'type' => 'string', - 'required' => false, - 'example' => 'http://12345*****.vpc.cn-shanghai.aliyuncs.com/api/predict/demo', + 'title' => 'Schema of Response', + 'description' => '响应', + 'type' => 'object', + 'properties' => [ + 'Code' => ['description' => '状态码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'Data' => [ + 'description' => '响应数据', + 'type' => 'object', + 'properties' => [ + 'TaskId' => ['description' => '任务ID。', 'type' => 'string', 'example' => '5d85cd38-03b2-49fd-86b2-be85c4b13215'], + ], + ], + 'HttpStatusCode' => ['description' => '错误码描述', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '如有错误,返回错误信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求ID', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '请求是否成功', 'type' => 'boolean', 'example' => 'True'], + ], + ], + ], + ], + 'errorCodes' => [], + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"Data\\": {\\n \\"TaskId\\": \\"5d85cd38-03b2-49fd-86b2-be85c4b13215\\"\\n },\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => '单条内容异步检测', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:ContentAsyncDetect', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], + 'additionalActions' => [], ], + ], + ], + 'ContentSyncDetect' => [ + 'summary' => '单条内容同步检测。', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], + 'security' => [ [ - 'name' => 'ModelToken', + 'AK' => [], + ], + ], + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'get', + 'riskType' => 'none', + 'chargeType' => 'paid', + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], + ], + 'parameters' => [ + [ + 'name' => 'RegionId', 'in' => 'query', - 'schema' => [ - 'description' => 'EAS Token', - 'type' => 'string', - 'required' => false, - 'example' => 'MzJiMDI5MDliODc0MTlkYmI0ZDhlYmExYjczYTIyZTE3Zm********', - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], ], [ - 'name' => 'ModelCallName', + 'name' => 'SceneName', 'in' => 'query', - 'schema' => [ - 'description' => 'OpenAI API接口中 模型名 参数', - 'type' => 'string', - 'required' => false, - 'example' => 'demo', - ], + 'schema' => ['description' => '场景名称。', 'type' => 'string', 'required' => false, 'example' => '""'], ], [ - 'name' => 'WorkspaceId', + 'name' => 'ServiceName', 'in' => 'query', + 'schema' => ['description' => '服务名字。', 'type' => 'string', 'required' => false, 'example' => 'textDetection'], + ], + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', 'schema' => [ - 'description' => '工作空间Id', - 'type' => 'integer', - 'format' => 'int64', + 'description' => '检测内容', + 'type' => 'object', + 'properties' => [ + 'serviceParameter' => [ + 'description' => '检测对象', + 'type' => 'object', + 'properties' => [ + 'content' => ['description' => '要审核的文本内容,最大限制10000个字符。(包括英文和中文)', 'type' => 'string', 'required' => false, 'example' => '"要检测的内容"'], + ], + 'required' => false, + ], + ], 'required' => false, - 'example' => '643168', ], ], ], @@ -393,58 +500,54 @@ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => 'Schema of Response', + 'description' => '响应', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '状态码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'HttpStatusCode' => [ - 'description' => 'HTTP状态码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '如有错误,返回错误信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****F68692', - ], - 'Success' => [ - 'description' => '操作是否成功。true表示成功,false表示失败。', - 'type' => 'boolean', - 'example' => 'True', - ], - 'ModelInstanceId' => [ - 'description' => '模型实例ID', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1', + 'Code' => ['description' => '结果码,200代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'Data' => [ + 'description' => '返回受影响的行数。', + 'type' => 'object', + 'properties' => [ + 'RiskInfo' => ['description' => '风险标签,如有多个逗号分割', 'type' => 'string', 'example' => '色情'], + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + ], ], + 'HttpStatusCode' => ['description' => 'HTTP状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '返回信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求ID', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '操作是否成功。true表示成功,false表示失败。', 'type' => 'boolean', 'example' => 'True'], ], ], ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****F68692\\",\\n \\"Success\\": true,\\n \\"ModelInstanceId\\": 1\\n}","type":"json"}]', - 'title' => '创建模型实例', - ], - 'UpdateModelInstance' => [ - 'summary' => '更新模型实例。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', + 'errorCodes' => [], + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"Data\\": {\\n \\"RiskInfo\\": \\"色情\\",\\n \\"RiskResult\\": 1\\n },\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => '单条内容同步检测', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:ContentSyncDetect', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + 'additionalActions' => [], + ], ], + ], + 'CreateModelInstance' => [ + 'summary' => '创建模型实例。', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -455,113 +558,48 @@ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], ], 'parameters' => [ [ 'name' => 'ModelCategoryId', 'in' => 'query', - 'schema' => [ - 'description' => '模型类别Id', - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - 'example' => '1', - ], + 'schema' => ['description' => '模型类别Id', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '1'], ], [ 'name' => 'EasServiceName', 'in' => 'query', - 'schema' => [ - 'description' => 'EAS服务名称。', - 'type' => 'string', - 'required' => false, - 'example' => 'rai_content_detection_model', - ], + 'schema' => ['description' => 'EAS服务名称。', 'type' => 'string', 'required' => false, 'example' => 'demo'], ], [ 'name' => 'EasServiceId', 'in' => 'query', - 'schema' => [ - 'description' => 'EAS 服务Id', - 'type' => 'string', - 'required' => false, - 'example' => 'eas-m-12345678', - ], + 'schema' => ['description' => 'EAS服务Id', 'type' => 'string', 'required' => false, 'example' => 'eas-m-12345678'], ], [ 'name' => 'ModelUrl', 'in' => 'query', - 'schema' => [ - 'description' => 'EAS 公网调用地址', - 'type' => 'string', - 'required' => false, - 'example' => 'http://12345*****.cn-shanghai.aliyuncs.com/api/predict/echo', - ], + 'schema' => ['description' => 'EAS 公网调用地址', 'type' => 'string', 'required' => false, 'example' => 'http://12345*****.cn-shanghai.aliyuncs.com/api/predict/demo'], ], [ 'name' => 'ModelVpcUrl', 'in' => 'query', - 'schema' => [ - 'description' => 'EAS VPC调用地址', - 'type' => 'string', - 'required' => false, - 'example' => 'http://12345*****.vpc.cn-shanghai.aliyuncs.com/api/predict/demo', - ], + 'schema' => ['description' => 'EAS VPC调用地址', 'type' => 'string', 'required' => false, 'example' => 'http://12345*****.vpc.cn-shanghai.aliyuncs.com/api/predict/demo'], ], [ 'name' => 'ModelToken', 'in' => 'query', - 'schema' => [ - 'description' => '模型token', - 'type' => 'string', - 'required' => false, - 'example' => 'MzJiMDI5MDliODc0MTlkYmI0ZDhlYmExYjczYTIyZTE3Zm********', - ], + 'schema' => ['description' => 'EAS Token', 'type' => 'string', 'required' => false, 'example' => 'MzJiMDI5MDliODc0MTlkYmI0ZDhlYmExYjczYTIyZTE3Zm********'], ], [ 'name' => 'ModelCallName', 'in' => 'query', - 'schema' => [ - 'description' => 'OpenAI API接口中 模型名 参数', - 'type' => 'string', - 'required' => false, - 'example' => 'demo', - ], - ], - [ - 'name' => 'Description', - 'in' => 'query', - 'schema' => [ - 'description' => '型号描述。', - 'type' => 'string', - 'required' => false, - 'example' => 'vllm==0.9.0', - ], - ], - [ - 'name' => 'ModelInstanceId', - 'in' => 'query', - 'schema' => [ - 'description' => '模型实例Id', - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - 'example' => '123', - ], + 'schema' => ['description' => 'OpenAI API接口中 模型名 参数', 'type' => 'string', 'required' => false, 'example' => 'demo'], ], [ 'name' => 'WorkspaceId', 'in' => 'query', - 'schema' => [ - 'description' => '工作空间ID', - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - 'example' => '608226', - ], + 'schema' => ['description' => '工作空间Id', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '643168'], ], ], 'responses' => [ @@ -571,55 +609,40 @@ 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '结果码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'HttpStatusCode' => [ - 'description' => 'HTTP状态码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '如有错误,返回错误信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '操作是否成功。true表示成功,false表示失败。', - 'type' => 'boolean', - 'example' => 'True', - ], - 'ModelInstanceId' => [ - 'description' => '模型实例Id', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1', - ], + 'Code' => ['description' => '状态码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'HttpStatusCode' => ['description' => 'HTTP状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '如有错误,返回错误信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****F68692'], + 'Success' => ['description' => '操作是否成功。true表示成功,false表示失败。', 'type' => 'boolean', 'example' => 'True'], + 'ModelInstanceId' => ['description' => '模型实例ID', 'type' => 'integer', 'format' => 'int64', 'example' => '1'], ], ], ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true,\\n \\"ModelInstanceId\\": 1\\n}","type":"json"}]', - 'title' => '更新模型实例', - ], - 'ListModelInstance' => [ - 'summary' => '查询模型实例列表。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****F68692\\",\\n \\"Success\\": true,\\n \\"ModelInstanceId\\": 1\\n}","type":"json"}]', + 'title' => '创建模型实例', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:CreateModelInstance', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'CreatePolicy' => [ + 'summary' => '创建检测策略', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -630,140 +653,297 @@ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], ], 'parameters' => [ [ 'name' => 'RegionId', 'in' => 'query', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'cn-shanghai', - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], ], [ - 'name' => 'PageNumber', + 'name' => 'PolicyName', 'in' => 'query', - 'schema' => [ - 'description' => '页码,和请求中的PageNumber一致。', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '1', - ], + 'schema' => ['description' => '检测策略名称。', 'type' => 'string', 'required' => false, 'example' => '测试策略'], ], [ - 'name' => 'PageSize', + 'name' => 'HarmfulCategoryConfigInfoList', 'in' => 'query', + 'style' => 'json', 'schema' => [ - 'description' => '分页大小,每页最多显示的返回结果数量。', - 'type' => 'integer', - 'format' => 'int32', + 'description' => '有害分类配置列表', + 'type' => 'array', + 'items' => [ + 'description' => '有害分类配置对象', + 'type' => 'object', + 'properties' => [ + 'CategoryId' => ['description' => '有害分类ID', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '1'], + 'InputOutputType' => ['description' => '模型输入输出类型'."\n" + .'0:输入'."\n" + .'1:输出', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '0'], + 'CategoryType' => ['description' => '0:文本'."\n" + .'1:图像', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '0'], + 'CategoryLabel' => ['description' => '分类名称', 'type' => 'string', 'required' => false, 'example' => '伦理道德'], + 'IsEnabled' => ['description' => '是否开启'."\n" + .'0:未开启'."\n" + .'1:已开启', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '0'], + ], + 'required' => false, + ], 'required' => false, - 'example' => '10', ], ], [ - 'name' => 'EasServiceName', + 'name' => 'WordGroupInfoList', 'in' => 'query', + 'style' => 'json', 'schema' => [ - 'description' => 'EAS服务名称。', - 'type' => 'string', + 'description' => '关键词分组对象列表', + 'type' => 'array', + 'items' => [ + 'description' => '关键词分组对象', + 'type' => 'object', + 'properties' => [ + 'GroupId' => ['description' => '关键词分组ID。', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '1'], + 'InputOutputType' => ['description' => '模型输入输出类型'."\n" + .'0:输入'."\n" + .'1:输出', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '0'], + 'GroupName' => ['description' => '关键词组名称', 'type' => 'string', 'required' => false, 'example' => '测试分组'], + ], + 'required' => false, + ], 'required' => false, - 'example' => 'rai_content_detection_model', ], ], [ - 'name' => 'ModelSource', + 'name' => 'PromptAttackInfo', 'in' => 'query', + 'style' => 'json', 'schema' => [ - 'description' => '模型来源:1-PAI,2-其他', - 'type' => 'string', + 'description' => '提示词攻击检测结果对象', + 'type' => 'object', + 'properties' => [ + 'IsEnabled' => ['description' => '提示词攻击配置开关'."\n" + .'0:关闭'."\n" + .'1:打开', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1'], + ], 'required' => false, - 'example' => '1', ], ], [ - 'name' => 'IsSupportContentSafe', + 'name' => 'PromptAttackInfoList', 'in' => 'query', + 'style' => 'json', 'schema' => [ - 'description' => '是否支持内容安全', - 'type' => 'integer', - 'format' => 'int32', + 'description' => '提示词攻击列表', + 'type' => 'array', + 'items' => [ + 'description' => '提示词攻击列表', + 'type' => 'object', + 'properties' => [ + 'CategoryId' => ['description' => '有害分类ID', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '1'], + 'CategoryLabel' => ['description' => '分类名称', 'type' => 'string', 'required' => false, 'example' => '角色扮演'], + 'IsEnabled' => ['description' => '提示词攻击配置开关'."\n" + .'0:关闭'."\n" + .'1:打开', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1'], + ], + 'required' => false, + ], 'required' => false, - 'example' => 'True', ], ], [ - 'name' => 'IsSupportPromptAttack', + 'name' => 'TopicConfigInfoList', 'in' => 'query', + 'style' => 'json', 'schema' => [ - 'description' => '是否支持提示词攻击检测', - 'type' => 'integer', - 'format' => 'int32', + 'description' => '敏感主题列表', + 'type' => 'array', + 'items' => [ + 'description' => '敏感主题列表', + 'type' => 'object', + 'properties' => [ + 'TopicId' => ['description' => '敏感主题Id', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '4'], + 'InputOutputType' => ['description' => '模型输入输出类型'."\n" + .'0:输入'."\n" + .'1:输出', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '0'], + 'CategoryType' => ['description' => '0:文本'."\n" + .'1:图像', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '0'], + 'TopicName' => ['description' => '主题名称', 'type' => 'string', 'required' => false, 'example' => '业务敏感'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1'], + ], + 'required' => false, + ], 'required' => false, - 'example' => 'False', ], ], [ - 'name' => 'IsSupportSensitiveTopic', + 'name' => 'WorkspaceId', 'in' => 'query', - 'schema' => [ - 'description' => '是否支持敏感主题检测', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => 'True', - ], + 'schema' => ['description' => '工作空间ID', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '608226'], + ], + [ + 'name' => 'EnableSensitiveInputCheck', + 'in' => 'query', + 'schema' => ['type' => 'integer', 'format' => 'int32', 'required' => false, 'description' => ''], + ], + [ + 'name' => 'EnableSensitiveOutputCheck', + 'in' => 'query', + 'schema' => ['type' => 'integer', 'format' => 'int32', 'required' => false, 'description' => ''], + ], + [ + 'name' => 'SceneType', + 'in' => 'query', + 'schema' => ['type' => 'integer', 'format' => 'int32', 'required' => false, 'description' => ''], + ], + [ + 'name' => 'InputSafeAnswer', + 'in' => 'query', + 'schema' => ['type' => 'string', 'required' => false, 'description' => ''], + ], + [ + 'name' => 'OutputSafeAnswer', + 'in' => 'query', + 'schema' => ['type' => 'string', 'required' => false, 'description' => ''], + ], + [ + 'name' => 'InputSafeAnswerSwitch', + 'in' => 'query', + 'schema' => ['type' => 'integer', 'format' => 'int32', 'required' => false, 'description' => ''], + ], + [ + 'name' => 'OutputSafeAnswerSwitch', + 'in' => 'query', + 'schema' => ['type' => 'integer', 'format' => 'int32', 'required' => false, 'description' => ''], ], [ 'name' => 'IsSidecarPolicy', 'in' => 'query', + 'schema' => ['type' => 'integer', 'format' => 'int32', 'required' => false, 'description' => ''], + ], + [ + 'name' => 'ContentSafeModelInstanceId', + 'in' => 'query', + 'schema' => ['type' => 'integer', 'format' => 'int64', 'required' => false, 'description' => ''], + ], + [ + 'name' => 'PromptAttackModelInstanceId', + 'in' => 'query', + 'schema' => ['type' => 'integer', 'format' => 'int64', 'required' => false, 'description' => ''], + ], + [ + 'name' => 'SensitiveTopicModelInstanceId', + 'in' => 'query', + 'schema' => ['type' => 'integer', 'format' => 'int64', 'required' => false, 'description' => ''], + ], + [ + 'name' => 'SensitiveWordList', + 'in' => 'query', + 'style' => 'json', 'schema' => [ - 'description' => '策略类型:0-公有云策略;1-sidecar策略', - 'type' => 'integer', - 'format' => 'int32', + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'Word' => ['type' => 'string', 'required' => false, 'description' => ''], + 'Label' => ['type' => 'string', 'required' => false, 'description' => ''], + ], + 'required' => false, + 'description' => '', + ], 'required' => false, - 'example' => '1', + 'description' => '', ], ], [ - 'name' => 'Order', + 'name' => 'SensitiveConfigList', 'in' => 'query', + 'style' => 'json', 'schema' => [ - 'description' => '排序方式。取值范围如下:'."\n" - ."\n" - .'- asc(默认):升序'."\n" - ."\n" - .'- desc:降序', - 'type' => 'string', + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'SensitiveConfigId' => ['type' => 'integer', 'format' => 'int64', 'required' => false, 'description' => ''], + 'ActionType' => ['type' => 'integer', 'format' => 'int32', 'required' => false, 'description' => ''], + 'IsEnabled' => ['type' => 'integer', 'format' => 'int32', 'required' => false, 'description' => ''], + ], + 'required' => false, + 'description' => '', + ], 'required' => false, - 'example' => 'asc', + 'description' => '', ], ], [ - 'name' => 'SortBy', + 'name' => 'RegularExpressList', 'in' => 'query', + 'style' => 'json', 'schema' => [ - 'description' => '排序字段。', - 'type' => 'string', + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'RegularExpressName' => ['type' => 'string', 'required' => false, 'description' => ''], + 'RegularExpress' => ['type' => 'string', 'required' => false, 'description' => ''], + 'ActionType' => ['type' => 'integer', 'format' => 'int32', 'required' => false, 'description' => ''], + ], + 'required' => false, + 'description' => '', + ], 'required' => false, - 'example' => 'GmtModified', + 'description' => '', ], ], [ - 'name' => 'WorkspaceId', + 'name' => 'SensitiveTopicList', 'in' => 'query', + 'style' => 'json', 'schema' => [ - 'description' => '工作空间ID。', - 'type' => 'integer', - 'format' => 'int64', + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'TopicName' => ['type' => 'string', 'required' => false, 'description' => ''], + 'TopicDefinition' => ['type' => 'string', 'required' => false, 'description' => ''], + 'TopicExampleInfoList' => [ + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'Content' => ['type' => 'string', 'required' => false, 'description' => ''], + 'ExampleType' => ['type' => 'integer', 'format' => 'int32', 'required' => false, 'description' => ''], + ], + 'required' => false, + 'description' => '', + ], + 'required' => false, + 'description' => '', + ], + 'SecurityLevel' => ['type' => 'integer', 'format' => 'int32', 'required' => false, 'description' => ''], + 'CategoryType' => ['type' => 'integer', 'format' => 'int32', 'required' => false, 'description' => ''], + ], + 'required' => false, + 'description' => '', + ], 'required' => false, - 'example' => '643168', + 'description' => '', ], ], ], @@ -771,138 +951,151 @@ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => 'Schema of Response', + 'description' => '响应', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '结果码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'PageNumber' => [ - 'description' => '页码,和请求中的PageNumber一致。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'PageSize' => [ - 'description' => '分页大小,每页最多显示的返回结果数量。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '10', - ], - 'TotalCount' => [ - 'description' => '总数量', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'ModelInstanceInfoList' => [ - 'description' => '模型实例对象列表', + 'Code' => ['description' => '状态码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'PolicyId' => ['description' => '策略ID。', 'type' => 'integer', 'format' => 'int64', 'example' => '16'], + 'PolicyIdentifier' => ['description' => '策略标识', 'type' => 'string', 'example' => '2tehcwesh4xx'], + 'HttpStatusCode' => ['description' => 'http状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '如有错误,返回错误信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求ID', 'type' => 'string', 'example' => '74D2A967-2CE0-519B-B623-38D851734EC5'], + 'Success' => ['description' => '操作是否成功。true表示成功,false表示失败。', 'type' => 'boolean', 'example' => 'True'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"PolicyId\\": 16,\\n \\"PolicyIdentifier\\": \\"2tehcwesh4xx\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"74D2A967-2CE0-519B-B623-38D851734EC5\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => '创建检测策略', + 'changeSet' => [ + ['createdAt' => '2025-10-16T03:11:06.000Z', 'description' => '请求参数发生变更'], + ['createdAt' => '2025-08-06T10:35:02.000Z', 'description' => '请求参数发生变更'], + ['createdAt' => '2025-06-12T08:56:27.000Z', 'description' => '请求参数发生变更'], + ], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:CreatePolicy', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + ], + ], + 'CreateTopic' => [ + 'summary' => '创建敏感主题', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'readAndWrite', + 'systemTags' => [ + 'operationType' => 'get', + 'riskType' => 'none', + 'chargeType' => 'paid', + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], + ], + 'parameters' => [ + [ + 'name' => 'RegionId', + 'in' => 'query', + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], + ], + [ + 'name' => 'TopicName', + 'in' => 'query', + 'schema' => ['description' => '需创建的topic的名称。', 'type' => 'string', 'required' => false, 'example' => '业务敏感'], + ], + [ + 'name' => 'TopicDefinition', + 'in' => 'query', + 'schema' => ['description' => '主题定义', 'type' => 'string', 'required' => false, 'example' => '主题的定义描述'], + ], + [ + 'name' => 'WorkspaceId', + 'in' => 'query', + 'schema' => ['description' => '工作空间ID', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '643168'], + ], + [ + 'name' => 'BodyData', + 'in' => 'formData', + 'style' => 'json', + 'schema' => [ + 'description' => '请求对象', + 'type' => 'object', + 'properties' => [ + 'TopicExampleInfoList' => [ + 'description' => '样本示例列表', 'type' => 'array', 'items' => [ - 'description' => '模型实例对象', + 'description' => '样本示例对象', 'type' => 'object', 'properties' => [ - 'ModelInstanceId' => [ - 'description' => '模型实例Id', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '123', - ], - 'EasServiceName' => [ - 'description' => 'EAS服务名称。', - 'type' => 'string', - 'example' => 'torch_rank_v1', - ], - 'ModelSource' => [ - 'description' => '模型来源:1-PAI,2-其他', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'GmtModified' => [ - 'description' => '修改时间。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1749450490000', - ], - 'IsSupportText' => [ - 'description' => '是否支持文本', - 'type' => 'boolean', - 'example' => 'True', - ], - 'IsSupportImage' => [ - 'description' => '是否支持图片', - 'type' => 'boolean', - 'example' => 'False', - ], - 'IsSupportContentSafe' => [ - 'description' => '是否支持内容安全检测', - 'type' => 'integer', - 'format' => 'int32', - 'example' => 'True', - ], - 'IsSupportPromptAttack' => [ - 'description' => '是否支持提示词攻击检测', - 'type' => 'integer', - 'format' => 'int32', - 'example' => 'False', - ], - 'IsSupportSensitiveTopic' => [ - 'description' => '是否支持敏感主题检测', - 'type' => 'integer', - 'format' => 'int32', - 'example' => 'True', - ], - 'WorkspaceId' => [ - 'description' => '工作空间ID。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '608226', - ], + 'Content' => ['description' => '黑样本或者白样本示例描述', 'type' => 'string', 'required' => false, 'example' => '食品安全要重视'], + 'ExampleType' => ['description' => '样本示例类型'."\n" + .'0: 白样本'."\n" + .'1: 黑样本', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1'], ], + 'required' => false, ], - ], - 'HttpStatusCode' => [ - 'description' => 'http状态码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '如有错误,返回错误信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '操作是否成功。true表示成功,false表示失败。', - 'type' => 'boolean', - 'example' => 'True', + 'required' => false, ], ], + 'required' => false, ], ], ], - 'errorCodes' => [], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"PageNumber\\": 1,\\n \\"PageSize\\": 10,\\n \\"TotalCount\\": 1,\\n \\"ModelInstanceInfoList\\": [\\n {\\n \\"ModelInstanceId\\": 123,\\n \\"EasServiceName\\": \\"torch_rank_v1\\",\\n \\"ModelSource\\": 1,\\n \\"GmtModified\\": 1749450490000,\\n \\"IsSupportText\\": true,\\n \\"IsSupportImage\\": true,\\n \\"IsSupportContentSafe\\": 0,\\n \\"IsSupportPromptAttack\\": 0,\\n \\"IsSupportSensitiveTopic\\": 0,\\n \\"WorkspaceId\\": 608226\\n }\\n ],\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => '查询模型实例列表', - ], - 'GetModelInstanceInfo' => [ - 'summary' => '获取模型实例信息。', - 'methods' => [ - 'post', - 'get', + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => '响应对象', + 'type' => 'object', + 'properties' => [ + 'Code' => ['description' => '状态码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'HttpStatusCode' => ['description' => 'HTTP状态码。'."\n", 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '如有错误,返回错误信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求标识', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '操作是否成功。true表示成功,false表示失败。', 'type' => 'boolean', 'example' => 'True'], + 'TopicId' => ['description' => '调用成功时,返回新建的敏感主题Id', 'type' => 'integer', 'format' => 'int64', 'example' => '217'], + ], + ], + ], ], - 'schemes' => [ - 'https', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true,\\n \\"TopicId\\": 217\\n}","type":"json"}]', + 'title' => '创建敏感主题', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:CreateTopic', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'CreateWordGroup' => [ + 'summary' => '创建关键词策略', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -913,228 +1106,113 @@ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], ], 'parameters' => [ [ - 'name' => 'ModelInstanceId', + 'name' => 'RegionId', 'in' => 'query', - 'schema' => [ - 'description' => '模型实例Id', - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - 'example' => '123', - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], ], [ - 'name' => 'SceneType', + 'name' => 'GroupName', 'in' => 'query', - 'schema' => [ - 'description' => '场景类型, 0:输入,1:输出,2:输入+输出', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '2', - ], + 'schema' => ['description' => '关键词组名称', 'type' => 'string', 'required' => false, 'example' => '测试分组'], ], - ], - 'responses' => [ - 200 => [ + [ + 'name' => 'Commit', + 'in' => 'query', + 'schema' => ['description' => '是否提交。'."\n" + .'false:不实际保存,仅检查'."\n" + .'true:提交保存', 'type' => 'boolean', 'required' => false, 'example' => 'true'], + ], + [ + 'name' => 'WorkspaceId', + 'in' => 'query', + 'schema' => ['description' => '工作空间ID', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '643168'], + ], + [ + 'name' => 'BodyData', + 'in' => 'formData', + 'style' => 'json', 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', + 'description' => '请求对象', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '状态码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'HarmfulCategoryConfigInfoList' => [ - 'description' => '有害分类配置列表', + 'WordInfoList' => [ + 'description' => '关键词分组列表', 'type' => 'array', 'items' => [ - 'description' => '有害分类配置', + 'description' => '关键词对象', 'type' => 'object', 'properties' => [ - 'CategoryId' => [ - 'description' => '有害分类ID', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1', - ], - 'InputOutputType' => [ - 'description' => '模型输入输出类型'."\n" - .'0:输入'."\n" - .'1:输出', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'CategoryType' => [ - 'description' => '0:文本'."\n" - .'1:图像', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'CategoryLabel' => [ - 'description' => '分类名称', - 'type' => 'string', - 'example' => '伦理道德', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], + 'Word' => ['description' => '关键词', 'type' => 'string', 'required' => false, 'example' => '投资'], + 'Label' => ['description' => '标签', 'type' => 'string', 'required' => false, 'example' => '业务敏感'], ], + 'required' => false, ], + 'required' => false, ], - 'HttpStatusCode' => [ - 'description' => 'http状态码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '错误信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '操作是否成功。true表示成功,false表示失败。', - 'type' => 'boolean', - 'example' => 'True', - ], - 'GmtModified' => [ - 'description' => '策略修改时间', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1634122349000', - ], - 'PromptAttackInfoList' => [ - 'description' => '提示词攻击对象列表', + ], + 'required' => false, + ], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => '响应', + 'type' => 'object', + 'properties' => [ + 'Code' => ['description' => '状态码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'WordErrorInfoList' => [ + 'description' => '错误信息列表', 'type' => 'array', 'items' => [ - 'description' => '提示词攻击对象', + 'description' => '错误信息', 'type' => 'object', 'properties' => [ - 'CategoryId' => [ - 'description' => '有害分类ID', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1', - ], - 'CategoryLabel' => [ - 'description' => '分类名称', - 'type' => 'string', - 'example' => '角色扮演', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], + 'Index' => ['description' => '错误信息在数组中的位置。', 'type' => 'integer', 'format' => 'int64', 'example' => '1'], + 'Word' => ['description' => '关键词', 'type' => 'string', 'example' => '投资'], + 'Label' => ['description' => '标签', 'type' => 'string', 'example' => '业务敏感'], + 'ErrorStatus' => ['description' => '错误状态信息。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'ErrorMessage' => ['description' => '错误信息描述', 'type' => 'string', 'example' => '关键词不能为空'], ], ], ], - 'ModelInstanceId' => [ - 'description' => '模型实例Id', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '123', - ], - 'EasServiceName' => [ - 'description' => 'EAS服务名称。', - 'type' => 'string', - 'example' => 'rai_content_detection_model', - ], - 'EasServiceId' => [ - 'description' => 'EAS 服务Id', - 'type' => 'string', - 'example' => 'eas-m-12345678', - ], - 'ModelSource' => [ - 'description' => '模型来源:1-PAI,2-其他', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'IsSupportText' => [ - 'description' => '是否支持文本', - 'type' => 'boolean', - 'example' => 'True', - ], - 'IsSupportImage' => [ - 'description' => '是否支持图片', - 'type' => 'boolean', - 'example' => 'False', - ], - 'ModelUrl' => [ - 'description' => 'EAS 公网调用地址', - 'type' => 'string', - 'example' => 'http://12345*****.cn-shanghai.aliyuncs.com/api/predict/echo', - ], - 'ModelVpcUrl' => [ - 'description' => 'EAS VPC调用地址', - 'type' => 'string', - 'example' => 'http://12345*****.vpc.cn-shanghai.aliyuncs.com/api/predict/demo', - ], - 'ModelToken' => [ - 'description' => '模型token', - 'type' => 'string', - 'example' => 'MzJiMDI5MDliODc0MTlkYmI0ZDhlYmExYjczYTIyZTE3Zm********', - ], - 'ModelCallName' => [ - 'description' => 'OpenAI API接口中 模型名 参数', - 'type' => 'string', - 'example' => 'demo', - ], - 'Description' => [ - 'description' => '实例描述', - 'type' => 'string', - 'example' => 'opencompass-vllm07-acc', - ], - 'ModelCategoryId' => [ - 'description' => '模型类别Id', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1', - ], + 'HttpStatusCode' => ['description' => 'HTTP状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '如有错误,返回错误信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求ID', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '表示是否调用成功。true:调用成功。 false:调用失败。', 'type' => 'boolean', 'example' => 'True'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"WordErrorInfoList\\": [\\n {\\n \\"Index\\": 1,\\n \\"Word\\": \\"投资\\",\\n \\"Label\\": \\"业务敏感\\",\\n \\"ErrorStatus\\": 1,\\n \\"ErrorMessage\\": \\"关键词不能为空\\"\\n }\\n ],\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => '创建关键词策略', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:CreateWordGroup', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"HarmfulCategoryConfigInfoList\\": [\\n {\\n \\"CategoryId\\": 1,\\n \\"InputOutputType\\": 0,\\n \\"CategoryType\\": 0,\\n \\"CategoryLabel\\": \\"伦理道德\\",\\n \\"SecurityLevel\\": 1\\n }\\n ],\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true,\\n \\"GmtModified\\": 1634122349000,\\n \\"PromptAttackInfoList\\": [\\n {\\n \\"CategoryId\\": 1,\\n \\"CategoryLabel\\": \\"角色扮演\\",\\n \\"SecurityLevel\\": 1\\n }\\n ],\\n \\"ModelInstanceId\\": 123,\\n \\"EasServiceName\\": \\"rai_content_detection_model\\",\\n \\"EasServiceId\\": \\"eas-m-12345678\\",\\n \\"ModelSource\\": 1,\\n \\"IsSupportText\\": true,\\n \\"IsSupportImage\\": true,\\n \\"ModelUrl\\": \\"http://12345*****.cn-shanghai.aliyuncs.com/api/predict/echo\\",\\n \\"ModelVpcUrl\\": \\"http://12345*****.vpc.cn-shanghai.aliyuncs.com/api/predict/demo\\",\\n \\"ModelToken\\": \\"MzJiMDI5MDliODc0MTlkYmI0ZDhlYmExYjczYTIyZTE3Zm********\\",\\n \\"ModelCallName\\": \\"demo\\",\\n \\"Description\\": \\"opencompass-vllm07-acc\\",\\n \\"ModelCategoryId\\": 1\\n}","type":"json"}]', - 'title' => '获取模型实例信息', ], 'DeleteModelInstance' => [ 'summary' => '删除模型实例。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', - ], + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -1145,9 +1223,7 @@ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], ], 'parameters' => [ [ @@ -1157,13 +1233,7 @@ 'schema' => [ 'description' => '要删除的实例Id列表', 'type' => 'array', - 'items' => [ - 'description' => '实例Id', - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - 'example' => '123', - ], + 'items' => ['description' => '实例Id', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '123'], 'required' => false, ], ], @@ -1175,49 +1245,39 @@ 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '结果码,200代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'HttpStatusCode' => [ - 'description' => 'HTTP状态码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '错误信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => 'Id of the request', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '操作是否成功。true表示成功,false表示失败。', - 'type' => 'boolean', - 'example' => 'True', - ], + 'Code' => ['description' => '结果码,200代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'HttpStatusCode' => ['description' => 'HTTP状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '错误信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '操作是否成功。true表示成功,false表示失败。', 'type' => 'boolean', 'example' => 'True'], ], ], ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', 'title' => '删除模型实例', - ], - 'ModelInputContentSyncDetect' => [ - 'summary' => '对模型的输入内容进行同步检测,同步获取检测结果', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:DeleteModelInstance', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'DeletePolicy' => [ + 'summary' => '删除检测策略', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -1228,68 +1288,22 @@ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], ], 'parameters' => [ [ 'name' => 'RegionId', 'in' => 'query', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'cn-shanghai', - ], - ], - [ - 'name' => 'SceneName', - 'in' => 'query', - 'schema' => [ - 'description' => '场景名称。', - 'type' => 'string', - 'required' => false, - 'example' => '""', - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], ], [ - 'name' => 'ServiceName', - 'in' => 'query', - 'schema' => [ - 'description' => '服务名称', - 'type' => 'string', - 'required' => false, - 'example' => 'textDetection'."\n" - .'imageDetection', - ], - ], - [ - 'name' => 'PolicyIdentifier', + 'name' => 'PolicyIdList', 'in' => 'query', - 'schema' => [ - 'description' => '策略ID', - 'type' => 'string', - 'required' => false, - 'example' => 'x1bc5xgs4uhx', - ], - ], - [ - 'name' => 'BodyData', - 'in' => 'formData', 'style' => 'json', 'schema' => [ - 'description' => '请求对象', - 'type' => 'object', - 'properties' => [ - 'Content' => [ - 'description' => '1. 要审核的文本内容,最大限制10000个字符。(包括英文和中文)'."\n" - .'2. 或者要审核的图片URL地址', - 'type' => 'string', - 'required' => false, - 'example' => '要检测的内容'."\n", - ], - ], + 'description' => '检测策略ID列表', + 'type' => 'array', + 'items' => ['description' => '检测策略ID', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '1'], 'required' => false, ], ], @@ -1301,340 +1315,39 @@ 'description' => '响应', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '结果码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'TraceInfo' => [ - 'description' => '检查结果', - 'type' => 'object', - 'properties' => [ - 'BlockWord' => [ - 'description' => '检测关键词', - 'type' => 'object', - 'properties' => [ - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'BlockWordGroupInfoList' => [ - 'description' => '关键词检测结果对象列表', - 'type' => 'array', - 'items' => [ - 'description' => '关键词检测结果对象', - 'type' => 'object', - 'properties' => [ - 'GroupName' => [ - 'description' => '关键词组名称', - 'type' => 'string', - 'example' => '测试分组', - ], - 'BlockWordList' => [ - 'description' => '关键词检测结果列表', - 'type' => 'array', - 'items' => [ - 'description' => '关键词检测结果', - 'type' => 'object', - 'properties' => [ - 'Word' => [ - 'description' => '关键词', - 'type' => 'string', - 'example' => '测试关键词', - ], - 'WordLabel' => [ - 'description' => '标签', - 'type' => 'string', - 'example' => '测试标签', - ], - ], - ], - ], - ], - ], - ], - ], - ], - 'HarmfulCategories' => [ - 'description' => '有害分类结果对象列表', - 'type' => 'object', - 'properties' => [ - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'ConfidenceScore' => [ - 'description' => '置信度', - 'type' => 'number', - 'format' => 'double', - 'example' => '0.0', - ], - 'HarmfulCategoryInfoList' => [ - 'description' => '有害分类对象列表', - 'type' => 'array', - 'items' => [ - 'description' => '有害分类检测结果对象', - 'type' => 'object', - 'properties' => [ - 'CategoryType' => [ - 'description' => '0:文本'."\n" - .'1:图像', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'CategoryLabel' => [ - 'description' => '分类名称', - 'type' => 'string', - 'example' => '伦理道德', - ], - 'SubCategoryLabel' => [ - 'description' => '二级分类标签', - 'type' => 'string', - 'example' => '不良行为', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - ], - ], - ], - ], - ], - 'PromptAttack' => [ - 'description' => '提示词攻击信息', - 'type' => 'object', - 'properties' => [ - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'PromptAttackInfo' => [ - 'description' => '提示词攻击检测结果对象', - 'type' => 'string', - 'example' => '角色扮演', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'ConfidenceScore' => [ - 'description' => '置信度', - 'type' => 'number', - 'format' => 'double', - 'example' => '0.0', - ], - 'PromptAttackInfoList' => [ - 'description' => '提示词攻击列表', - 'type' => 'array', - 'items' => [ - 'description' => '提示词攻击对象', - 'type' => 'object', - 'properties' => [ - 'CategoryType' => [ - 'description' => '0:文本'."\n" - .'1:图像', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'CategoryLabel' => [ - 'description' => '分类名称', - 'type' => 'string', - 'example' => '角色扮演', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - ], - ], - ], - ], - ], - 'DenyTopics' => [ - 'description' => '敏感主题对象列表', - 'type' => 'object', - 'properties' => [ - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'ConfidenceScore' => [ - 'description' => '置信度', - 'type' => 'number', - 'format' => 'double', - 'example' => '0.0', - ], - 'TopicInfoList' => [ - 'description' => '敏感主题列表', - 'type' => 'array', - 'items' => [ - 'description' => '敏感主题列表', - 'type' => 'object', - 'properties' => [ - 'CategoryType' => [ - 'description' => '0:文本'."\n" - .'1:图像', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'TopicName' => [ - 'description' => '主题名称', - 'type' => 'string', - 'example' => '业务敏感', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - ], - ], - ], - ], - ], - 'SensitiveType' => [ - 'type' => 'object', - 'properties' => [ - 'RiskResult' => [ - 'type' => 'integer', - 'format' => 'int32', - ], - 'MaskedContent' => [ - 'type' => 'string', - ], - 'SensitiveTypeInfoList' => [ - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'SensitiveTypeName' => [ - 'type' => 'string', - ], - 'SensitiveCategory' => [ - 'type' => 'integer', - 'format' => 'int32', - ], - 'SensitiveContent' => [ - 'type' => 'string', - ], - 'MaskedContent' => [ - 'type' => 'string', - ], - 'ActionType' => [ - 'type' => 'integer', - 'format' => 'int32', - ], - ], - ], - ], - ], - ], - ], - ], - 'HttpStatusCode' => [ - 'description' => 'Http状态码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '错误信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求ID', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '操作是否成功。true表示成功,false表示失败。', - 'type' => 'boolean', - 'example' => 'True', - ], - 'SafeAnswer' => [ - 'type' => 'string', - ], + 'Code' => ['description' => '状态码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'HttpStatusCode' => ['description' => '错误码描述', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '错误信息', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求ID', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '操作是否成功。true表示成功,false表示失败。', 'type' => 'boolean', 'example' => 'True'], ], ], ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"RiskResult\\": 0,\\n \\"TraceInfo\\": {\\n \\"BlockWord\\": {\\n \\"RiskResult\\": 0,\\n \\"BlockWordGroupInfoList\\": [\\n {\\n \\"GroupName\\": \\"测试分组\\",\\n \\"BlockWordList\\": [\\n {\\n \\"Word\\": \\"测试关键词\\",\\n \\"WordLabel\\": \\"测试标签\\"\\n }\\n ]\\n }\\n ]\\n },\\n \\"HarmfulCategories\\": {\\n \\"RiskResult\\": 0,\\n \\"ConfidenceScore\\": 0,\\n \\"HarmfulCategoryInfoList\\": [\\n {\\n \\"CategoryType\\": 0,\\n \\"CategoryLabel\\": \\"伦理道德\\",\\n \\"SubCategoryLabel\\": \\"不良行为\\",\\n \\"SecurityLevel\\": 1,\\n \\"RiskResult\\": 0\\n }\\n ]\\n },\\n \\"PromptAttack\\": {\\n \\"RiskResult\\": 0,\\n \\"PromptAttackInfo\\": \\"角色扮演\\",\\n \\"SecurityLevel\\": 1,\\n \\"ConfidenceScore\\": 0,\\n \\"PromptAttackInfoList\\": [\\n {\\n \\"CategoryType\\": 0,\\n \\"CategoryLabel\\": \\"角色扮演\\",\\n \\"SecurityLevel\\": 1,\\n \\"RiskResult\\": 0\\n }\\n ]\\n },\\n \\"DenyTopics\\": {\\n \\"RiskResult\\": 1,\\n \\"ConfidenceScore\\": 0,\\n \\"TopicInfoList\\": [\\n {\\n \\"CategoryType\\": 0,\\n \\"TopicName\\": \\"业务敏感\\",\\n \\"SecurityLevel\\": 0,\\n \\"RiskResult\\": 0\\n }\\n ]\\n },\\n \\"SensitiveType\\": {\\n \\"RiskResult\\": 0,\\n \\"MaskedContent\\": \\"\\",\\n \\"SensitiveTypeInfoList\\": [\\n {\\n \\"SensitiveTypeName\\": \\"\\",\\n \\"SensitiveCategory\\": 0,\\n \\"SensitiveContent\\": \\"\\",\\n \\"MaskedContent\\": \\"\\",\\n \\"ActionType\\": 0\\n }\\n ]\\n }\\n },\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true,\\n \\"SafeAnswer\\": \\"\\"\\n}","type":"json"}]', - 'title' => '模型输入内容同步检测', - ], - 'ModelOutputContentSyncDetect' => [ - 'summary' => '对模型的输出内容进行同步检测,同步获取检测结果', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => '删除检测策略', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:DeletePolicy', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'DeleteTopic' => [ + 'summary' => '删除敏感主题', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -1645,68 +1358,22 @@ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], ], 'parameters' => [ [ 'name' => 'RegionId', 'in' => 'query', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'cn-shanghai', - ], - ], - [ - 'name' => 'SceneName', - 'in' => 'query', - 'schema' => [ - 'description' => '场景名称。', - 'type' => 'string', - 'required' => false, - 'example' => '""', - ], - ], - [ - 'name' => 'ServiceName', - 'in' => 'query', - 'schema' => [ - 'description' => '服务名称', - 'type' => 'string', - 'required' => false, - 'example' => 'textDetection'."\n" - .'imageDetection', - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], ], [ - 'name' => 'PolicyIdentifier', + 'name' => 'TopicIdList', 'in' => 'query', - 'schema' => [ - 'description' => '策略ID', - 'type' => 'string', - 'required' => false, - 'example' => 'x1bc5xgs4uhx', - ], - ], - [ - 'name' => 'BodyData', - 'in' => 'formData', 'style' => 'json', 'schema' => [ - 'description' => '请求对象', - 'type' => 'object', - 'properties' => [ - 'Content' => [ - 'description' => '1. 要审核的文本内容,最大限制10000个字符。(包括英文和中文)'."\n" - .'2. 或者要审核的图片URL地址', - 'type' => 'string', - 'required' => false, - 'example' => '要检测的内容', - ], - ], + 'description' => '要删除的敏感主题Id列表', + 'type' => 'array', + 'items' => ['description' => '敏感主题Id', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '216'], 'required' => false, ], ], @@ -1715,348 +1382,42 @@ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => '响应', + 'description' => '响应对象', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '状态码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'RiskInfo' => [ - 'description' => '风险标签,如有多个逗号分割', - 'type' => 'string', - 'example' => '“”', - ], - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'TraceInfo' => [ - 'description' => '检查结果', - 'type' => 'object', - 'properties' => [ - 'BlockWord' => [ - 'description' => '检测关键词', - 'type' => 'object', - 'properties' => [ - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'BlockWordGroupInfoList' => [ - 'description' => '关键词检测结果对象列表', - 'type' => 'array', - 'items' => [ - 'description' => '关键词检测结果对象', - 'type' => 'object', - 'properties' => [ - 'GroupName' => [ - 'description' => '关键词组名称', - 'type' => 'string', - 'example' => '测试分组', - ], - 'BlockWordList' => [ - 'description' => '关键词检测结果对象列表', - 'type' => 'array', - 'items' => [ - 'description' => '关键词检测结果列表', - 'type' => 'object', - 'properties' => [ - 'Word' => [ - 'description' => '关键词', - 'type' => 'string', - 'example' => '测试关键词', - ], - 'WordLabel' => [ - 'description' => '标签', - 'type' => 'string', - 'example' => '测试标签', - ], - ], - ], - ], - ], - ], - ], - ], - ], - 'HarmfulCategories' => [ - 'description' => '有害分类结果对象列表', - 'type' => 'object', - 'properties' => [ - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'ConfidenceScore' => [ - 'description' => '置信度', - 'type' => 'number', - 'format' => 'double', - 'example' => '0.0', - ], - 'HarmfulCategoryInfoList' => [ - 'description' => '有害分类对象列表', - 'type' => 'array', - 'items' => [ - 'description' => '有害分类对象列表', - 'type' => 'object', - 'properties' => [ - 'CategoryType' => [ - 'description' => '0:文本'."\n" - .'1:图像', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'CategoryLabel' => [ - 'description' => '分类名称', - 'type' => 'string', - 'example' => '伦理道德', - ], - 'SubCategoryLabel' => [ - 'description' => '二级分类标签', - 'type' => 'string', - 'example' => '不良行为', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - ], - ], - ], - ], - ], - 'PromptAttack' => [ - 'description' => '提示词攻击信息', - 'type' => 'object', - 'properties' => [ - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'PromptAttackInfo' => [ - 'description' => '提示词攻击检测结果对象', - 'type' => 'string', - 'example' => '角色扮演', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'ConfidenceScore' => [ - 'description' => '置信度', - 'type' => 'number', - 'format' => 'double', - 'example' => '0.0', - ], - 'PromptAttackInfoList' => [ - 'description' => '提示词攻击列表', - 'type' => 'array', - 'items' => [ - 'description' => '提示词攻击列表', - 'type' => 'object', - 'properties' => [ - 'CategoryType' => [ - 'description' => '0:文本'."\n" - .'1:图像', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'CategoryLabel' => [ - 'description' => '分类名称', - 'type' => 'string', - 'example' => '角色扮演', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - ], - ], - ], - ], - ], - 'DenyTopics' => [ - 'description' => '敏感主题对象列表', - 'type' => 'object', - 'properties' => [ - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'ConfidenceScore' => [ - 'description' => '置信度', - 'type' => 'number', - 'format' => 'double', - 'example' => '0.0', - ], - 'TopicInfoList' => [ - 'description' => '敏感主题列表', - 'type' => 'array', - 'items' => [ - 'description' => '敏感主题列表', - 'type' => 'object', - 'properties' => [ - 'CategoryType' => [ - 'description' => '0:文本'."\n" - .'1:图像', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'TopicName' => [ - 'description' => '主题名称', - 'type' => 'string', - 'example' => '业务敏感', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - ], - ], - ], - ], - ], - 'SensitiveType' => [ - 'type' => 'object', - 'properties' => [ - 'RiskResult' => [ - 'type' => 'integer', - 'format' => 'int32', - ], - 'MaskedContent' => [ - 'type' => 'string', - ], - 'SensitiveTypeInfoList' => [ - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'SensitiveTypeName' => [ - 'type' => 'string', - ], - 'SensitiveCategory' => [ - 'type' => 'integer', - 'format' => 'int32', - ], - 'SensitiveContent' => [ - 'type' => 'string', - ], - 'MaskedContent' => [ - 'type' => 'string', - ], - 'ActionType' => [ - 'type' => 'integer', - 'format' => 'int32', - ], - ], - ], - ], - ], - ], - ], - ], - 'HttpStatusCode' => [ - 'description' => 'HTTP状态码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '错误信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求ID', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '操作是否成功。true表示成功,false表示失败。', - 'type' => 'boolean', - 'example' => 'True', - ], - 'SafeAnswer' => [ - 'type' => 'string', - ], + 'Code' => ['description' => '状态码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'HttpStatusCode' => ['description' => 'HTTP状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '错误信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求标识', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '操作是否成功。true表示成功,false表示失败。', 'type' => 'boolean', 'example' => 'True'], ], ], ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"RiskInfo\\": \\"“”\\",\\n \\"RiskResult\\": 0,\\n \\"TraceInfo\\": {\\n \\"BlockWord\\": {\\n \\"RiskResult\\": 0,\\n \\"BlockWordGroupInfoList\\": [\\n {\\n \\"GroupName\\": \\"测试分组\\",\\n \\"BlockWordList\\": [\\n {\\n \\"Word\\": \\"测试关键词\\",\\n \\"WordLabel\\": \\"测试标签\\"\\n }\\n ]\\n }\\n ]\\n },\\n \\"HarmfulCategories\\": {\\n \\"RiskResult\\": 0,\\n \\"ConfidenceScore\\": 0,\\n \\"HarmfulCategoryInfoList\\": [\\n {\\n \\"CategoryType\\": 0,\\n \\"CategoryLabel\\": \\"伦理道德\\",\\n \\"SubCategoryLabel\\": \\"不良行为\\",\\n \\"SecurityLevel\\": 1,\\n \\"RiskResult\\": 0\\n }\\n ]\\n },\\n \\"PromptAttack\\": {\\n \\"RiskResult\\": 0,\\n \\"PromptAttackInfo\\": \\"角色扮演\\",\\n \\"SecurityLevel\\": 0,\\n \\"ConfidenceScore\\": 0,\\n \\"PromptAttackInfoList\\": [\\n {\\n \\"CategoryType\\": 0,\\n \\"CategoryLabel\\": \\"角色扮演\\",\\n \\"SecurityLevel\\": 0,\\n \\"RiskResult\\": 1\\n }\\n ]\\n },\\n \\"DenyTopics\\": {\\n \\"RiskResult\\": 0,\\n \\"ConfidenceScore\\": 0,\\n \\"TopicInfoList\\": [\\n {\\n \\"CategoryType\\": 0,\\n \\"TopicName\\": \\"业务敏感\\",\\n \\"SecurityLevel\\": 0,\\n \\"RiskResult\\": 1\\n }\\n ]\\n },\\n \\"SensitiveType\\": {\\n \\"RiskResult\\": 0,\\n \\"MaskedContent\\": \\"\\",\\n \\"SensitiveTypeInfoList\\": [\\n {\\n \\"SensitiveTypeName\\": \\"\\",\\n \\"SensitiveCategory\\": 0,\\n \\"SensitiveContent\\": \\"\\",\\n \\"MaskedContent\\": \\"\\",\\n \\"ActionType\\": 0\\n }\\n ]\\n }\\n },\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true,\\n \\"SafeAnswer\\": \\"\\"\\n}","type":"json"}]', - 'title' => '模型输出内容同步检测', - ], - 'ModelInputContentAsyncDetect' => [ - 'summary' => '对模型的输入内容进行异步检测,通过任务标识异步获取检测结果', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => '删除敏感主题', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:DeleteTopic', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'DeleteWordGroup' => [ + 'summary' => '删除关键词策略。', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -2067,68 +1428,22 @@ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], ], 'parameters' => [ [ 'name' => 'RegionId', 'in' => 'query', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'cn-shanghai', - ], - ], - [ - 'name' => 'SceneName', - 'in' => 'query', - 'schema' => [ - 'description' => '场景名称。', - 'type' => 'string', - 'required' => false, - 'example' => '""', - ], - ], - [ - 'name' => 'ServiceName', - 'in' => 'query', - 'schema' => [ - 'description' => '服务名称', - 'type' => 'string', - 'required' => false, - 'example' => 'textDetection'."\n" - .'imageDetection', - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], ], [ - 'name' => 'PolicyIdentifier', + 'name' => 'GroupIdList', 'in' => 'query', - 'schema' => [ - 'description' => '策略ID', - 'type' => 'string', - 'required' => false, - 'example' => 'x1bc5xgs4uhx', - ], - ], - [ - 'name' => 'BodyData', - 'in' => 'formData', 'style' => 'json', 'schema' => [ - 'description' => '请求对象', - 'type' => 'object', - 'properties' => [ - 'Content' => [ - 'description' => '1. 要审核的文本内容,最大限制10000个字符。(包括英文和中文)'."\n" - .'2. 或者要审核的图片URL地址', - 'type' => 'string', - 'required' => false, - 'example' => '要检测的内容', - ], - ], + 'description' => '关键词策略ID列表。', + 'type' => 'array', + 'items' => ['description' => '关键词策略ID。', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '1'], 'required' => false, ], ], @@ -2137,57 +1452,44 @@ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => '响应', + 'description' => '响应。', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '结果码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'TaskId' => [ - 'description' => '任务ID。', - 'type' => 'string', - 'example' => '5d85cd38-03b2-49fd-86b2-be85c4b13215', - ], - 'HttpStatusCode' => [ - 'description' => 'http状态码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '错误信息', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求ID', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '操作是否成功。true表示成功,false表示失败。', - 'type' => 'boolean', - 'example' => 'True', - ], + 'Code' => ['description' => '结果码,200代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'HttpStatusCode' => ['description' => 'HTTP状态码。', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '如有错误,返回错误信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求ID。', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '操作是否成功,可能值:'."\n" + .'- True表示成功。'."\n" + .'- False表示失败。', 'type' => 'boolean', 'example' => 'True'], ], ], ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"TaskId\\": \\"5d85cd38-03b2-49fd-86b2-be85c4b13215\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => '模型输入内容异步检测', - ], - 'ModelOutputContentAsyncDetect' => [ - 'summary' => '对模型的输出内容进行异步检测,通过任务标识异步获取检测结果', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => '删除关键词策略', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:DeleteWordGroup', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'GetContentDetectResult' => [ + 'summary' => '查询异步检测结果。', + 'methods' => ['get', 'post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -2198,70 +1500,18 @@ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], ], 'parameters' => [ [ 'name' => 'RegionId', 'in' => 'query', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'cn-shanghai', - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], ], [ - 'name' => 'SceneName', - 'in' => 'query', - 'schema' => [ - 'description' => '场景名称。', - 'type' => 'string', - 'required' => false, - 'example' => '""', - ], - ], - [ - 'name' => 'ServiceName', - 'in' => 'query', - 'schema' => [ - 'description' => '服务名称', - 'type' => 'string', - 'required' => false, - 'example' => 'textDetection'."\n" - .'imageDetection', - ], - ], - [ - 'name' => 'PolicyIdentifier', + 'name' => 'TaskId', 'in' => 'query', - 'schema' => [ - 'description' => '策略ID', - 'type' => 'string', - 'required' => false, - 'example' => 'x1bc5xgs4uhx', - ], - ], - [ - 'name' => 'BodyData', - 'in' => 'formData', - 'style' => 'json', - 'schema' => [ - 'description' => '请求对象', - 'type' => 'object', - 'properties' => [ - 'Content' => [ - 'description' => '1. 要审核的文本内容,最大限制10000个字符。(包括英文和中文)'."\n" - .'2. 或者要审核的图片URL地址', - 'type' => 'string', - 'required' => false, - 'example' => '要检测的内容', - ], - ], - 'required' => false, - ], + 'schema' => ['description' => '任务ID。', 'type' => 'string', 'required' => false, 'example' => '5d85cd38-03b2-49fd-86b2-be85c4b13215'], ], ], 'responses' => [ @@ -2271,54 +1521,70 @@ 'description' => '响应', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '状态码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'TaskId' => [ - 'description' => '任务ID。', - 'type' => 'string', - 'example' => '5d85cd38-03b2-49fd-86b2-be85c4b13215', - ], - 'HttpStatusCode' => [ - 'description' => 'http状态码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '错误信息', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求ID', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '操作是否成功。true表示成功,false表示失败。', - 'type' => 'boolean', - 'example' => 'True', + 'Code' => ['description' => '状态码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'Data' => [ + 'description' => '响应数据', + 'type' => 'object', + 'properties' => [ + 'DetectResultList' => [ + 'description' => '检测结果列表', + 'type' => 'array', + 'items' => [ + 'description' => '检测结果对象', + 'type' => 'object', + 'properties' => [ + 'RiskInfo' => ['description' => '风险标签,如有多个逗号分割', 'type' => 'string', 'example' => '色情'], + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'Status' => ['description' => '0:排队中'."\n" + .'1: 处理中'."\n" + .'2:处理完成'."\n" + .'3:处理失败', 'type' => 'integer', 'format' => 'int32', 'example' => '2'], + ], + ], + ], + 'ProcessedCount' => ['description' => '任务已处理条数。', 'type' => 'integer', 'format' => 'int32', 'example' => '10'], + 'TaskId' => ['description' => '异步任务Id', 'type' => 'string', 'example' => '任务ID'], + 'TaskStatus' => ['description' => '任务处理状态:'."\n" + .'0:排队中'."\n" + .'1: 处理中'."\n" + .'2:处理完成'."\n" + .'3:处理失败', 'type' => 'integer', 'format' => 'int32', 'example' => '2'], + 'TotalCount' => ['description' => '任务总条数。', 'type' => 'integer', 'format' => 'int32', 'example' => '10'], + ], ], + 'HttpStatusCode' => ['description' => 'http状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '如有错误,返回错误信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求ID', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '操作是否成功。true表示成功,false表示失败。', 'type' => 'boolean', 'example' => 'True'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"Data\\": {\\n \\"DetectResultList\\": [\\n {\\n \\"RiskInfo\\": \\"色情\\",\\n \\"RiskResult\\": 1,\\n \\"Status\\": 2\\n }\\n ],\\n \\"ProcessedCount\\": 10,\\n \\"TaskId\\": \\"任务ID\\",\\n \\"TaskStatus\\": 2,\\n \\"TotalCount\\": 10\\n },\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => '查询异步检测结果', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:GetContentDetectResult', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"TaskId\\": \\"5d85cd38-03b2-49fd-86b2-be85c4b13215\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => '模型输出内容异步检测', ], 'GetModelInputContentDetectResult' => [ 'summary' => '通过任务标识获取模型输入内容异步检测结果', - 'methods' => [ - 'get', - 'post', - ], - 'schemes' => [ - 'https', - ], + 'methods' => ['get', 'post'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -2329,30 +1595,18 @@ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], ], 'parameters' => [ [ 'name' => 'RegionId', 'in' => 'query', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'cn-shanghai', - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], ], [ 'name' => 'TaskId', 'in' => 'query', - 'schema' => [ - 'description' => '任务ID。', - 'type' => 'string', - 'required' => false, - 'example' => '5d85cd38-03b2-49fd-86b2-be85c4b13215', - ], + 'schema' => ['description' => '任务ID。', 'type' => 'string', 'required' => false, 'example' => '5d85cd38-03b2-49fd-86b2-be85c4b13215'], ], ], 'responses' => [ @@ -2362,11 +1616,7 @@ 'description' => '响应', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '状态码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], + 'Code' => ['description' => '状态码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], 'DetectResultList' => [ 'description' => '检测结果对象', 'type' => 'array', @@ -2374,22 +1624,12 @@ 'description' => '检测结果对象', 'type' => 'object', 'properties' => [ - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'Status' => [ - 'description' => '0:排队中'."\n" - .'1: 处理中'."\n" - .'2:处理完成'."\n" - .'3:处理失败', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '2', - ], + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'Status' => ['description' => '0:排队中'."\n" + .'1: 处理中'."\n" + .'2:处理完成'."\n" + .'3:处理失败', 'type' => 'integer', 'format' => 'int32', 'example' => '2'], 'TraceInfo' => [ 'description' => '检查结果', 'type' => 'object', @@ -2398,13 +1638,8 @@ 'description' => '检测关键词', 'type' => 'object', 'properties' => [ - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], 'BlockWordGroupInfoList' => [ 'description' => '关键词检测结果对象列表', 'type' => 'array', @@ -2412,11 +1647,7 @@ 'description' => '关键词检测结果对象', 'type' => 'object', 'properties' => [ - 'GroupName' => [ - 'description' => '关键词组名称', - 'type' => 'string', - 'example' => '测试分组', - ], + 'GroupName' => ['description' => '关键词组名称', 'type' => 'string', 'example' => '测试分组'], 'BlockWordList' => [ 'description' => '关键词检测结果对象列表', 'type' => 'array', @@ -2424,16 +1655,8 @@ 'description' => '关键词检测结果列表', 'type' => 'object', 'properties' => [ - 'Word' => [ - 'description' => '关键词', - 'type' => 'string', - 'example' => '测试关键词', - ], - 'WordLabel' => [ - 'description' => '标签', - 'type' => 'string', - 'example' => '测试标签', - ], + 'Word' => ['description' => '关键词', 'type' => 'string', 'example' => '测试关键词'], + 'WordLabel' => ['description' => '标签', 'type' => 'string', 'example' => '测试标签'], ], ], ], @@ -2446,19 +1669,9 @@ 'description' => '有害分类结果对象列表', 'type' => 'object', 'properties' => [ - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'ConfidenceScore' => [ - 'description' => '置信度', - 'type' => 'number', - 'format' => 'double', - 'example' => '0.0', - ], + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'ConfidenceScore' => ['description' => '置信度', 'type' => 'number', 'format' => 'double', 'example' => '0.0'], 'HarmfulCategoryInfoList' => [ 'description' => '有害分类对象列表', 'type' => 'array', @@ -2466,39 +1679,16 @@ 'description' => '有害分类对象列表', 'type' => 'object', 'properties' => [ - 'CategoryType' => [ - 'description' => '0:文本'."\n" - .'1:图像', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'CategoryLabel' => [ - 'description' => '分类名称', - 'type' => 'string', - 'example' => '伦理道德', - ], - 'SubCategoryLabel' => [ - 'description' => '二级分类标签', - 'type' => 'string', - 'example' => '不良行为', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], + 'CategoryType' => ['description' => '0:文本'."\n" + .'1:图像', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'CategoryLabel' => ['description' => '分类名称', 'type' => 'string', 'example' => '伦理道德'], + 'SubCategoryLabel' => ['description' => '二级分类标签', 'type' => 'string', 'example' => '不良行为'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], ], ], ], @@ -2508,33 +1698,14 @@ 'description' => '提示词攻击信息', 'type' => 'object', 'properties' => [ - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'PromptAttackInfo' => [ - 'description' => '提示词攻击检测结果对象', - 'type' => 'string', - 'example' => '角色扮演', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'ConfidenceScore' => [ - 'description' => '置信度', - 'type' => 'number', - 'format' => 'double', - 'example' => '0.0', - ], + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'PromptAttackInfo' => ['description' => '提示词攻击检测结果对象', 'type' => 'string', 'example' => '角色扮演'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'ConfidenceScore' => ['description' => '置信度', 'type' => 'number', 'format' => 'double', 'example' => '0.0'], 'PromptAttackInfoList' => [ 'description' => '提示词攻击列表', 'type' => 'array', @@ -2542,34 +1713,15 @@ 'description' => '提示词攻击列表', 'type' => 'object', 'properties' => [ - 'CategoryType' => [ - 'description' => '0:文本'."\n" - .'1:图像', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'CategoryLabel' => [ - 'description' => '分类名称', - 'type' => 'string', - 'example' => '角色扮演', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], + 'CategoryType' => ['description' => '0:文本'."\n" + .'1:图像', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'CategoryLabel' => ['description' => '分类名称', 'type' => 'string', 'example' => '角色扮演'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], ], ], ], @@ -2579,19 +1731,9 @@ 'description' => '敏感主题对象列表', 'type' => 'object', 'properties' => [ - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'ConfidenceScore' => [ - 'description' => '置信度', - 'type' => 'number', - 'format' => 'double', - 'example' => '0.0', - ], + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'ConfidenceScore' => ['description' => '置信度', 'type' => 'number', 'format' => 'double', 'example' => '0.0'], 'TopicInfoList' => [ 'description' => '敏感主题列表', 'type' => 'array', @@ -2599,34 +1741,15 @@ 'description' => '敏感主题列表', 'type' => 'object', 'properties' => [ - 'CategoryType' => [ - 'description' => '0:文本'."\n" - .'1:图像', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'TopicName' => [ - 'description' => '主题名称', - 'type' => 'string', - 'example' => '业务敏感', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], + 'CategoryType' => ['description' => '0:文本'."\n" + .'1:图像', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'TopicName' => ['description' => '主题名称', 'type' => 'string', 'example' => '业务敏感'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], ], ], ], @@ -2637,71 +1760,48 @@ ], ], ], - 'ProcessedCount' => [ - 'description' => '任务已处理条数。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'TaskId' => [ - 'description' => '任务ID。', - 'type' => 'string', - 'example' => '5d85cd38-03b2-49fd-86b2-be85c4b13215', - ], - 'TaskStatus' => [ - 'description' => '任务处理状态:'."\n" - .'0:排队中'."\n" - .'1: 处理中'."\n" - .'2:处理完成'."\n" - .'3:处理失败', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '2', - ], - 'TotalCount' => [ - 'description' => '总数量', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'HttpStatusCode' => [ - 'description' => 'http状态码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '错误信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求ID', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '操作是否成功。true表示成功,false表示失败。', - 'type' => 'boolean', - 'example' => 'True', - ], + 'ProcessedCount' => ['description' => '任务已处理条数。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'TaskId' => ['description' => '任务ID。', 'type' => 'string', 'example' => '5d85cd38-03b2-49fd-86b2-be85c4b13215'], + 'TaskStatus' => ['description' => '任务处理状态:'."\n" + .'0:排队中'."\n" + .'1: 处理中'."\n" + .'2:处理完成'."\n" + .'3:处理失败', 'type' => 'integer', 'format' => 'int32', 'example' => '2'], + 'TotalCount' => ['description' => '总数量', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'HttpStatusCode' => ['description' => 'http状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '错误信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求ID', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '操作是否成功。true表示成功,false表示失败。', 'type' => 'boolean', 'example' => 'True'], ], ], ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"DetectResultList\\": [\\n {\\n \\"RiskResult\\": 0,\\n \\"Status\\": 2,\\n \\"TraceInfo\\": {\\n \\"BlockWord\\": {\\n \\"RiskResult\\": 0,\\n \\"BlockWordGroupInfoList\\": [\\n {\\n \\"GroupName\\": \\"测试分组\\",\\n \\"BlockWordList\\": [\\n {\\n \\"Word\\": \\"测试关键词\\",\\n \\"WordLabel\\": \\"测试标签\\"\\n }\\n ]\\n }\\n ]\\n },\\n \\"HarmfulCategories\\": {\\n \\"RiskResult\\": 0,\\n \\"ConfidenceScore\\": 0,\\n \\"HarmfulCategoryInfoList\\": [\\n {\\n \\"CategoryType\\": 0,\\n \\"CategoryLabel\\": \\"伦理道德\\",\\n \\"SubCategoryLabel\\": \\"不良行为\\",\\n \\"SecurityLevel\\": 0,\\n \\"RiskResult\\": 0\\n }\\n ]\\n },\\n \\"PromptAttack\\": {\\n \\"RiskResult\\": 0,\\n \\"PromptAttackInfo\\": \\"角色扮演\\",\\n \\"SecurityLevel\\": 0,\\n \\"ConfidenceScore\\": 0,\\n \\"PromptAttackInfoList\\": [\\n {\\n \\"CategoryType\\": 0,\\n \\"CategoryLabel\\": \\"角色扮演\\",\\n \\"SecurityLevel\\": 0,\\n \\"RiskResult\\": 0\\n }\\n ]\\n },\\n \\"DenyTopics\\": {\\n \\"RiskResult\\": 1,\\n \\"ConfidenceScore\\": 0,\\n \\"TopicInfoList\\": [\\n {\\n \\"CategoryType\\": 0,\\n \\"TopicName\\": \\"业务敏感\\",\\n \\"SecurityLevel\\": 0,\\n \\"RiskResult\\": 1\\n }\\n ]\\n }\\n }\\n }\\n ],\\n \\"ProcessedCount\\": 1,\\n \\"TaskId\\": \\"5d85cd38-03b2-49fd-86b2-be85c4b13215\\",\\n \\"TaskStatus\\": 2,\\n \\"TotalCount\\": 1,\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', 'title' => '获取模型输入内容检测结果', - ], - 'GetModelOutputContentDetectResult' => [ - 'summary' => '通过任务标识获取模型输出内容异步检测结果', - 'methods' => [ - 'get', - 'post', + 'changeSet' => [ + ['createdAt' => '2025-06-12T08:56:27.000Z', 'description' => '响应参数发生变更'], + ], + 'flowControl' => [ + 'flowControlList' => [], ], - 'schemes' => [ - 'https', + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:GetModelInputContentDetectResult', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'GetModelInstanceInfo' => [ + 'summary' => '获取模型实例信息。', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -2712,30 +1812,132 @@ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], ], 'parameters' => [ [ - 'name' => 'RegionId', + 'name' => 'ModelInstanceId', + 'in' => 'query', + 'schema' => ['description' => '模型实例Id', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '123'], + ], + [ + 'name' => 'SceneType', 'in' => 'query', + 'schema' => ['description' => '场景类型, 0:输入,1:输出,2:输入+输出', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '2'], + ], + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'cn-shanghai', + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'Code' => ['description' => '状态码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'HarmfulCategoryConfigInfoList' => [ + 'description' => '有害分类配置列表', + 'type' => 'array', + 'items' => [ + 'description' => '有害分类配置', + 'type' => 'object', + 'properties' => [ + 'CategoryId' => ['description' => '有害分类ID', 'type' => 'integer', 'format' => 'int64', 'example' => '1'], + 'InputOutputType' => ['description' => '模型输入输出类型'."\n" + .'0:输入'."\n" + .'1:输出', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'CategoryType' => ['description' => '0:文本'."\n" + .'1:图像', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'CategoryLabel' => ['description' => '分类名称', 'type' => 'string', 'example' => '伦理道德'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + ], + ], + ], + 'HttpStatusCode' => ['description' => 'http状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '错误信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '操作是否成功。true表示成功,false表示失败。', 'type' => 'boolean', 'example' => 'True'], + 'GmtModified' => ['description' => '策略修改时间', 'type' => 'integer', 'format' => 'int64', 'example' => '1634122349000'], + 'PromptAttackInfoList' => [ + 'description' => '提示词攻击对象列表', + 'type' => 'array', + 'items' => [ + 'description' => '提示词攻击对象', + 'type' => 'object', + 'properties' => [ + 'CategoryId' => ['description' => '有害分类ID', 'type' => 'integer', 'format' => 'int64', 'example' => '1'], + 'CategoryLabel' => ['description' => '分类名称', 'type' => 'string', 'example' => '角色扮演'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + ], + ], + ], + 'ModelInstanceId' => ['description' => '模型实例Id', 'type' => 'integer', 'format' => 'int64', 'example' => '123'], + 'EasServiceName' => ['description' => 'EAS服务名称。', 'type' => 'string', 'example' => 'rai_content_detection_model'], + 'EasServiceId' => ['description' => 'EAS 服务Id', 'type' => 'string', 'example' => 'eas-m-12345678'], + 'ModelSource' => ['description' => '模型来源:1-PAI,2-其他', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'IsSupportText' => ['description' => '是否支持文本', 'type' => 'boolean', 'example' => 'True'], + 'IsSupportImage' => ['description' => '是否支持图片', 'type' => 'boolean', 'example' => 'False'], + 'ModelUrl' => ['description' => 'EAS 公网调用地址', 'type' => 'string', 'example' => 'http://12345*****.cn-shanghai.aliyuncs.com/api/predict/echo'], + 'ModelVpcUrl' => ['description' => 'EAS VPC调用地址', 'type' => 'string', 'example' => 'http://12345*****.vpc.cn-shanghai.aliyuncs.com/api/predict/demo'], + 'ModelToken' => ['description' => '模型token', 'type' => 'string', 'example' => 'MzJiMDI5MDliODc0MTlkYmI0ZDhlYmExYjczYTIyZTE3Zm********'], + 'ModelCallName' => ['description' => 'OpenAI API接口中 模型名 参数', 'type' => 'string', 'example' => 'demo'], + 'Description' => ['description' => '实例描述', 'type' => 'string', 'example' => 'opencompass-vllm07-acc'], + 'ModelCategoryId' => ['description' => '模型类别Id', 'type' => 'integer', 'format' => 'int64', 'example' => '1'], + ], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"HarmfulCategoryConfigInfoList\\": [\\n {\\n \\"CategoryId\\": 1,\\n \\"InputOutputType\\": 0,\\n \\"CategoryType\\": 0,\\n \\"CategoryLabel\\": \\"伦理道德\\",\\n \\"SecurityLevel\\": 1\\n }\\n ],\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true,\\n \\"GmtModified\\": 1634122349000,\\n \\"PromptAttackInfoList\\": [\\n {\\n \\"CategoryId\\": 1,\\n \\"CategoryLabel\\": \\"角色扮演\\",\\n \\"SecurityLevel\\": 1\\n }\\n ],\\n \\"ModelInstanceId\\": 123,\\n \\"EasServiceName\\": \\"rai_content_detection_model\\",\\n \\"EasServiceId\\": \\"eas-m-12345678\\",\\n \\"ModelSource\\": 1,\\n \\"IsSupportText\\": true,\\n \\"IsSupportImage\\": true,\\n \\"ModelUrl\\": \\"http://12345*****.cn-shanghai.aliyuncs.com/api/predict/echo\\",\\n \\"ModelVpcUrl\\": \\"http://12345*****.vpc.cn-shanghai.aliyuncs.com/api/predict/demo\\",\\n \\"ModelToken\\": \\"MzJiMDI5MDliODc0MTlkYmI0ZDhlYmExYjczYTIyZTE3Zm********\\",\\n \\"ModelCallName\\": \\"demo\\",\\n \\"Description\\": \\"opencompass-vllm07-acc\\",\\n \\"ModelCategoryId\\": 1\\n}","type":"json"}]', + 'title' => '获取模型实例信息', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:GetModelInstanceInfo', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], + ], + ], + 'GetModelOutputContentDetectResult' => [ + 'summary' => '通过任务标识获取模型输出内容异步检测结果', + 'methods' => ['get', 'post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'readAndWrite', + 'systemTags' => [ + 'operationType' => 'get', + 'riskType' => 'none', + 'chargeType' => 'paid', + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], + ], + 'parameters' => [ + [ + 'name' => 'RegionId', + 'in' => 'query', + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], + ], [ 'name' => 'TaskId', 'in' => 'query', - 'schema' => [ - 'description' => '任务ID。', - 'type' => 'string', - 'required' => false, - 'example' => '5d85cd38-03b2-49fd-86b2-be85c4b13215', - ], + 'schema' => ['description' => '任务ID。', 'type' => 'string', 'required' => false, 'example' => '5d85cd38-03b2-49fd-86b2-be85c4b13215'], ], ], 'responses' => [ @@ -2745,11 +1947,7 @@ 'description' => '响应', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '状态码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], + 'Code' => ['description' => '状态码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], 'DetectResultList' => [ 'description' => '检测结果对象列表', 'type' => 'array', @@ -2757,22 +1955,12 @@ 'description' => '检测结果对象', 'type' => 'object', 'properties' => [ - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'Status' => [ - 'description' => '0:排队中'."\n" - .'1: 处理中'."\n" - .'2:处理完成'."\n" - .'3:处理失败', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '2', - ], + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'Status' => ['description' => '0:排队中'."\n" + .'1: 处理中'."\n" + .'2:处理完成'."\n" + .'3:处理失败', 'type' => 'integer', 'format' => 'int32', 'example' => '2'], 'TraceInfo' => [ 'description' => '检查结果', 'type' => 'object', @@ -2781,13 +1969,8 @@ 'description' => '检测关键词', 'type' => 'object', 'properties' => [ - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], 'BlockWordGroupInfoList' => [ 'description' => '关键词检测结果对象列表', 'type' => 'array', @@ -2795,11 +1978,7 @@ 'description' => '关键词检测结果对象', 'type' => 'object', 'properties' => [ - 'GroupName' => [ - 'description' => '关键词组名称', - 'type' => 'string', - 'example' => '测试分组', - ], + 'GroupName' => ['description' => '关键词组名称', 'type' => 'string', 'example' => '测试分组'], 'BlockWordList' => [ 'description' => '关键词检测结果列表', 'type' => 'array', @@ -2807,16 +1986,8 @@ 'description' => '关键词检测结果', 'type' => 'object', 'properties' => [ - 'Word' => [ - 'description' => '关键词', - 'type' => 'string', - 'example' => '测试关键词', - ], - 'WordLabel' => [ - 'description' => '标签', - 'type' => 'string', - 'example' => '测试标签', - ], + 'Word' => ['description' => '关键词', 'type' => 'string', 'example' => '测试关键词'], + 'WordLabel' => ['description' => '标签', 'type' => 'string', 'example' => '测试标签'], ], ], ], @@ -2829,19 +2000,9 @@ 'description' => '有害分类结果对象列表', 'type' => 'object', 'properties' => [ - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'ConfidenceScore' => [ - 'description' => '置信度', - 'type' => 'number', - 'format' => 'double', - 'example' => '0.0', - ], + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'ConfidenceScore' => ['description' => '置信度', 'type' => 'number', 'format' => 'double', 'example' => '0.0'], 'HarmfulCategoryInfoList' => [ 'description' => '有害分类对象列表', 'type' => 'array', @@ -2849,39 +2010,16 @@ 'description' => '有害分类对象', 'type' => 'object', 'properties' => [ - 'CategoryType' => [ - 'description' => '0:文本'."\n" - .'1:图像', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'CategoryLabel' => [ - 'description' => '分类名称', - 'type' => 'string', - 'example' => '伦理道德', - ], - 'SubCategoryLabel' => [ - 'description' => '二级分类标签', - 'type' => 'string', - 'example' => '不良行为', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], + 'CategoryType' => ['description' => '0:文本'."\n" + .'1:图像', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'CategoryLabel' => ['description' => '分类名称', 'type' => 'string', 'example' => '伦理道德'], + 'SubCategoryLabel' => ['description' => '二级分类标签', 'type' => 'string', 'example' => '不良行为'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], ], ], ], @@ -2891,33 +2029,14 @@ 'description' => '提示词攻击信息', 'type' => 'object', 'properties' => [ - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'PromptAttackInfo' => [ - 'description' => '提示词攻击检测结果对象', - 'type' => 'string', - 'example' => '角色扮演', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'ConfidenceScore' => [ - 'description' => '置信度', - 'type' => 'number', - 'format' => 'double', - 'example' => '0.0', - ], + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'PromptAttackInfo' => ['description' => '提示词攻击检测结果对象', 'type' => 'string', 'example' => '角色扮演'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'ConfidenceScore' => ['description' => '置信度', 'type' => 'number', 'format' => 'double', 'example' => '0.0'], 'PromptAttackInfoList' => [ 'description' => '提示词攻击列表', 'type' => 'array', @@ -2925,34 +2044,15 @@ 'description' => '提示词攻击列表', 'type' => 'object', 'properties' => [ - 'CategoryType' => [ - 'description' => '0:文本'."\n" - .'1:图像', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'CategoryLabel' => [ - 'description' => '分类名称', - 'type' => 'string', - 'example' => '角色扮演', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], + 'CategoryType' => ['description' => '0:文本'."\n" + .'1:图像', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'CategoryLabel' => ['description' => '分类名称', 'type' => 'string', 'example' => '角色扮演'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], ], ], ], @@ -2962,19 +2062,9 @@ 'description' => '敏感主题对象列表', 'type' => 'object', 'properties' => [ - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'ConfidenceScore' => [ - 'description' => '置信度', - 'type' => 'number', - 'format' => 'double', - 'example' => '0.0', - ], + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'ConfidenceScore' => ['description' => '置信度', 'type' => 'number', 'format' => 'double', 'example' => '0.0'], 'TopicInfoList' => [ 'description' => '敏感主题列表', 'type' => 'array', @@ -2982,34 +2072,15 @@ 'description' => '敏感主题列表', 'type' => 'object', 'properties' => [ - 'CategoryType' => [ - 'description' => '0:文本'."\n" - .'1:图像', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'TopicName' => [ - 'description' => '主题名称', - 'type' => 'string', - 'example' => '业务敏感', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], + 'CategoryType' => ['description' => '0:文本'."\n" + .'1:图像', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'TopicName' => ['description' => '主题名称', 'type' => 'string', 'example' => '业务敏感'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], ], ], ], @@ -3020,71 +2091,48 @@ ], ], ], - 'ProcessedCount' => [ - 'description' => '任务已处理条数。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'TaskId' => [ - 'description' => '任务ID。', - 'type' => 'string', - 'example' => '5d85cd38-03b2-49fd-86b2-be85c4b13215', - ], - 'TaskStatus' => [ - 'description' => '任务处理状态:'."\n" - .'0:排队中'."\n" - .'1: 处理中'."\n" - .'2:处理完成'."\n" - .'3:处理失败', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '2', - ], - 'TotalCount' => [ - 'description' => '总数量', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'HttpStatusCode' => [ - 'description' => 'HTTP状态码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '错误信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求ID', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '操作是否成功。true表示成功,false表示失败。', - 'type' => 'boolean', - 'example' => 'True', - ], + 'ProcessedCount' => ['description' => '任务已处理条数。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'TaskId' => ['description' => '任务ID。', 'type' => 'string', 'example' => '5d85cd38-03b2-49fd-86b2-be85c4b13215'], + 'TaskStatus' => ['description' => '任务处理状态:'."\n" + .'0:排队中'."\n" + .'1: 处理中'."\n" + .'2:处理完成'."\n" + .'3:处理失败', 'type' => 'integer', 'format' => 'int32', 'example' => '2'], + 'TotalCount' => ['description' => '总数量', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'HttpStatusCode' => ['description' => 'HTTP状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '错误信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求ID', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '操作是否成功。true表示成功,false表示失败。', 'type' => 'boolean', 'example' => 'True'], ], ], ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"DetectResultList\\": [\\n {\\n \\"RiskResult\\": 0,\\n \\"Status\\": 2,\\n \\"TraceInfo\\": {\\n \\"BlockWord\\": {\\n \\"RiskResult\\": 0,\\n \\"BlockWordGroupInfoList\\": [\\n {\\n \\"GroupName\\": \\"测试分组\\",\\n \\"BlockWordList\\": [\\n {\\n \\"Word\\": \\"测试关键词\\",\\n \\"WordLabel\\": \\"测试标签\\"\\n }\\n ]\\n }\\n ]\\n },\\n \\"HarmfulCategories\\": {\\n \\"RiskResult\\": 0,\\n \\"ConfidenceScore\\": 0,\\n \\"HarmfulCategoryInfoList\\": [\\n {\\n \\"CategoryType\\": 0,\\n \\"CategoryLabel\\": \\"伦理道德\\",\\n \\"SubCategoryLabel\\": \\"不良行为\\",\\n \\"SecurityLevel\\": 1,\\n \\"RiskResult\\": 0\\n }\\n ]\\n },\\n \\"PromptAttack\\": {\\n \\"RiskResult\\": 0,\\n \\"PromptAttackInfo\\": \\"角色扮演\\",\\n \\"SecurityLevel\\": 1,\\n \\"ConfidenceScore\\": 0,\\n \\"PromptAttackInfoList\\": [\\n {\\n \\"CategoryType\\": 0,\\n \\"CategoryLabel\\": \\"角色扮演\\",\\n \\"SecurityLevel\\": 0,\\n \\"RiskResult\\": 1\\n }\\n ]\\n },\\n \\"DenyTopics\\": {\\n \\"RiskResult\\": 0,\\n \\"ConfidenceScore\\": 0,\\n \\"TopicInfoList\\": [\\n {\\n \\"CategoryType\\": 0,\\n \\"TopicName\\": \\"业务敏感\\",\\n \\"SecurityLevel\\": 0,\\n \\"RiskResult\\": 0\\n }\\n ]\\n }\\n }\\n }\\n ],\\n \\"ProcessedCount\\": 1,\\n \\"TaskId\\": \\"5d85cd38-03b2-49fd-86b2-be85c4b13215\\",\\n \\"TaskStatus\\": 2,\\n \\"TotalCount\\": 1,\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', 'title' => '获取模型输出内容检测结果', + 'changeSet' => [ + ['createdAt' => '2025-06-12T08:56:27.000Z', 'description' => '响应参数发生变更'], + ], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:GetModelOutputContentDetectResult', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], + ], ], 'GetPolicyDefaultOptions' => [ 'summary' => '查询检测策略默认选项', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', - ], + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -3095,20 +2143,13 @@ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], ], 'parameters' => [ [ 'name' => 'RegionId', 'in' => 'query', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'cn-shanghai', - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], ], ], 'responses' => [ @@ -3118,11 +2159,7 @@ 'description' => '响应', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '状态码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], + 'Code' => ['description' => '状态码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], 'WordGroupInfoList' => [ 'description' => '关键词分组对象列表', 'type' => 'array', @@ -3130,25 +2167,11 @@ 'description' => '关键词分组对象', 'type' => 'object', 'properties' => [ - 'GroupId' => [ - 'description' => '关键词分组ID。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1', - ], - 'InputOutputType' => [ - 'description' => '模型输入输出类型'."\n" - .'0:输入'."\n" - .'1:输出', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'GroupName' => [ - 'description' => '关键词组名称', - 'type' => 'string', - 'example' => '测试分组', - ], + 'GroupId' => ['description' => '关键词分组ID。', 'type' => 'integer', 'format' => 'int64', 'example' => '1'], + 'InputOutputType' => ['description' => '模型输入输出类型'."\n" + .'0:输入'."\n" + .'1:输出', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'GroupName' => ['description' => '关键词组名称', 'type' => 'string', 'example' => '测试分组'], ], ], ], @@ -3159,49 +2182,20 @@ 'description' => '有害分类对象', 'type' => 'object', 'properties' => [ - 'CategoryId' => [ - 'description' => '有害分类ID', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1', - ], - 'InputOutputType' => [ - 'description' => '模型输入输出类型'."\n" - .'0:输入'."\n" - .'1:输出', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'CategoryType' => [ - 'description' => '0:文本'."\n" - .'1:图像', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'CategoryLabel' => [ - 'description' => '分类名称', - 'type' => 'string', - 'example' => '伦理道德', - ], - 'IsEnabled' => [ - 'description' => '有害分类配置开关'."\n" - .'0:关闭'."\n" - .'1:打开', - 'type' => 'integer', - 'format' => 'int32', - 'example' => 'True', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '2', - ], + 'CategoryId' => ['description' => '有害分类ID', 'type' => 'integer', 'format' => 'int64', 'example' => '1'], + 'InputOutputType' => ['description' => '模型输入输出类型'."\n" + .'0:输入'."\n" + .'1:输出', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'CategoryType' => ['description' => '0:文本'."\n" + .'1:图像', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'CategoryLabel' => ['description' => '分类名称', 'type' => 'string', 'example' => '伦理道德'], + 'IsEnabled' => ['description' => '有害分类配置开关'."\n" + .'0:关闭'."\n" + .'1:打开', 'type' => 'integer', 'format' => 'int32', 'example' => 'True'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'example' => '2'], ], ], ], @@ -3209,47 +2203,19 @@ 'description' => '提示词攻击检测结果对象', 'type' => 'object', 'properties' => [ - 'IsEnabled' => [ - 'description' => '有害分类配置开关'."\n" - .'0:关闭'."\n" - .'1:打开', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], + 'IsEnabled' => ['description' => '有害分类配置开关'."\n" + .'0:关闭'."\n" + .'1:打开', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], ], ], - 'HttpStatusCode' => [ - 'description' => 'HTTP状态码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '返回信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求ID', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '操作是否成功。true表示成功,false表示失败。', - 'type' => 'boolean', - 'example' => 'True', - ], + 'HttpStatusCode' => ['description' => 'HTTP状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '返回信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求ID', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '操作是否成功。true表示成功,false表示失败。', 'type' => 'boolean', 'example' => 'True'], 'PromptAttackInfoList' => [ 'description' => '提示词攻击列表', 'type' => 'array', @@ -3257,34 +2223,15 @@ 'description' => '提示词攻击列表', 'type' => 'object', 'properties' => [ - 'CategoryId' => [ - 'description' => '有害分类ID', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1', - ], - 'CategoryLabel' => [ - 'description' => '分类名称', - 'type' => 'string', - 'example' => '角色扮演', - ], - 'IsEnabled' => [ - 'description' => '提示词攻击配置开关'."\n" - .'0:关闭'."\n" - .'1:打开', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], + 'CategoryId' => ['description' => '有害分类ID', 'type' => 'integer', 'format' => 'int64', 'example' => '1'], + 'CategoryLabel' => ['description' => '分类名称', 'type' => 'string', 'example' => '角色扮演'], + 'IsEnabled' => ['description' => '提示词攻击配置开关'."\n" + .'0:关闭'."\n" + .'1:打开', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], ], ], ], @@ -3295,78 +2242,26 @@ 'description' => '敏感主题对象', 'type' => 'object', 'properties' => [ - 'TopicId' => [ - 'description' => '敏感主题Id', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '4', - ], - 'InputOutputType' => [ - 'description' => '模型输入输出类型'."\n" - .'0:输入'."\n" - .'1:输出', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'CategoryType' => [ - 'description' => '0:文本'."\n" - .'1:图像', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'TopicName' => [ - 'description' => '主题名称', - 'type' => 'string', - 'example' => '业务敏感', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], + 'TopicId' => ['description' => '敏感主题Id', 'type' => 'integer', 'format' => 'int64', 'example' => '4'], + 'InputOutputType' => ['description' => '模型输入输出类型'."\n" + .'0:输入'."\n" + .'1:输出', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'CategoryType' => ['description' => '0:文本'."\n" + .'1:图像', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'TopicName' => ['description' => '主题名称', 'type' => 'string', 'example' => '业务敏感'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], ], ], ], - 'EnableSensitiveInputCheck' => [ - 'description' => '是否开启敏感保护输入检查', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'EnableSensitiveOutputCheck' => [ - 'description' => '是否开启敏感保护输出检查', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'InputSafeAnswer' => [ - 'description' => '提示词输入安全代答', - 'type' => 'string', - 'example' => 'Sorry, I cannot answer this question.', - ], - 'OutputSafeAnswer' => [ - 'description' => '模型输出安全代答', - 'type' => 'string', - 'example' => 'Sorry, I cannot answer this question.', - ], - 'InputSafeAnswerSwitch' => [ - 'description' => '提示词输入安全代答开关。0表示关闭;1表示开启。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'OutputSafeAnswerSwitch' => [ - 'description' => '模型输出安全代答开关。0表示关闭;1表示开启。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], + 'EnableSensitiveInputCheck' => ['description' => '是否开启敏感保护输入检查', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'EnableSensitiveOutputCheck' => ['description' => '是否开启敏感保护输出检查', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'InputSafeAnswer' => ['description' => '提示词输入安全代答', 'type' => 'string', 'example' => 'Sorry, I cannot answer this question.'], + 'OutputSafeAnswer' => ['description' => '模型输出安全代答', 'type' => 'string', 'example' => 'Sorry, I cannot answer this question.'], + 'InputSafeAnswerSwitch' => ['description' => '提示词输入安全代答开关。0表示关闭;1表示开启。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'OutputSafeAnswerSwitch' => ['description' => '模型输出安全代答开关。0表示关闭;1表示开启。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], 'SensitiveDataTypeList' => [ 'description' => '敏感数据列表', 'type' => 'array', @@ -3374,49 +2269,14 @@ 'description' => '敏感数据对象', 'type' => 'object', 'properties' => [ - 'SensitiveConfigId' => [ - 'description' => '敏感类别配置Id', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '123', - ], - 'SensitiveName' => [ - 'description' => '类别名称', - 'type' => 'string', - 'example' => '出生日期', - ], - 'DataType' => [ - 'description' => '类别', - 'type' => 'string', - 'example' => '个人信息', - ], - 'Example' => [ - 'description' => '示例内容', - 'type' => 'string', - 'example' => 'my birthday is 20000101', - ], - 'ExampleProcessed' => [ - 'description' => '脱敏效果', - 'type' => 'string', - 'example' => 'my birthday is ********', - ], - 'MatchAndReplace' => [ - 'description' => '脱敏方式', - 'type' => 'string', - 'example' => '字符转换', - ], - 'ActionType' => [ - 'description' => '响应方式,0:仅检测、1:脱敏、2:拒答', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'IsEnabled' => [ - 'description' => '是否启用,0:否、1:是', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], + 'SensitiveConfigId' => ['description' => '敏感类别配置Id', 'type' => 'integer', 'format' => 'int64', 'example' => '123'], + 'SensitiveName' => ['description' => '类别名称', 'type' => 'string', 'example' => '出生日期'], + 'DataType' => ['description' => '类别', 'type' => 'string', 'example' => '个人信息'], + 'Example' => ['description' => '示例内容', 'type' => 'string', 'example' => 'my birthday is 20000101'], + 'ExampleProcessed' => ['description' => '脱敏效果', 'type' => 'string', 'example' => 'my birthday is ********'], + 'MatchAndReplace' => ['description' => '脱敏方式', 'type' => 'string', 'example' => '字符转换'], + 'ActionType' => ['description' => '响应方式,0:仅检测、1:脱敏、2:拒答', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'IsEnabled' => ['description' => '是否启用,0:否、1:是', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], ], ], ], @@ -3426,16 +2286,32 @@ ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"WordGroupInfoList\\": [\\n {\\n \\"GroupId\\": 1,\\n \\"InputOutputType\\": 0,\\n \\"GroupName\\": \\"测试分组\\"\\n }\\n ],\\n \\"HarmfulCategoryInfoList\\": [\\n {\\n \\"CategoryId\\": 1,\\n \\"InputOutputType\\": 0,\\n \\"CategoryType\\": 0,\\n \\"CategoryLabel\\": \\"伦理道德\\",\\n \\"IsEnabled\\": 0,\\n \\"SecurityLevel\\": 2\\n }\\n ],\\n \\"PromptAttackInfo\\": {\\n \\"IsEnabled\\": 1,\\n \\"SecurityLevel\\": 1\\n },\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true,\\n \\"PromptAttackInfoList\\": [\\n {\\n \\"CategoryId\\": 1,\\n \\"CategoryLabel\\": \\"角色扮演\\",\\n \\"IsEnabled\\": 1,\\n \\"SecurityLevel\\": 0\\n }\\n ],\\n \\"TopicConfigInfoList\\": [\\n {\\n \\"TopicId\\": 4,\\n \\"InputOutputType\\": 0,\\n \\"CategoryType\\": 0,\\n \\"TopicName\\": \\"业务敏感\\",\\n \\"SecurityLevel\\": 0\\n }\\n ],\\n \\"EnableSensitiveInputCheck\\": 1,\\n \\"EnableSensitiveOutputCheck\\": 1,\\n \\"InputSafeAnswer\\": \\"Sorry, I cannot answer this question.\\",\\n \\"OutputSafeAnswer\\": \\"Sorry, I cannot answer this question.\\",\\n \\"InputSafeAnswerSwitch\\": 1,\\n \\"OutputSafeAnswerSwitch\\": 1,\\n \\"SensitiveDataTypeList\\": [\\n {\\n \\"SensitiveConfigId\\": 123,\\n \\"SensitiveName\\": \\"出生日期\\",\\n \\"DataType\\": \\"个人信息\\",\\n \\"Example\\": \\"my birthday is 20000101\\",\\n \\"ExampleProcessed\\": \\"my birthday is ********\\",\\n \\"MatchAndReplace\\": \\"字符转换\\",\\n \\"ActionType\\": 1,\\n \\"IsEnabled\\": 1\\n }\\n ]\\n}","type":"json"}]', 'title' => '查询检测策略默认选项', - ], - 'CreatePolicy' => [ - 'summary' => '创建检测策略', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', + 'changeSet' => [ + ['createdAt' => '2025-10-16T03:11:06.000Z', 'description' => '响应参数发生变更'], + ['createdAt' => '2025-08-06T10:35:02.000Z', 'description' => '响应参数发生变更'], + ['createdAt' => '2025-06-12T08:56:27.000Z', 'description' => '响应参数发生变更'], + ], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:GetPolicyDefaultOptions', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'GetPolicyInfo' => [ + 'summary' => '查询检测策略详情', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -3446,576 +2322,443 @@ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], ], 'parameters' => [ [ 'name' => 'RegionId', 'in' => 'query', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'cn-shanghai', - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], ], [ - 'name' => 'PolicyName', + 'name' => 'PolicyId', 'in' => 'query', - 'schema' => [ - 'description' => '检测策略名称。', - 'type' => 'string', - 'required' => false, - 'example' => '测试策略', - ], + 'schema' => ['description' => '检测策略ID', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '16'], ], - [ - 'name' => 'HarmfulCategoryConfigInfoList', - 'in' => 'query', - 'style' => 'json', + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => '有害分类配置列表', - 'type' => 'array', - 'items' => [ - 'description' => '有害分类配置对象', - 'type' => 'object', - 'properties' => [ - 'CategoryId' => [ - 'description' => '有害分类ID', - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - 'example' => '1', - ], - 'InputOutputType' => [ - 'description' => '模型输入输出类型'."\n" - .'0:输入'."\n" - .'1:输出', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '0', - ], - 'CategoryType' => [ - 'description' => '0:文本'."\n" - .'1:图像', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '0', - ], - 'CategoryLabel' => [ - 'description' => '分类名称', - 'type' => 'string', - 'required' => false, - 'example' => '伦理道德', + 'title' => 'Schema of Response', + 'description' => '响应', + 'type' => 'object', + 'properties' => [ + 'Code' => ['description' => '结果码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'PolicyIdentifier' => ['description' => '策略标识', 'type' => 'string', 'example' => 'x1bc5xgs4uhx'], + 'PolicyName' => ['description' => '检测策略名称。', 'type' => 'string', 'example' => '测试策略'], + 'WordGroupInfoList' => [ + 'description' => '关键词分组对象列表', + 'type' => 'array', + 'items' => [ + 'description' => '关键词分组对象', + 'type' => 'object', + 'properties' => [ + 'GroupId' => ['description' => '关键词分组ID。', 'type' => 'integer', 'format' => 'int64', 'example' => '1'], + 'InputOutputType' => ['description' => '模型输入输出类型'."\n" + .'0:输入'."\n" + .'1:输出', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'GroupName' => ['description' => '关键词组名称', 'type' => 'string', 'example' => '测试分组'], + ], ], - 'IsEnabled' => [ - 'description' => '是否开启'."\n" - .'0:未开启'."\n" - .'1:已开启', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '1', + ], + 'HarmfulCategoryConfigInfoList' => [ + 'description' => '有害分类配置列表', + 'type' => 'array', + 'items' => [ + 'description' => '有害分类配置', + 'type' => 'object', + 'properties' => [ + 'CategoryConfigId' => ['description' => '有害分类配置ID', 'type' => 'integer', 'format' => 'int64', 'example' => '1'], + 'InputOutputType' => ['description' => '模型输入输出类型'."\n" + .'0:输入'."\n" + .'1:输出', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'CategoryType' => ['description' => '0:文本'."\n" + .'1:图像', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'CategoryLabel' => ['description' => '分类名称', 'type' => 'string', 'example' => '伦理道德'], + 'IsEnabled' => ['description' => '有害分类配置开关'."\n" + .'0:关闭'."\n" + .'1:打开', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'CategoryId' => ['type' => 'integer', 'format' => 'int64', 'description' => ''], + ], ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" + ], + 'PromptAttackInfo' => [ + 'description' => '提示词攻击检测结果对象', + 'type' => 'object', + 'properties' => [ + 'IsEnabled' => ['description' => '提示词攻击配置开关'."\n" + .'0:关闭'."\n" + .'1:打开', 'type' => 'integer', 'format' => 'int32', 'example' => 'true'], + 'SecurityLevel' => ['description' => '安全等级'."\n" .'0:低'."\n" .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '0', + .'2:高', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], ], ], - 'required' => false, - ], - 'required' => false, - ], - ], - [ - 'name' => 'WordGroupInfoList', - 'in' => 'query', - 'style' => 'json', - 'schema' => [ - 'description' => '关键词分组对象列表', - 'type' => 'array', - 'items' => [ - 'description' => '关键词分组对象', - 'type' => 'object', - 'properties' => [ - 'GroupId' => [ - 'description' => '关键词分组ID。', - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - 'example' => '1', - ], - 'InputOutputType' => [ - 'description' => '模型输入输出类型'."\n" - .'0:输入'."\n" - .'1:输出', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '0', - ], - 'GroupName' => [ - 'description' => '关键词组名称', - 'type' => 'string', - 'required' => false, - 'example' => '测试分组', + 'HttpStatusCode' => ['description' => 'http状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '错误信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求ID', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '操作是否成功。true表示成功,false表示失败。', 'type' => 'boolean', 'example' => 'True'], + 'GmtModified' => ['description' => '策略修改时间', 'type' => 'integer', 'format' => 'int64', 'example' => '1634122349000'], + 'PromptAttackInfoList' => [ + 'description' => '提示词攻击列表', + 'type' => 'array', + 'items' => [ + 'description' => '提示词攻击列表', + 'type' => 'object', + 'properties' => [ + 'CategoryConfigId' => ['description' => '有害分类配置ID', 'type' => 'integer', 'format' => 'int64', 'example' => '1'], + 'CategoryLabel' => ['description' => '分类名称', 'type' => 'string', 'example' => '角色扮演'], + 'IsEnabled' => ['description' => '有害分类配置开关'."\n" + .'0:关闭'."\n" + .'1:打开', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'CategoryId' => ['type' => 'integer', 'format' => 'int64', 'description' => ''], + ], ], ], - 'required' => false, - ], - 'required' => false, - ], - ], - [ - 'name' => 'PromptAttackInfo', - 'in' => 'query', - 'style' => 'json', - 'schema' => [ - 'description' => '提示词攻击检测结果对象', - 'type' => 'object', - 'properties' => [ - 'IsEnabled' => [ - 'description' => '提示词攻击配置开关'."\n" - .'0:关闭'."\n" - .'1:打开', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '1', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '1', - ], - ], - 'required' => false, - ], - ], - [ - 'name' => 'PromptAttackInfoList', - 'in' => 'query', - 'style' => 'json', - 'schema' => [ - 'description' => '提示词攻击列表', - 'type' => 'array', - 'items' => [ - 'description' => '提示词攻击列表', - 'type' => 'object', - 'properties' => [ - 'CategoryId' => [ - 'description' => '有害分类ID', - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - 'example' => '1', - ], - 'CategoryLabel' => [ - 'description' => '分类名称', - 'type' => 'string', - 'required' => false, - 'example' => '角色扮演', + 'TopicConfigInfoList' => [ + 'description' => '敏感主题列表', + 'type' => 'array', + 'items' => [ + 'description' => '敏感主题列表', + 'type' => 'object', + 'properties' => [ + 'TopicId' => ['description' => '敏感主题Id', 'type' => 'integer', 'format' => 'int64', 'example' => '3'], + 'InputOutputType' => ['description' => '模型输入输出类型'."\n" + .'0:输入'."\n" + .'1:输出', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'CategoryType' => ['description' => '0:文本'."\n" + .'1:图像', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'TopicName' => ['description' => '主题名称', 'type' => 'string', 'example' => '业务敏感'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + ], ], - 'IsEnabled' => [ - 'description' => '提示词攻击配置开关'."\n" - .'0:关闭'."\n" - .'1:打开', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '1', + ], + 'EnableSensitiveInputCheck' => ['type' => 'integer', 'format' => 'int32', 'description' => ''], + 'EnableSensitiveOutputCheck' => ['type' => 'integer', 'format' => 'int32', 'description' => ''], + 'SceneType' => ['type' => 'integer', 'format' => 'int32', 'description' => ''], + 'InputSafeAnswer' => ['type' => 'string', 'description' => ''], + 'OutputSafeAnswer' => ['type' => 'string', 'description' => ''], + 'InputSafeAnswerSwitch' => ['type' => 'integer', 'format' => 'int32', 'description' => ''], + 'OutputSafeAnswerSwitch' => ['type' => 'integer', 'format' => 'int32', 'description' => ''], + 'IsSidecarPolicy' => ['type' => 'integer', 'format' => 'int32', 'description' => ''], + 'ContentSafeModelInfo' => [ + 'type' => 'object', + 'properties' => [ + 'ModelInstanceId' => ['type' => 'integer', 'format' => 'int64', 'description' => ''], + 'EasServiceName' => ['type' => 'string', 'description' => ''], ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '1', + 'description' => '', + ], + 'PromptAttackModelInfo' => [ + 'type' => 'object', + 'properties' => [ + 'ModelInstanceId' => ['type' => 'integer', 'format' => 'int64', 'description' => ''], + 'EasServiceName' => ['type' => 'string', 'description' => ''], ], + 'description' => '', ], - 'required' => false, - ], - 'required' => false, - ], - ], - [ - 'name' => 'TopicConfigInfoList', - 'in' => 'query', - 'style' => 'json', - 'schema' => [ - 'description' => '敏感主题列表', - 'type' => 'array', - 'items' => [ - 'description' => '敏感主题列表', - 'type' => 'object', - 'properties' => [ - 'TopicId' => [ - 'description' => '敏感主题Id', - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - 'example' => '4', + 'SensitiveTopicModelInfo' => [ + 'type' => 'object', + 'properties' => [ + 'ModelInstanceId' => ['type' => 'integer', 'format' => 'int64', 'description' => ''], + 'EasServiceName' => ['type' => 'string', 'description' => ''], ], - 'InputOutputType' => [ - 'description' => '模型输入输出类型'."\n" - .'0:输入'."\n" - .'1:输出', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '0', + 'description' => '', + ], + 'SensitiveWordList' => [ + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'Word' => ['type' => 'string', 'description' => ''], + 'Label' => ['type' => 'string', 'description' => ''], + 'InputOutputType' => ['type' => 'integer', 'format' => 'int32', 'description' => ''], + ], + 'description' => '', ], - 'CategoryType' => [ - 'description' => '0:文本'."\n" - .'1:图像', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '0', + 'description' => '', + ], + 'SensitiveConfigList' => [ + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'SensitiveConfigId' => ['type' => 'integer', 'format' => 'int64', 'description' => ''], + 'SensitiveName' => ['type' => 'string', 'description' => ''], + 'ActionType' => ['type' => 'integer', 'format' => 'int32', 'description' => ''], + 'MatchAndReplace' => ['type' => 'string', 'description' => ''], + 'IsEnabled' => ['type' => 'integer', 'format' => 'int32', 'description' => ''], + 'InputOutputType' => ['type' => 'integer', 'format' => 'int32', 'description' => ''], + ], + 'description' => '', ], - 'TopicName' => [ - 'description' => '主题名称', - 'type' => 'string', - 'required' => false, - 'example' => '业务敏感', + 'description' => '', + ], + 'RegularExpressList' => [ + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'RegularExpressId' => ['type' => 'integer', 'format' => 'int64', 'description' => ''], + 'RegularExpressName' => ['type' => 'string', 'description' => ''], + 'RegularExpress' => ['type' => 'string', 'description' => ''], + 'ActionType' => ['type' => 'integer', 'format' => 'int32', 'description' => ''], + 'MatchAndReplace' => ['type' => 'string', 'description' => ''], + 'InputOutputType' => ['type' => 'integer', 'format' => 'int32', 'description' => ''], + 'IsEnabled' => ['type' => 'integer', 'format' => 'int32', 'description' => ''], + ], + 'description' => '', ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '1', + 'description' => '', + ], + 'SensitiveTopicList' => [ + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'TopicId' => ['type' => 'integer', 'format' => 'int64', 'description' => ''], + 'TopicName' => ['type' => 'string', 'description' => ''], + 'TopicDefinition' => ['type' => 'string', 'description' => ''], + 'TopicExampleInfoList' => [ + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'Content' => ['type' => 'string', 'description' => ''], + 'ExampleType' => ['type' => 'integer', 'format' => 'int64', 'description' => ''], + ], + 'description' => '', + ], + 'description' => '', + ], + 'InputOutputType' => ['type' => 'integer', 'format' => 'int32', 'description' => ''], + 'SecurityLevel' => ['type' => 'integer', 'format' => 'int32', 'description' => ''], + 'CategoryType' => ['type' => 'integer', 'format' => 'int32', 'description' => ''], + ], + 'description' => '', ], + 'description' => '', ], - 'required' => false, ], - 'required' => false, ], ], - [ - 'name' => 'WorkspaceId', - 'in' => 'query', - 'schema' => [ - 'description' => '工作空间ID', - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - 'example' => '608226', - ], - ], - [ - 'name' => 'EnableSensitiveInputCheck', - 'in' => 'query', - 'schema' => [ - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - ], - ], - [ - 'name' => 'EnableSensitiveOutputCheck', - 'in' => 'query', - 'schema' => [ - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - ], - ], - [ - 'name' => 'SceneType', - 'in' => 'query', - 'schema' => [ - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - ], - ], - [ - 'name' => 'InputSafeAnswer', - 'in' => 'query', - 'schema' => [ - 'type' => 'string', - 'required' => false, - ], - ], - [ - 'name' => 'OutputSafeAnswer', - 'in' => 'query', - 'schema' => [ - 'type' => 'string', - 'required' => false, - ], - ], - [ - 'name' => 'InputSafeAnswerSwitch', - 'in' => 'query', - 'schema' => [ - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - ], - ], - [ - 'name' => 'OutputSafeAnswerSwitch', - 'in' => 'query', - 'schema' => [ - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - ], - ], - [ - 'name' => 'IsSidecarPolicy', - 'in' => 'query', - 'schema' => [ - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"PolicyIdentifier\\": \\"x1bc5xgs4uhx\\",\\n \\"PolicyName\\": \\"测试策略\\",\\n \\"WordGroupInfoList\\": [\\n {\\n \\"GroupId\\": 1,\\n \\"InputOutputType\\": 0,\\n \\"GroupName\\": \\"测试分组\\"\\n }\\n ],\\n \\"HarmfulCategoryConfigInfoList\\": [\\n {\\n \\"CategoryConfigId\\": 1,\\n \\"InputOutputType\\": 0,\\n \\"CategoryType\\": 0,\\n \\"CategoryLabel\\": \\"伦理道德\\",\\n \\"IsEnabled\\": 1,\\n \\"SecurityLevel\\": 1,\\n \\"CategoryId\\": 0\\n }\\n ],\\n \\"PromptAttackInfo\\": {\\n \\"IsEnabled\\": 0,\\n \\"SecurityLevel\\": 1\\n },\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true,\\n \\"GmtModified\\": 1634122349000,\\n \\"PromptAttackInfoList\\": [\\n {\\n \\"CategoryConfigId\\": 1,\\n \\"CategoryLabel\\": \\"角色扮演\\",\\n \\"IsEnabled\\": 1,\\n \\"SecurityLevel\\": 1,\\n \\"CategoryId\\": 0\\n }\\n ],\\n \\"TopicConfigInfoList\\": [\\n {\\n \\"TopicId\\": 3,\\n \\"InputOutputType\\": 0,\\n \\"CategoryType\\": 0,\\n \\"TopicName\\": \\"业务敏感\\",\\n \\"SecurityLevel\\": 1\\n }\\n ],\\n \\"EnableSensitiveInputCheck\\": 0,\\n \\"EnableSensitiveOutputCheck\\": 0,\\n \\"SceneType\\": 0,\\n \\"InputSafeAnswer\\": \\"\\",\\n \\"OutputSafeAnswer\\": \\"\\",\\n \\"InputSafeAnswerSwitch\\": 0,\\n \\"OutputSafeAnswerSwitch\\": 0,\\n \\"IsSidecarPolicy\\": 0,\\n \\"ContentSafeModelInfo\\": {\\n \\"ModelInstanceId\\": 0,\\n \\"EasServiceName\\": \\"\\"\\n },\\n \\"PromptAttackModelInfo\\": {\\n \\"ModelInstanceId\\": 0,\\n \\"EasServiceName\\": \\"\\"\\n },\\n \\"SensitiveTopicModelInfo\\": {\\n \\"ModelInstanceId\\": 0,\\n \\"EasServiceName\\": \\"\\"\\n },\\n \\"SensitiveWordList\\": [\\n {\\n \\"Word\\": \\"\\",\\n \\"Label\\": \\"\\",\\n \\"InputOutputType\\": 0\\n }\\n ],\\n \\"SensitiveConfigList\\": [\\n {\\n \\"SensitiveConfigId\\": 0,\\n \\"SensitiveName\\": \\"\\",\\n \\"ActionType\\": 0,\\n \\"MatchAndReplace\\": \\"\\",\\n \\"IsEnabled\\": 0,\\n \\"InputOutputType\\": 0\\n }\\n ],\\n \\"RegularExpressList\\": [\\n {\\n \\"RegularExpressId\\": 0,\\n \\"RegularExpressName\\": \\"\\",\\n \\"RegularExpress\\": \\"\\",\\n \\"ActionType\\": 0,\\n \\"MatchAndReplace\\": \\"\\",\\n \\"InputOutputType\\": 0,\\n \\"IsEnabled\\": 0\\n }\\n ],\\n \\"SensitiveTopicList\\": [\\n {\\n \\"TopicId\\": 0,\\n \\"TopicName\\": \\"\\",\\n \\"TopicDefinition\\": \\"\\",\\n \\"TopicExampleInfoList\\": [\\n {\\n \\"Content\\": \\"\\",\\n \\"ExampleType\\": 0\\n }\\n ],\\n \\"InputOutputType\\": 0,\\n \\"SecurityLevel\\": 0,\\n \\"CategoryType\\": 0\\n }\\n ]\\n}","type":"json"}]', + 'title' => '查询检测策略详情', + 'changeSet' => [ + ['createdAt' => '2025-10-16T03:11:06.000Z', 'description' => '响应参数发生变更'], + ['createdAt' => '2025-08-06T10:35:02.000Z', 'description' => '响应参数发生变更'], + ['createdAt' => '2025-06-12T08:56:27.000Z', 'description' => '响应参数发生变更'], + ], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:GetPolicyInfo', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], + ], + ], + 'GetTopic' => [ + 'summary' => '查询敏感主题信息', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], + 'security' => [ [ - 'name' => 'ContentSafeModelInstanceId', - 'in' => 'query', - 'schema' => [ - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - ], + 'AK' => [], ], + ], + 'operationType' => 'readAndWrite', + 'systemTags' => [ + 'operationType' => 'get', + 'riskType' => 'none', + 'chargeType' => 'paid', + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], + ], + 'parameters' => [ [ - 'name' => 'PromptAttackModelInstanceId', + 'name' => 'RegionId', 'in' => 'query', - 'schema' => [ - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], ], [ - 'name' => 'SensitiveTopicModelInstanceId', + 'name' => 'TopicId', 'in' => 'query', - 'schema' => [ - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - ], + 'schema' => ['description' => '敏感主题Id', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '216'], ], - [ - 'name' => 'SensitiveWordList', - 'in' => 'query', - 'style' => 'json', + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'Word' => [ - 'type' => 'string', - 'required' => false, + 'title' => 'Schema of Response', + 'description' => '响应对象', + 'type' => 'object', + 'properties' => [ + 'Code' => ['description' => '状态码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'TopicName' => ['description' => '主题的名称。', 'type' => 'string', 'example' => 'test_topic'], + 'TopicExampleInfoList' => [ + 'description' => '样本示例列表', + 'type' => 'array', + 'items' => [ + 'description' => '样本示例列表', + 'type' => 'object', + 'properties' => [ + 'ExampleId' => ['description' => '样本示例Id', 'type' => 'integer', 'format' => 'int64', 'example' => '2'], + 'Content' => ['description' => '样本示例描述', 'type' => 'string', 'example' => '食品安全很重要'], + 'ExampleType' => ['description' => '样本示例类型'."\n" + .'0:白样本'."\n" + .'1:黑样本', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + ], ], - 'Label' => [ - 'type' => 'string', - 'required' => false, + ], + 'HttpStatusCode' => ['description' => '错误码描述', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '错误信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求标识', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '表示是否调用成功。可能值:'."\n" + .'- True:调用成功。'."\n" + .'- False:调用失败。', 'type' => 'boolean', 'example' => 'True'], + 'TopicDefinition' => ['description' => '敏感主题定义', 'type' => 'string', 'example' => '这里是敏感主题的描述'], + 'GmtModified' => ['description' => '策略修改时间', 'type' => 'integer', 'format' => 'int64', 'example' => '1634122349000'], + 'PolicyInfoList' => [ + 'description' => '关联的策略对象列表。', + 'type' => 'array', + 'items' => [ + 'description' => '策略对象列表。', + 'type' => 'object', + 'properties' => [ + 'PolicyId' => ['description' => '策略ID。', 'type' => 'integer', 'format' => 'int64', 'example' => '16'], + 'PolicyIdentifier' => ['description' => '策略标识。', 'type' => 'string', 'example' => 'x1bc5xgs4uhx'], + 'PolicyName' => ['description' => '策略名称。', 'type' => 'string', 'example' => '测试策略'], + ], ], ], - 'required' => false, ], - 'required' => false, ], ], - [ - 'name' => 'SensitiveConfigList', - 'in' => 'query', - 'style' => 'json', - 'schema' => [ - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'SensitiveConfigId' => [ - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - ], - 'ActionType' => [ - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - ], - 'IsEnabled' => [ - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - ], - ], - 'required' => false, + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"TopicName\\": \\"test_topic\\",\\n \\"TopicExampleInfoList\\": [\\n {\\n \\"ExampleId\\": 2,\\n \\"Content\\": \\"食品安全很重要\\",\\n \\"ExampleType\\": 0\\n }\\n ],\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true,\\n \\"TopicDefinition\\": \\"这里是敏感主题的描述\\",\\n \\"GmtModified\\": 1634122349000,\\n \\"PolicyInfoList\\": [\\n {\\n \\"PolicyId\\": 16,\\n \\"PolicyIdentifier\\": \\"x1bc5xgs4uhx\\",\\n \\"PolicyName\\": \\"测试策略\\"\\n }\\n ]\\n}","type":"json"}]', + 'title' => '查询敏感主题信息', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:GetTopic', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], ], - 'required' => false, ], ], + ], + ], + 'GetWordGroup' => [ + 'summary' => '查询关键词策略详情。', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], + 'security' => [ [ - 'name' => 'RegularExpressList', + 'AK' => [], + ], + ], + 'operationType' => 'readAndWrite', + 'systemTags' => [ + 'operationType' => 'get', + 'riskType' => 'none', + 'chargeType' => 'paid', + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], + ], + 'parameters' => [ + [ + 'name' => 'RegionId', 'in' => 'query', - 'style' => 'json', - 'schema' => [ - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'RegularExpressName' => [ - 'type' => 'string', - 'required' => false, - ], - 'RegularExpress' => [ - 'type' => 'string', - 'required' => false, - ], - 'ActionType' => [ - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - ], - ], - 'required' => false, - ], - 'required' => false, - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], ], [ - 'name' => 'SensitiveTopicList', + 'name' => 'GroupId', 'in' => 'query', - 'style' => 'json', - 'schema' => [ - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'TopicName' => [ - 'type' => 'string', - 'required' => false, - ], - 'TopicDefinition' => [ - 'type' => 'string', - 'required' => false, - ], - 'TopicExampleInfoList' => [ - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'Content' => [ - 'type' => 'string', - 'required' => false, - ], - 'ExampleType' => [ - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - ], - ], - 'required' => false, - ], - 'required' => false, - ], - 'SecurityLevel' => [ - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - ], - 'CategoryType' => [ - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - ], - ], - 'required' => false, - ], - 'required' => false, - ], + 'schema' => ['description' => '关键词分组ID。', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '1'], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => '响应', + 'description' => '响应。', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '状态码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'PolicyId' => [ - 'description' => '策略ID。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '16', - ], - 'PolicyIdentifier' => [ - 'description' => '策略标识', - 'type' => 'string', - 'example' => '2tehcwesh4xx', - ], - 'HttpStatusCode' => [ - 'description' => 'http状态码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '如有错误,返回错误信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求ID', - 'type' => 'string', - 'example' => '74D2A967-2CE0-519B-B623-38D851734EC5', - ], - 'Success' => [ - 'description' => '操作是否成功。true表示成功,false表示失败。', - 'type' => 'boolean', - 'example' => 'True', + 'Code' => ['description' => '状态码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'GroupName' => ['description' => '关键词组名称。', 'type' => 'string', 'example' => '测试分组'], + 'TotalCount' => ['description' => '总数量。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'WordInfoList' => [ + 'description' => '关键词分组列表。', + 'type' => 'array', + 'items' => [ + 'description' => '关键词分组。', + 'type' => 'object', + 'properties' => [ + 'WordId' => ['description' => '新增成功的词ID。', 'type' => 'integer', 'format' => 'int64', 'example' => '1'], + 'Word' => ['description' => '关键词。', 'type' => 'string', 'example' => '投资'], + 'Label' => ['description' => '标签。', 'type' => 'string', 'example' => '业务敏感'], + ], + ], ], + 'HttpStatusCode' => ['description' => 'HTTP状态码。', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '如有错误,返回错误信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求ID', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '是否成功。', 'type' => 'boolean', 'example' => 'True'], ], ], ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"PolicyId\\": 16,\\n \\"PolicyIdentifier\\": \\"2tehcwesh4xx\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"74D2A967-2CE0-519B-B623-38D851734EC5\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => '创建检测策略', - ], - 'UpdatePolicy' => [ - 'summary' => '更新检测策略', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"GroupName\\": \\"测试分组\\",\\n \\"TotalCount\\": 1,\\n \\"WordInfoList\\": [\\n {\\n \\"WordId\\": 1,\\n \\"Word\\": \\"投资\\",\\n \\"Label\\": \\"业务敏感\\"\\n }\\n ],\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => '查询关键词策略详情', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:GetWordGroup', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'ListModelCategory' => [ + 'summary' => '查询模型类别列表。', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -4026,584 +2769,240 @@ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], ], 'parameters' => [ [ - 'name' => 'RegionId', + 'name' => 'ModelSource', 'in' => 'query', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'cn-shanghai', - ], + 'schema' => ['description' => '模型来源:1-PAI,2-其他', 'type' => 'string', 'required' => false, 'example' => '1'], ], [ - 'name' => 'PolicyId', + 'name' => 'ContentSafeTextSupported', 'in' => 'query', - 'schema' => [ - 'description' => '检测策略ID', - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - 'example' => '16', - ], + 'schema' => ['description' => '是否支持文本内容安全检测', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => 'True'], ], [ - 'name' => 'PolicyName', + 'name' => 'ContentSafeImageSupported', 'in' => 'query', - 'schema' => [ - 'description' => '检测策略名称。', - 'type' => 'string', - 'required' => false, - 'example' => '测试策略', - ], + 'schema' => ['description' => '是否支持图片内容安全检测', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => 'False'], ], [ - 'name' => 'HarmfulCategoryConfigInfoList', + 'name' => 'PromptAttackTextSupported', 'in' => 'query', - 'style' => 'json', - 'schema' => [ - 'description' => '有害分类配置列表', - 'type' => 'array', - 'items' => [ - 'description' => '有害分类配置对象', - 'type' => 'object', - 'properties' => [ - 'CategoryConfigId' => [ - 'description' => '有害分类配置ID', - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - 'example' => '1', - ], - 'InputOutputType' => [ - 'description' => '模型输入输出类型'."\n" - .'0:输入'."\n" - .'1:输出', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '0', - ], - 'CategoryType' => [ - 'description' => '0:文本'."\n" - .'1:图像', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '0', - ], - 'CategoryLabel' => [ - 'description' => '分类名称', - 'type' => 'string', - 'required' => false, - 'example' => '伦理道德', - ], - 'IsEnabled' => [ - 'description' => '提示词攻击配置开关'."\n" - .'0:关闭'."\n" - .'1:打开', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '1', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '2', - ], - 'CategoryId' => [ - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - ], - ], - 'required' => false, - ], - 'required' => false, - ], + 'schema' => ['description' => '是否支持文本提示词攻击检测', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => 'False'], ], [ - 'name' => 'WordGroupInfoList', + 'name' => 'SensitiveTopicTextSupported', 'in' => 'query', - 'style' => 'json', - 'schema' => [ - 'description' => '关键词分组对象列表', - 'type' => 'array', - 'items' => [ - 'description' => '关键词分组对象', - 'type' => 'object', - 'properties' => [ - 'GroupId' => [ - 'description' => '关键词分组ID。', - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - 'example' => '5fa285a60a9342e097cb7a3491ec00cc', - ], - 'InputOutputType' => [ - 'description' => '模型输入输出类型'."\n" - .'0:输入'."\n" - .'1:输出', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '0', - ], - 'GroupName' => [ - 'description' => '关键词组名称', - 'type' => 'string', - 'required' => false, - 'example' => '测试分组', - ], - ], - 'required' => false, - ], - 'required' => false, - ], + 'schema' => ['description' => '是否支持文本敏感主题检测', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => 'False'], ], [ - 'name' => 'PromptAttackInfo', + 'name' => 'ModelCategoryName', 'in' => 'query', - 'style' => 'json', + 'schema' => ['description' => '模型类别名称', 'type' => 'string', 'required' => false, 'example' => 'demo'], + ], + ], + 'responses' => [ + 200 => [ 'schema' => [ - 'description' => '提示词攻击检测结果对象', + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'IsEnabled' => [ - 'description' => '提示词攻击配置开关'."\n" - .'0:关闭'."\n" - .'1:打开', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '1', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '2', - ], - ], - 'required' => false, - ], - ], - [ - 'name' => 'PromptAttackInfoList', - 'in' => 'query', - 'style' => 'json', - 'schema' => [ - 'description' => '提示词攻击列表', - 'type' => 'array', - 'items' => [ - 'description' => '提示词攻击列表', - 'type' => 'object', - 'properties' => [ - 'CategoryConfigId' => [ - 'description' => '有害分类配置ID', - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - 'example' => '1', - ], - 'CategoryLabel' => [ - 'description' => '分类名称', - 'type' => 'string', - 'required' => false, - 'example' => '角色扮演', - ], - 'IsEnabled' => [ - 'description' => '提示词攻击配置开关'."\n" - .'0:关闭'."\n" - .'1:打开', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '1', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '1', - ], - 'CategoryId' => [ - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, + 'Code' => ['description' => '状态码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'ModelCategoryInfoList' => [ + 'description' => '模型类别对象列表', + 'type' => 'array', + 'items' => [ + 'description' => '模型类别对象', + 'type' => 'object', + 'properties' => [ + 'ModelCategoryId' => ['description' => '模型类别Id', 'type' => 'integer', 'format' => 'int64', 'example' => '2'], + 'ModelCategoryName' => ['description' => '模型类别名称', 'type' => 'string', 'example' => 'Qwen2.5-3B-Intruct-PAI-Guard'], + 'ModelSource' => ['description' => '模型来源:1-PAI,2-其他', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'ContentSafeTextSupported' => ['description' => '是否支持文本内容安全检测', 'type' => 'integer', 'format' => 'int32', 'example' => 'True'], + 'ContentSafeImageSupported' => ['description' => '是否支持图片内容安全检测', 'type' => 'integer', 'format' => 'int32', 'example' => 'False'], + 'PromptAttackTextSupported' => ['description' => '是否支持文本提示词攻击检测', 'type' => 'integer', 'format' => 'int32', 'example' => 'False'], + 'SensitiveTopicTextSupported' => ['description' => '是否支持文本敏感主题检测', 'type' => 'integer', 'format' => 'int32', 'example' => 'True'], + 'Priority' => ['description' => '出方向规则的优先级。数字越小,优先级越高。', 'type' => 'integer', 'format' => 'int32', 'example' => '12'], + ], ], ], - 'required' => false, + 'HttpStatusCode' => ['description' => 'http状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '如有错误,返回错误信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '表示是否调用成功。true:调用成功。 false:调用失败。', 'type' => 'boolean', 'example' => 'True'], ], - 'required' => false, ], ], - [ - 'name' => 'TopicConfigInfoList', - 'in' => 'query', - 'style' => 'json', - 'schema' => [ - 'description' => '敏感主题列表', - 'type' => 'array', - 'items' => [ - 'description' => '敏感主题列表', - 'type' => 'object', - 'properties' => [ - 'TopicId' => [ - 'description' => '敏感主题Id', - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - 'example' => '3', - ], - 'InputOutputType' => [ - 'description' => '模型输入输出类型'."\n" - .'0:输入'."\n" - .'1:输出', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '0', - ], - 'CategoryType' => [ - 'description' => '0:文本'."\n" - .'1:图像', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '0', - ], - 'TopicName' => [ - 'description' => '主题名称', - 'type' => 'string', - 'required' => false, - 'example' => '业务敏感', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '1', - ], - ], - 'required' => false, + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"ModelCategoryInfoList\\": [\\n {\\n \\"ModelCategoryId\\": 2,\\n \\"ModelCategoryName\\": \\"Qwen2.5-3B-Intruct-PAI-Guard\\",\\n \\"ModelSource\\": 1,\\n \\"ContentSafeTextSupported\\": 0,\\n \\"ContentSafeImageSupported\\": 0,\\n \\"PromptAttackTextSupported\\": 0,\\n \\"SensitiveTopicTextSupported\\": 0,\\n \\"Priority\\": 12\\n }\\n ],\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => '查询模型类别列表', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:ListModelCategory', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], ], - 'required' => false, - ], - ], - [ - 'name' => 'EnableSensitiveInputCheck', - 'in' => 'query', - 'schema' => [ - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - ], - ], - [ - 'name' => 'EnableSensitiveOutputCheck', - 'in' => 'query', - 'schema' => [ - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - ], - ], - [ - 'name' => 'InputSafeAnswer', - 'in' => 'query', - 'schema' => [ - 'type' => 'string', - 'required' => false, ], ], + ], + ], + 'ListModelInstance' => [ + 'summary' => '查询模型实例列表。', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], + 'security' => [ [ - 'name' => 'InputSafeAnswerSwitch', - 'in' => 'query', - 'schema' => [ - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - ], + 'AK' => [], ], + ], + 'operationType' => 'readAndWrite', + 'systemTags' => [ + 'operationType' => 'get', + 'riskType' => 'none', + 'chargeType' => 'paid', + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], + ], + 'parameters' => [ [ - 'name' => 'OutputSafeAnswer', + 'name' => 'RegionId', 'in' => 'query', - 'schema' => [ - 'type' => 'string', - 'required' => false, - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], ], [ - 'name' => 'OutputSafeAnswerSwitch', + 'name' => 'PageNumber', 'in' => 'query', - 'schema' => [ - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - ], + 'schema' => ['description' => '页码,和请求中的PageNumber一致。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1'], ], [ - 'name' => 'IsSidecarPolicy', + 'name' => 'PageSize', 'in' => 'query', - 'schema' => [ - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - ], + 'schema' => ['description' => '分页大小,每页最多显示的返回结果数量。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '10'], ], [ - 'name' => 'ContentSafeModelInstanceId', + 'name' => 'EasServiceName', 'in' => 'query', - 'schema' => [ - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - ], + 'schema' => ['description' => 'EAS服务名称。', 'type' => 'string', 'required' => false, 'example' => 'rai_content_detection_model'], ], [ - 'name' => 'PromptAttackModelInstanceId', + 'name' => 'ModelSource', 'in' => 'query', - 'schema' => [ - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - ], + 'schema' => ['description' => '模型来源:1-PAI,2-其他', 'type' => 'string', 'required' => false, 'example' => '1'], ], [ - 'name' => 'SensitiveTopicModelInstanceId', + 'name' => 'IsSupportContentSafe', 'in' => 'query', - 'schema' => [ - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - ], + 'schema' => ['description' => '是否支持内容安全', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => 'True'], ], [ - 'name' => 'WorkspaceId', + 'name' => 'IsSupportPromptAttack', 'in' => 'query', - 'schema' => [ - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - ], + 'schema' => ['description' => '是否支持提示词攻击检测', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => 'False'], ], [ - 'name' => 'SensitiveWordList', + 'name' => 'IsSupportSensitiveTopic', 'in' => 'query', - 'style' => 'json', - 'schema' => [ - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'Word' => [ - 'type' => 'string', - 'required' => false, - ], - 'Label' => [ - 'type' => 'string', - 'required' => false, - ], - ], - 'required' => false, - ], - 'required' => false, - ], + 'schema' => ['description' => '是否支持敏感主题检测', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => 'True'], ], [ - 'name' => 'SensitiveConfigList', + 'name' => 'IsSidecarPolicy', 'in' => 'query', - 'style' => 'json', - 'schema' => [ - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'SensitiveConfigId' => [ - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - ], - 'ActionType' => [ - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - ], - 'IsEnabled' => [ - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - ], - ], - 'required' => false, - ], - 'required' => false, - ], + 'schema' => ['description' => '策略类型:0-公有云策略;1-sidecar策略', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1'], ], [ - 'name' => 'RegularExpressList', + 'name' => 'Order', 'in' => 'query', - 'style' => 'json', - 'schema' => [ - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'RegularExpressName' => [ - 'type' => 'string', - 'required' => false, - ], - 'RegularExpress' => [ - 'type' => 'string', - 'required' => false, - ], - 'ActionType' => [ - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - ], - ], - 'required' => false, - ], - 'required' => false, - ], + 'schema' => ['description' => '排序方式。取值范围如下:'."\n" + ."\n" + .'- asc(默认):升序'."\n" + ."\n" + .'- desc:降序', 'type' => 'string', 'required' => false, 'example' => 'asc'], ], [ - 'name' => 'SensitiveTopicList', + 'name' => 'SortBy', 'in' => 'query', - 'style' => 'json', - 'schema' => [ - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'TopicName' => [ - 'type' => 'string', - 'required' => false, - ], - 'TopicDefinition' => [ - 'type' => 'string', - 'required' => false, - ], - 'SecurityLevel' => [ - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - ], - 'CategoryType' => [ - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - ], - 'TopicExampleInfoList' => [ - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'Content' => [ - 'type' => 'string', - 'required' => false, - ], - 'ExampleType' => [ - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - ], - ], - 'required' => false, - ], - 'required' => false, - ], - ], - 'required' => false, - ], - 'required' => false, - ], + 'schema' => ['description' => '排序字段。', 'type' => 'string', 'required' => false, 'example' => 'GmtModified'], ], [ - 'name' => 'SceneType', + 'name' => 'WorkspaceId', 'in' => 'query', - 'schema' => [ - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - ], + 'schema' => ['description' => '工作空间ID。', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '643168'], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => '响应', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '状态码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'HttpStatusCode' => [ - 'description' => 'HTTP状态码。'."\n", - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '返回信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求ID', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '操作是否成功。true表示成功,false表示失败。', - 'type' => 'boolean', - 'example' => 'True', + 'Code' => ['description' => '结果码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'PageNumber' => ['description' => '页码,和请求中的PageNumber一致。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'PageSize' => ['description' => '分页大小,每页最多显示的返回结果数量。', 'type' => 'integer', 'format' => 'int32', 'example' => '10'], + 'TotalCount' => ['description' => '总数量', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'ModelInstanceInfoList' => [ + 'description' => '模型实例对象列表', + 'type' => 'array', + 'items' => [ + 'description' => '模型实例对象', + 'type' => 'object', + 'properties' => [ + 'ModelInstanceId' => ['description' => '模型实例Id', 'type' => 'integer', 'format' => 'int64', 'example' => '123'], + 'EasServiceName' => ['description' => 'EAS服务名称。', 'type' => 'string', 'example' => 'torch_rank_v1'], + 'ModelSource' => ['description' => '模型来源:1-PAI,2-其他', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'GmtModified' => ['description' => '修改时间。', 'type' => 'integer', 'format' => 'int64', 'example' => '1749450490000'], + 'IsSupportText' => ['description' => '是否支持文本', 'type' => 'boolean', 'example' => 'True'], + 'IsSupportImage' => ['description' => '是否支持图片', 'type' => 'boolean', 'example' => 'False'], + 'IsSupportContentSafe' => ['description' => '是否支持内容安全检测', 'type' => 'integer', 'format' => 'int32', 'example' => 'True'], + 'IsSupportPromptAttack' => ['description' => '是否支持提示词攻击检测', 'type' => 'integer', 'format' => 'int32', 'example' => 'False'], + 'IsSupportSensitiveTopic' => ['description' => '是否支持敏感主题检测', 'type' => 'integer', 'format' => 'int32', 'example' => 'True'], + 'WorkspaceId' => ['description' => '工作空间ID。', 'type' => 'integer', 'format' => 'int64', 'example' => '608226'], + ], + ], ], + 'HttpStatusCode' => ['description' => 'http状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '如有错误,返回错误信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '操作是否成功。true表示成功,false表示失败。', 'type' => 'boolean', 'example' => 'True'], + ], + ], + ], + ], + 'errorCodes' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"PageNumber\\": 1,\\n \\"PageSize\\": 10,\\n \\"TotalCount\\": 1,\\n \\"ModelInstanceInfoList\\": [\\n {\\n \\"ModelInstanceId\\": 123,\\n \\"EasServiceName\\": \\"torch_rank_v1\\",\\n \\"ModelSource\\": 1,\\n \\"GmtModified\\": 1749450490000,\\n \\"IsSupportText\\": true,\\n \\"IsSupportImage\\": true,\\n \\"IsSupportContentSafe\\": 0,\\n \\"IsSupportPromptAttack\\": 0,\\n \\"IsSupportSensitiveTopic\\": 0,\\n \\"WorkspaceId\\": 608226\\n }\\n ],\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => '查询模型实例列表', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:ListModelInstance', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => '更新检测策略', ], 'ListPolicy' => [ 'summary' => '查询检测策略列表。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', - ], + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -4614,116 +3013,63 @@ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], ], 'parameters' => [ [ 'name' => 'RegionId', 'in' => 'query', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'cn-shanghai', - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], ], [ 'name' => 'PageNumber', 'in' => 'query', - 'schema' => [ - 'description' => '页码。', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '1', - ], + 'schema' => ['description' => '页码。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1'], ], [ 'name' => 'PageSize', 'in' => 'query', - 'schema' => [ - 'description' => '分页大小,每页最多显示的返回结果数量。'."\n" - .'最大限制:100。', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '10', - ], + 'schema' => ['description' => '分页大小,每页最多显示的返回结果数量。'."\n" + .'最大限制:100。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '10'], ], [ 'name' => 'PolicyName', 'in' => 'query', - 'schema' => [ - 'description' => '检测策略名称。', - 'type' => 'string', - 'required' => false, - 'example' => '测试策略', - ], + 'schema' => ['description' => '检测策略名称。', 'type' => 'string', 'required' => false, 'example' => '测试策略'], ], [ 'name' => 'PolicyIdentifier', 'in' => 'query', - 'schema' => [ - 'description' => '策略标识。', - 'type' => 'string', - 'required' => false, - 'example' => 'x1bc5xgs4uhx', - ], + 'schema' => ['description' => '策略标识。', 'type' => 'string', 'required' => false, 'example' => 'x1bc5xgs4uhx'], ], [ 'name' => 'WorkspaceId', 'in' => 'query', - 'schema' => [ - 'description' => '工作空间ID。', - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - 'example' => '62****', - ], + 'schema' => ['description' => '工作空间ID。', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '62****'], ], [ 'name' => 'SortBy', 'in' => 'query', - 'schema' => [ - 'description' => '排序字段。', - 'type' => 'string', - 'required' => false, - 'example' => 'GmtModified', - ], + 'schema' => ['description' => '排序字段。', 'type' => 'string', 'required' => false, 'example' => 'GmtModified'], ], [ 'name' => 'Order', 'in' => 'query', - 'schema' => [ - 'description' => '排序方式。取值范围如下:'."\n" - ."\n" - .'- asc(默认):升序'."\n" - ."\n" - .'- desc:降序', - 'type' => 'string', - 'required' => false, - 'example' => 'asc', - ], + 'schema' => ['description' => '排序方式。取值范围如下:'."\n" + ."\n" + .'- asc(默认):升序'."\n" + ."\n" + .'- desc:降序', 'type' => 'string', 'required' => false, 'example' => 'asc'], ], [ 'name' => 'IsSidecarPolicy', 'in' => 'query', - 'schema' => [ - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - ], + 'schema' => ['type' => 'integer', 'format' => 'int32', 'required' => false, 'description' => ''], ], [ 'name' => 'SceneType', 'in' => 'query', - 'schema' => [ - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - ], + 'schema' => ['type' => 'integer', 'format' => 'int32', 'required' => false, 'description' => ''], ], ], 'responses' => [ @@ -4733,92 +3079,32 @@ 'description' => '响应。', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '状态码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'PageNumber' => [ - 'description' => '页码,和请求中的PageNumber一致。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'PageSize' => [ - 'description' => '分页大小,每页最多显示的返回结果数量。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '10', - ], - 'TotalCount' => [ - 'description' => '总数量。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], + 'Code' => ['description' => '状态码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'PageNumber' => ['description' => '页码,和请求中的PageNumber一致。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'PageSize' => ['description' => '分页大小,每页最多显示的返回结果数量。', 'type' => 'integer', 'format' => 'int32', 'example' => '10'], + 'TotalCount' => ['description' => '总数量。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], 'PolicyInfoList' => [ 'description' => '策略对象列表。', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ - 'PolicyId' => [ - 'description' => '标签策略ID。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '16', - ], - 'PolicyIdentifier' => [ - 'description' => '策略标识。', - 'type' => 'string', - 'example' => 'x1bc5xgs4uhx', - ], - 'PolicyName' => [ - 'description' => '权限策略名称。', - 'type' => 'string', - 'example' => '测试策略', - ], - 'GmtModified' => [ - 'description' => '修改时间。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1731204769000', - ], - 'IsSidecarPolicy' => [ - 'type' => 'integer', - 'format' => 'int32', - ], - 'SceneType' => [ - 'type' => 'integer', - 'format' => 'int32', - ], + 'PolicyId' => ['description' => '标签策略ID。', 'type' => 'integer', 'format' => 'int64', 'example' => '16'], + 'PolicyIdentifier' => ['description' => '策略标识。', 'type' => 'string', 'example' => 'x1bc5xgs4uhx'], + 'PolicyName' => ['description' => '权限策略名称。', 'type' => 'string', 'example' => '测试策略'], + 'GmtModified' => ['description' => '修改时间。', 'type' => 'integer', 'format' => 'int64', 'example' => '1731204769000'], + 'IsSidecarPolicy' => ['type' => 'integer', 'format' => 'int32', 'description' => ''], + 'SceneType' => ['type' => 'integer', 'format' => 'int32', 'description' => ''], ], + 'description' => '', ], ], - 'HttpStatusCode' => [ - 'description' => '错误码描述。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '如有错误,返回错误信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求ID。', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '表示是否调用成功。可能值:'."\n" - .'- True:调用成功。'."\n" - .'- False:调用失败。', - 'type' => 'boolean', - 'example' => 'True', - ], + 'HttpStatusCode' => ['description' => '错误码描述。', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '如有错误,返回错误信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求ID。', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '表示是否调用成功。可能值:'."\n" + .'- True:调用成功。'."\n" + .'- False:调用失败。', 'type' => 'boolean', 'example' => 'True'], ], ], ], @@ -4826,16 +3112,30 @@ 'errorCodes' => [], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"PageNumber\\": 1,\\n \\"PageSize\\": 10,\\n \\"TotalCount\\": 1,\\n \\"PolicyInfoList\\": [\\n {\\n \\"PolicyId\\": 16,\\n \\"PolicyIdentifier\\": \\"x1bc5xgs4uhx\\",\\n \\"PolicyName\\": \\"测试策略\\",\\n \\"GmtModified\\": 1731204769000,\\n \\"IsSidecarPolicy\\": 0,\\n \\"SceneType\\": 0\\n }\\n ],\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', 'title' => '查询检测策略列表', - ], - 'GetPolicyInfo' => [ - 'summary' => '查询检测策略详情', - 'methods' => [ - 'post', - 'get', + 'changeSet' => [ + ['createdAt' => '2025-10-16T03:11:06.000Z', 'description' => '请求参数发生变更、响应参数发生变更'], ], - 'schemes' => [ - 'https', + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:ListPolicy', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'ListTopic' => [ + 'summary' => '查询敏感主题列表', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -4846,487 +3146,119 @@ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], ], 'parameters' => [ [ 'name' => 'RegionId', 'in' => 'query', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'cn-shanghai', - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], ], [ - 'name' => 'PolicyId', + 'name' => 'PageNumber', 'in' => 'query', - 'schema' => [ - 'description' => '检测策略ID', - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - 'example' => '16', - ], + 'schema' => ['description' => '页码,和请求中的PageNumber一致。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1'], + ], + [ + 'name' => 'PageSize', + 'in' => 'query', + 'schema' => ['description' => '分页大小,每页最多显示的返回结果数量。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '10'], + ], + [ + 'name' => 'TopicName', + 'in' => 'query', + 'schema' => ['description' => '主题的名称。', 'type' => 'string', 'required' => false, 'example' => 'client_exposure_logs'], + ], + [ + 'name' => 'WorkspaceId', + 'in' => 'query', + 'schema' => ['description' => '工作空间ID。', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '643168'], + ], + [ + 'name' => 'SortBy', + 'in' => 'query', + 'schema' => ['description' => '排序字段。', 'type' => 'string', 'required' => false, 'example' => 'GmtModified'], + ], + [ + 'name' => 'Order', + 'in' => 'query', + 'schema' => ['description' => '排序方式。取值范围如下:'."\n" + ."\n" + .'- asc(默认):升序'."\n" + ."\n" + .'- desc:降序', 'type' => 'string', 'required' => false, 'example' => 'asc'], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => '响应', + 'description' => '响应对象', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '结果码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'PolicyIdentifier' => [ - 'description' => '策略标识', - 'type' => 'string', - 'example' => 'x1bc5xgs4uhx', - ], - 'PolicyName' => [ - 'description' => '检测策略名称。', - 'type' => 'string', - 'example' => '测试策略', - ], - 'WordGroupInfoList' => [ - 'description' => '关键词分组对象列表', - 'type' => 'array', - 'items' => [ - 'description' => '关键词分组对象', - 'type' => 'object', - 'properties' => [ - 'GroupId' => [ - 'description' => '关键词分组ID。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1', - ], - 'InputOutputType' => [ - 'description' => '模型输入输出类型'."\n" - .'0:输入'."\n" - .'1:输出', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'GroupName' => [ - 'description' => '关键词组名称', - 'type' => 'string', - 'example' => '测试分组', - ], - ], - ], - ], - 'HarmfulCategoryConfigInfoList' => [ - 'description' => '有害分类配置列表', - 'type' => 'array', - 'items' => [ - 'description' => '有害分类配置', - 'type' => 'object', - 'properties' => [ - 'CategoryConfigId' => [ - 'description' => '有害分类配置ID', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1', - ], - 'InputOutputType' => [ - 'description' => '模型输入输出类型'."\n" - .'0:输入'."\n" - .'1:输出', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'CategoryType' => [ - 'description' => '0:文本'."\n" - .'1:图像', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'CategoryLabel' => [ - 'description' => '分类名称', - 'type' => 'string', - 'example' => '伦理道德', - ], - 'IsEnabled' => [ - 'description' => '有害分类配置开关'."\n" - .'0:关闭'."\n" - .'1:打开', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'CategoryId' => [ - 'type' => 'integer', - 'format' => 'int64', - ], - ], - ], - ], - 'PromptAttackInfo' => [ - 'description' => '提示词攻击检测结果对象', - 'type' => 'object', - 'properties' => [ - 'IsEnabled' => [ - 'description' => '提示词攻击配置开关'."\n" - .'0:关闭'."\n" - .'1:打开', - 'type' => 'integer', - 'format' => 'int32', - 'example' => 'true', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - ], - ], - 'HttpStatusCode' => [ - 'description' => 'http状态码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '错误信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求ID', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '操作是否成功。true表示成功,false表示失败。', - 'type' => 'boolean', - 'example' => 'True', - ], - 'GmtModified' => [ - 'description' => '策略修改时间', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1634122349000', - ], - 'PromptAttackInfoList' => [ - 'description' => '提示词攻击列表', - 'type' => 'array', - 'items' => [ - 'description' => '提示词攻击列表', - 'type' => 'object', - 'properties' => [ - 'CategoryConfigId' => [ - 'description' => '有害分类配置ID', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1', - ], - 'CategoryLabel' => [ - 'description' => '分类名称', - 'type' => 'string', - 'example' => '角色扮演', - ], - 'IsEnabled' => [ - 'description' => '有害分类配置开关'."\n" - .'0:关闭'."\n" - .'1:打开', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'CategoryId' => [ - 'type' => 'integer', - 'format' => 'int64', - ], - ], - ], - ], - 'TopicConfigInfoList' => [ + 'Code' => ['description' => '状态码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'PageNumber' => ['description' => '页码,和请求中的PageNumber一致。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'PageSize' => ['description' => '分页大小,每页最多显示的返回结果数量。', 'type' => 'integer', 'format' => 'int32', 'example' => '10'], + 'TotalCount' => ['description' => '总数量。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'TopicInfoList' => [ 'description' => '敏感主题列表', 'type' => 'array', 'items' => [ - 'description' => '敏感主题列表', - 'type' => 'object', - 'properties' => [ - 'TopicId' => [ - 'description' => '敏感主题Id', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '3', - ], - 'InputOutputType' => [ - 'description' => '模型输入输出类型'."\n" - .'0:输入'."\n" - .'1:输出', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'CategoryType' => [ - 'description' => '0:文本'."\n" - .'1:图像', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - 'TopicName' => [ - 'description' => '主题名称', - 'type' => 'string', - 'example' => '业务敏感', - ], - 'SecurityLevel' => [ - 'description' => '安全等级'."\n" - .'0:低'."\n" - .'1:中'."\n" - .'2:高', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - ], - ], - ], - 'EnableSensitiveInputCheck' => [ - 'type' => 'integer', - 'format' => 'int32', - ], - 'EnableSensitiveOutputCheck' => [ - 'type' => 'integer', - 'format' => 'int32', - ], - 'SceneType' => [ - 'type' => 'integer', - 'format' => 'int32', - ], - 'InputSafeAnswer' => [ - 'type' => 'string', - ], - 'OutputSafeAnswer' => [ - 'type' => 'string', - ], - 'InputSafeAnswerSwitch' => [ - 'type' => 'integer', - 'format' => 'int32', - ], - 'OutputSafeAnswerSwitch' => [ - 'type' => 'integer', - 'format' => 'int32', - ], - 'IsSidecarPolicy' => [ - 'type' => 'integer', - 'format' => 'int32', - ], - 'ContentSafeModelInfo' => [ - 'type' => 'object', - 'properties' => [ - 'ModelInstanceId' => [ - 'type' => 'integer', - 'format' => 'int64', - ], - 'EasServiceName' => [ - 'type' => 'string', - ], - ], - ], - 'PromptAttackModelInfo' => [ - 'type' => 'object', - 'properties' => [ - 'ModelInstanceId' => [ - 'type' => 'integer', - 'format' => 'int64', - ], - 'EasServiceName' => [ - 'type' => 'string', - ], - ], - ], - 'SensitiveTopicModelInfo' => [ - 'type' => 'object', - 'properties' => [ - 'ModelInstanceId' => [ - 'type' => 'integer', - 'format' => 'int64', - ], - 'EasServiceName' => [ - 'type' => 'string', - ], - ], - ], - 'SensitiveWordList' => [ - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'Word' => [ - 'type' => 'string', - ], - 'Label' => [ - 'type' => 'string', - ], - 'InputOutputType' => [ - 'type' => 'integer', - 'format' => 'int32', - ], - ], - ], - ], - 'SensitiveConfigList' => [ - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'SensitiveConfigId' => [ - 'type' => 'integer', - 'format' => 'int64', - ], - 'SensitiveName' => [ - 'type' => 'string', - ], - 'ActionType' => [ - 'type' => 'integer', - 'format' => 'int32', - ], - 'MatchAndReplace' => [ - 'type' => 'string', - ], - 'IsEnabled' => [ - 'type' => 'integer', - 'format' => 'int32', - ], - 'InputOutputType' => [ - 'type' => 'integer', - 'format' => 'int32', - ], - ], - ], - ], - 'RegularExpressList' => [ - 'type' => 'array', - 'items' => [ - 'type' => 'object', - 'properties' => [ - 'RegularExpressId' => [ - 'type' => 'integer', - 'format' => 'int64', - ], - 'RegularExpressName' => [ - 'type' => 'string', - ], - 'RegularExpress' => [ - 'type' => 'string', - ], - 'ActionType' => [ - 'type' => 'integer', - 'format' => 'int32', - ], - 'MatchAndReplace' => [ - 'type' => 'string', - ], - 'InputOutputType' => [ - 'type' => 'integer', - 'format' => 'int32', - ], - 'IsEnabled' => [ - 'type' => 'integer', - 'format' => 'int32', - ], - ], - ], - ], - 'SensitiveTopicList' => [ - 'type' => 'array', - 'items' => [ + 'description' => '敏感主题对象', 'type' => 'object', 'properties' => [ - 'TopicId' => [ - 'type' => 'integer', - 'format' => 'int64', - ], - 'TopicName' => [ - 'type' => 'string', - ], - 'TopicDefinition' => [ - 'type' => 'string', - ], - 'TopicExampleInfoList' => [ + 'TopicId' => ['description' => '敏感主题Id', 'type' => 'integer', 'format' => 'int64', 'example' => '216'], + 'TopicName' => ['description' => '主题的名称。', 'type' => 'string', 'example' => '业务敏感'], + 'TopicDefinition' => ['description' => '敏感主题定义', 'type' => 'string', 'example' => '这里敏感主题描述'], + 'GmtModified' => ['description' => '修改时间。', 'type' => 'integer', 'format' => 'int64', 'example' => '1597738932000'], + 'PolicyInfoList' => [ + 'description' => '关联的策略对象列表。', 'type' => 'array', 'items' => [ + 'description' => '关联的策略对象列表。', 'type' => 'object', 'properties' => [ - 'Content' => [ - 'type' => 'string', - ], - 'ExampleType' => [ - 'type' => 'integer', - 'format' => 'int64', - ], + 'PolicyId' => ['description' => '策略ID。', 'type' => 'integer', 'format' => 'int64', 'example' => '412'], + 'PolicyIdentifier' => ['description' => '策略标识。', 'type' => 'string', 'example' => 'bqi1c3s99qx3'], + 'PolicyName' => ['description' => '策略名称。', 'type' => 'string', 'example' => '业务敏感策略'], ], ], ], - 'InputOutputType' => [ - 'type' => 'integer', - 'format' => 'int32', - ], - 'SecurityLevel' => [ - 'type' => 'integer', - 'format' => 'int32', - ], - 'CategoryType' => [ - 'type' => 'integer', - 'format' => 'int32', - ], ], ], ], + 'HttpStatusCode' => ['description' => '错误码描述', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '如有错误,返回错误信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求标识', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '表示是否调用成功。true:调用成功。 false:调用失败。', 'type' => 'boolean', 'example' => 'True'], ], ], ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"PolicyIdentifier\\": \\"x1bc5xgs4uhx\\",\\n \\"PolicyName\\": \\"测试策略\\",\\n \\"WordGroupInfoList\\": [\\n {\\n \\"GroupId\\": 1,\\n \\"InputOutputType\\": 0,\\n \\"GroupName\\": \\"测试分组\\"\\n }\\n ],\\n \\"HarmfulCategoryConfigInfoList\\": [\\n {\\n \\"CategoryConfigId\\": 1,\\n \\"InputOutputType\\": 0,\\n \\"CategoryType\\": 0,\\n \\"CategoryLabel\\": \\"伦理道德\\",\\n \\"IsEnabled\\": 1,\\n \\"SecurityLevel\\": 1,\\n \\"CategoryId\\": 0\\n }\\n ],\\n \\"PromptAttackInfo\\": {\\n \\"IsEnabled\\": 0,\\n \\"SecurityLevel\\": 1\\n },\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true,\\n \\"GmtModified\\": 1634122349000,\\n \\"PromptAttackInfoList\\": [\\n {\\n \\"CategoryConfigId\\": 1,\\n \\"CategoryLabel\\": \\"角色扮演\\",\\n \\"IsEnabled\\": 1,\\n \\"SecurityLevel\\": 1,\\n \\"CategoryId\\": 0\\n }\\n ],\\n \\"TopicConfigInfoList\\": [\\n {\\n \\"TopicId\\": 3,\\n \\"InputOutputType\\": 0,\\n \\"CategoryType\\": 0,\\n \\"TopicName\\": \\"业务敏感\\",\\n \\"SecurityLevel\\": 1\\n }\\n ],\\n \\"EnableSensitiveInputCheck\\": 0,\\n \\"EnableSensitiveOutputCheck\\": 0,\\n \\"SceneType\\": 0,\\n \\"InputSafeAnswer\\": \\"\\",\\n \\"OutputSafeAnswer\\": \\"\\",\\n \\"InputSafeAnswerSwitch\\": 0,\\n \\"OutputSafeAnswerSwitch\\": 0,\\n \\"IsSidecarPolicy\\": 0,\\n \\"ContentSafeModelInfo\\": {\\n \\"ModelInstanceId\\": 0,\\n \\"EasServiceName\\": \\"\\"\\n },\\n \\"PromptAttackModelInfo\\": {\\n \\"ModelInstanceId\\": 0,\\n \\"EasServiceName\\": \\"\\"\\n },\\n \\"SensitiveTopicModelInfo\\": {\\n \\"ModelInstanceId\\": 0,\\n \\"EasServiceName\\": \\"\\"\\n },\\n \\"SensitiveWordList\\": [\\n {\\n \\"Word\\": \\"\\",\\n \\"Label\\": \\"\\",\\n \\"InputOutputType\\": 0\\n }\\n ],\\n \\"SensitiveConfigList\\": [\\n {\\n \\"SensitiveConfigId\\": 0,\\n \\"SensitiveName\\": \\"\\",\\n \\"ActionType\\": 0,\\n \\"MatchAndReplace\\": \\"\\",\\n \\"IsEnabled\\": 0,\\n \\"InputOutputType\\": 0\\n }\\n ],\\n \\"RegularExpressList\\": [\\n {\\n \\"RegularExpressId\\": 0,\\n \\"RegularExpressName\\": \\"\\",\\n \\"RegularExpress\\": \\"\\",\\n \\"ActionType\\": 0,\\n \\"MatchAndReplace\\": \\"\\",\\n \\"InputOutputType\\": 0,\\n \\"IsEnabled\\": 0\\n }\\n ],\\n \\"SensitiveTopicList\\": [\\n {\\n \\"TopicId\\": 0,\\n \\"TopicName\\": \\"\\",\\n \\"TopicDefinition\\": \\"\\",\\n \\"TopicExampleInfoList\\": [\\n {\\n \\"Content\\": \\"\\",\\n \\"ExampleType\\": 0\\n }\\n ],\\n \\"InputOutputType\\": 0,\\n \\"SecurityLevel\\": 0,\\n \\"CategoryType\\": 0\\n }\\n ]\\n}","type":"json"}]', - 'title' => '查询检测策略详情', - ], - 'DeletePolicy' => [ - 'summary' => '删除检测策略', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"PageNumber\\": 1,\\n \\"PageSize\\": 10,\\n \\"TotalCount\\": 1,\\n \\"TopicInfoList\\": [\\n {\\n \\"TopicId\\": 216,\\n \\"TopicName\\": \\"业务敏感\\",\\n \\"TopicDefinition\\": \\"这里敏感主题描述\\",\\n \\"GmtModified\\": 1597738932000,\\n \\"PolicyInfoList\\": [\\n {\\n \\"PolicyId\\": 412,\\n \\"PolicyIdentifier\\": \\"bqi1c3s99qx3\\",\\n \\"PolicyName\\": \\"业务敏感策略\\"\\n }\\n ]\\n }\\n ],\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => '查询敏感主题列表', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:ListTopic', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'ListWordGroup' => [ + 'summary' => '查询关键词策略列表。', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -5337,89 +3269,118 @@ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], ], 'parameters' => [ [ 'name' => 'RegionId', 'in' => 'query', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'cn-shanghai', - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], ], [ - 'name' => 'PolicyIdList', + 'name' => 'PageNumber', 'in' => 'query', - 'style' => 'json', - 'schema' => [ - 'description' => '检测策略ID列表', - 'type' => 'array', - 'items' => [ - 'description' => '检测策略ID', - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - 'example' => '1', - ], - 'required' => false, - ], + 'schema' => ['description' => '页码。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1'], + ], + [ + 'name' => 'PageSize', + 'in' => 'query', + 'schema' => ['description' => '分页大小,每页最多显示的返回结果数量。'."\n" + .'最大限制:100。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '10'], + ], + [ + 'name' => 'GroupName', + 'in' => 'query', + 'schema' => ['description' => '关键词组名称。', 'type' => 'string', 'required' => false, 'example' => '测试分组'], + ], + [ + 'name' => 'WorkspaceId', + 'in' => 'query', + 'schema' => ['description' => '工作空间ID。', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '620***'], + ], + [ + 'name' => 'SortBy', + 'in' => 'query', + 'schema' => ['description' => '排序字段。', 'type' => 'string', 'required' => false, 'example' => 'GmtModified'], + ], + [ + 'name' => 'Order', + 'in' => 'query', + 'schema' => ['description' => '分页查询时,对指定的排序字段进行升序或降序。取值如下:'."\n" + .'* asc:升序。'."\n" + .'* desc :降序。', 'type' => 'string', 'required' => false, 'example' => 'asc'], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => '响应', + 'description' => '响应。', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '状态码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'HttpStatusCode' => [ - 'description' => '错误码描述', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '错误信息', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求ID', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '操作是否成功。true表示成功,false表示失败。', - 'type' => 'boolean', - 'example' => 'True', + 'Code' => ['description' => '状态码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'PageNumber' => ['description' => '页码。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'PageSize' => ['description' => '分页大小,每页最多显示的返回结果数量。'."\n" + .'最大限制:100。', 'type' => 'integer', 'format' => 'int32', 'example' => '10'], + 'TotalCount' => ['description' => '总数量。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'WordGroupInfoList' => [ + 'description' => '关键词分组对象列表。', + 'type' => 'array', + 'items' => [ + 'description' => '关键词分组对象。', + 'type' => 'object', + 'properties' => [ + 'GroupId' => ['description' => '关键词分组ID。', 'type' => 'integer', 'format' => 'int64', 'example' => '16'], + 'GroupName' => ['description' => '关键词组名称。', 'type' => 'string', 'example' => '测试分组'], + 'GmtModified' => ['description' => '策略修改时间。', 'type' => 'integer', 'format' => 'int64', 'example' => '1673578650000'], + 'PolicyInfoList' => [ + 'description' => '关联策略对象列表。', + 'type' => 'array', + 'items' => [ + 'description' => '关联策略对象。', + 'type' => 'object', + 'properties' => [ + 'PolicyId' => ['description' => '检测策略ID。', 'type' => 'integer', 'format' => 'int64', 'example' => '16'], + 'PolicyIdentifier' => ['description' => '策略标识。', 'type' => 'string', 'example' => 'mai934jhuekf'], + 'PolicyName' => ['description' => '检测策略名称。', 'type' => 'string', 'example' => '测试策略'], + ], + ], + ], + ], + ], ], + 'HttpStatusCode' => ['description' => 'HTTP状态码。', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '如有错误,返回错误信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求ID。', 'type' => 'string', 'example' => 'BE2558EC-A9EA-5276-ADB5-107B09CF3D11'], + 'Success' => ['description' => '是否调用成功:true:调用成功。 false:调用失败。', 'type' => 'boolean', 'example' => 'True'], ], ], ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => '删除检测策略', - ], - 'CreateWordGroup' => [ - 'summary' => '创建关键词策略', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"PageNumber\\": 1,\\n \\"PageSize\\": 10,\\n \\"TotalCount\\": 1,\\n \\"WordGroupInfoList\\": [\\n {\\n \\"GroupId\\": 16,\\n \\"GroupName\\": \\"测试分组\\",\\n \\"GmtModified\\": 1673578650000,\\n \\"PolicyInfoList\\": [\\n {\\n \\"PolicyId\\": 16,\\n \\"PolicyIdentifier\\": \\"mai934jhuekf\\",\\n \\"PolicyName\\": \\"测试策略\\"\\n }\\n ]\\n }\\n ],\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"BE2558EC-A9EA-5276-ADB5-107B09CF3D11\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => '查询关键词策略列表', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:ListWordGroup', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'ModelInputContentAsyncDetect' => [ + 'summary' => '对模型的输入内容进行异步检测,通过任务标识异步获取检测结果', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -5430,53 +3391,29 @@ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], ], 'parameters' => [ [ 'name' => 'RegionId', 'in' => 'query', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'cn-shanghai', - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], ], [ - 'name' => 'GroupName', + 'name' => 'SceneName', 'in' => 'query', - 'schema' => [ - 'description' => '关键词组名称', - 'type' => 'string', - 'required' => false, - 'example' => '测试分组', - ], + 'schema' => ['description' => '场景名称。', 'type' => 'string', 'required' => false, 'example' => '""'], ], [ - 'name' => 'Commit', + 'name' => 'ServiceName', 'in' => 'query', - 'schema' => [ - 'description' => '是否提交。'."\n" - .'false:不实际保存,仅检查'."\n" - .'true:提交保存', - 'type' => 'boolean', - 'required' => false, - 'example' => 'true', - ], + 'schema' => ['description' => '服务名称', 'type' => 'string', 'required' => false, 'example' => 'textDetection'."\n" + .'imageDetection'], ], [ - 'name' => 'WorkspaceId', + 'name' => 'PolicyIdentifier', 'in' => 'query', - 'schema' => [ - 'description' => '工作空间ID', - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - 'example' => '643168', - ], + 'schema' => ['description' => '策略ID', 'type' => 'string', 'required' => false, 'example' => 'x1bc5xgs4uhx'], ], [ 'name' => 'BodyData', @@ -5486,30 +3423,8 @@ 'description' => '请求对象', 'type' => 'object', 'properties' => [ - 'WordInfoList' => [ - 'description' => '关键词分组列表', - 'type' => 'array', - 'items' => [ - 'description' => '关键词对象', - 'type' => 'object', - 'properties' => [ - 'Word' => [ - 'description' => '关键词', - 'type' => 'string', - 'required' => false, - 'example' => '投资', - ], - 'Label' => [ - 'description' => '标签', - 'type' => 'string', - 'required' => false, - 'example' => '业务敏感', - ], - ], - 'required' => false, - ], - 'required' => false, - ], + 'Content' => ['description' => '1. 要审核的文本内容,最大限制10000个字符。(包括英文和中文)'."\n" + .'2. 或者要审核的图片URL地址', 'type' => 'string', 'required' => false, 'example' => '要检测的内容'], ], 'required' => false, ], @@ -5522,86 +3437,40 @@ 'description' => '响应', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '状态码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'WordErrorInfoList' => [ - 'description' => '错误信息列表', - 'type' => 'array', - 'items' => [ - 'description' => '错误信息', - 'type' => 'object', - 'properties' => [ - 'Index' => [ - 'description' => '错误信息在数组中的位置。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1', - ], - 'Word' => [ - 'description' => '关键词', - 'type' => 'string', - 'example' => '投资', - ], - 'Label' => [ - 'description' => '标签', - 'type' => 'string', - 'example' => '业务敏感', - ], - 'ErrorStatus' => [ - 'description' => '错误状态信息。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'ErrorMessage' => [ - 'description' => '错误信息描述', - 'type' => 'string', - 'example' => '关键词不能为空', - ], - ], - ], - ], - 'HttpStatusCode' => [ - 'description' => 'HTTP状态码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '如有错误,返回错误信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求ID', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '表示是否调用成功。true:调用成功。 false:调用失败。', - 'type' => 'boolean', - 'example' => 'True', - ], + 'Code' => ['description' => '结果码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'TaskId' => ['description' => '任务ID。', 'type' => 'string', 'example' => '5d85cd38-03b2-49fd-86b2-be85c4b13215'], + 'HttpStatusCode' => ['description' => 'http状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '错误信息', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求ID', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '操作是否成功。true表示成功,false表示失败。', 'type' => 'boolean', 'example' => 'True'], ], ], ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"WordErrorInfoList\\": [\\n {\\n \\"Index\\": 1,\\n \\"Word\\": \\"投资\\",\\n \\"Label\\": \\"业务敏感\\",\\n \\"ErrorStatus\\": 1,\\n \\"ErrorMessage\\": \\"关键词不能为空\\"\\n }\\n ],\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => '创建关键词策略', - ], - 'UpdateWordGroup' => [ - 'summary' => '更新关键词策略。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"TaskId\\": \\"5d85cd38-03b2-49fd-86b2-be85c4b13215\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => '模型输入内容异步检测', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:ModelInputContentAsyncDetect', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'ModelInputContentSyncDetect' => [ + 'summary' => '对模型的输入内容进行同步检测,同步获取检测结果', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -5612,96 +3481,40 @@ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], ], 'parameters' => [ [ 'name' => 'RegionId', 'in' => 'query', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'cn-shanghai', - ], - ], - [ - 'name' => 'GroupId', - 'in' => 'query', - 'schema' => [ - 'description' => '关键词分组ID。', - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - 'example' => '1', - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], ], [ - 'name' => 'GroupName', + 'name' => 'SceneName', 'in' => 'query', - 'schema' => [ - 'description' => '关键词组名称。', - 'type' => 'string', - 'required' => false, - 'example' => '测试分组', - ], + 'schema' => ['description' => '场景名称。', 'type' => 'string', 'required' => false, 'example' => '""'], ], [ - 'name' => 'WordInfoListModified', + 'name' => 'ServiceName', 'in' => 'query', - 'schema' => [ - 'description' => '关键词信息是否被修改。', - 'type' => 'boolean', - 'required' => false, - 'example' => 'true', - ], + 'schema' => ['description' => '服务名称', 'type' => 'string', 'required' => false, 'example' => 'textDetection'."\n" + .'imageDetection'], ], [ - 'name' => 'Commit', + 'name' => 'PolicyIdentifier', 'in' => 'query', - 'schema' => [ - 'description' => '是否提交。'."\n" - .'false:不实际保存,仅检查'."\n" - .'true:提交保存', - 'type' => 'boolean', - 'required' => false, - 'example' => 'true', - ], + 'schema' => ['description' => '策略ID', 'type' => 'string', 'required' => false, 'example' => 'x1bc5xgs4uhx'], ], [ 'name' => 'BodyData', 'in' => 'formData', 'style' => 'json', 'schema' => [ - 'description' => '请求对象。', + 'description' => '请求对象', 'type' => 'object', 'properties' => [ - 'WordInfoList' => [ - 'description' => '关键词分组列表。', - 'type' => 'array', - 'items' => [ - 'description' => '关键词分组。', - 'type' => 'object', - 'properties' => [ - 'Word' => [ - 'description' => '关键词。', - 'type' => 'string', - 'required' => false, - 'example' => '投资', - ], - 'Label' => [ - 'description' => '标签。', - 'type' => 'string', - 'required' => false, - 'example' => '业务敏感', - ], - ], - 'required' => false, - ], - 'required' => false, - ], + 'Content' => ['description' => '1. 要审核的文本内容,最大限制10000个字符。(包括英文和中文)'."\n" + .'2. 或者要审核的图片URL地址', 'type' => 'string', 'required' => false, 'example' => '要检测的内容'."\n"], ], 'required' => false, ], @@ -5711,89 +3524,199 @@ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => '返回结果。', + 'description' => '响应', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '状态码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'WordErrorInfoList' => [ - 'description' => '错误信息列表。', - 'type' => 'array', - 'items' => [ - 'description' => '错误信息列表。', - 'type' => 'object', - 'properties' => [ - 'Index' => [ - 'description' => '错误信息在数组中的位置。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1', + 'Code' => ['description' => '结果码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'TraceInfo' => [ + 'description' => '检查结果', + 'type' => 'object', + 'properties' => [ + 'BlockWord' => [ + 'description' => '检测关键词', + 'type' => 'object', + 'properties' => [ + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'BlockWordGroupInfoList' => [ + 'description' => '关键词检测结果对象列表', + 'type' => 'array', + 'items' => [ + 'description' => '关键词检测结果对象', + 'type' => 'object', + 'properties' => [ + 'GroupName' => ['description' => '关键词组名称', 'type' => 'string', 'example' => '测试分组'], + 'BlockWordList' => [ + 'description' => '关键词检测结果列表', + 'type' => 'array', + 'items' => [ + 'description' => '关键词检测结果', + 'type' => 'object', + 'properties' => [ + 'Word' => ['description' => '关键词', 'type' => 'string', 'example' => '测试关键词'], + 'WordLabel' => ['description' => '标签', 'type' => 'string', 'example' => '测试标签'], + ], + ], + ], + ], + ], + ], ], - 'Word' => [ - 'description' => '关键词。', - 'type' => 'string', - 'example' => '投资', + ], + 'HarmfulCategories' => [ + 'description' => '有害分类结果对象列表', + 'type' => 'object', + 'properties' => [ + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'ConfidenceScore' => ['description' => '置信度', 'type' => 'number', 'format' => 'double', 'example' => '0.0'], + 'HarmfulCategoryInfoList' => [ + 'description' => '有害分类对象列表', + 'type' => 'array', + 'items' => [ + 'description' => '有害分类检测结果对象', + 'type' => 'object', + 'properties' => [ + 'CategoryType' => ['description' => '0:文本'."\n" + .'1:图像', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'CategoryLabel' => ['description' => '分类名称', 'type' => 'string', 'example' => '伦理道德'], + 'SubCategoryLabel' => ['description' => '二级分类标签', 'type' => 'string', 'example' => '不良行为'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + ], + ], + ], ], - 'Label' => [ - 'description' => '标签。', - 'type' => 'string', - 'example' => '业务敏感', + ], + 'PromptAttack' => [ + 'description' => '提示词攻击信息', + 'type' => 'object', + 'properties' => [ + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'PromptAttackInfo' => ['description' => '提示词攻击检测结果对象', 'type' => 'string', 'example' => '角色扮演'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'ConfidenceScore' => ['description' => '置信度', 'type' => 'number', 'format' => 'double', 'example' => '0.0'], + 'PromptAttackInfoList' => [ + 'description' => '提示词攻击列表', + 'type' => 'array', + 'items' => [ + 'description' => '提示词攻击对象', + 'type' => 'object', + 'properties' => [ + 'CategoryType' => ['description' => '0:文本'."\n" + .'1:图像', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'CategoryLabel' => ['description' => '分类名称', 'type' => 'string', 'example' => '角色扮演'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + ], + ], + ], ], - 'ErrorStatus' => [ - 'description' => '错误状态信息。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', + ], + 'DenyTopics' => [ + 'description' => '敏感主题对象列表', + 'type' => 'object', + 'properties' => [ + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'ConfidenceScore' => ['description' => '置信度', 'type' => 'number', 'format' => 'double', 'example' => '0.0'], + 'TopicInfoList' => [ + 'description' => '敏感主题列表', + 'type' => 'array', + 'items' => [ + 'description' => '敏感主题列表', + 'type' => 'object', + 'properties' => [ + 'CategoryType' => ['description' => '0:文本'."\n" + .'1:图像', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'TopicName' => ['description' => '主题名称', 'type' => 'string', 'example' => '业务敏感'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + ], + ], + ], ], - 'ErrorMessage' => [ - 'description' => '错误信息描述。', - 'type' => 'string', - 'example' => '关键词冲突', + ], + 'SensitiveType' => [ + 'type' => 'object', + 'properties' => [ + 'RiskResult' => ['type' => 'integer', 'format' => 'int32', 'description' => ''], + 'MaskedContent' => ['type' => 'string', 'description' => ''], + 'SensitiveTypeInfoList' => [ + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'SensitiveTypeName' => ['type' => 'string', 'description' => ''], + 'SensitiveCategory' => ['type' => 'integer', 'format' => 'int32', 'description' => ''], + 'SensitiveContent' => ['type' => 'string', 'description' => ''], + 'MaskedContent' => ['type' => 'string', 'description' => ''], + 'ActionType' => ['type' => 'integer', 'format' => 'int32', 'description' => ''], + ], + 'description' => '', + ], + 'description' => '', + ], ], + 'description' => '', ], ], ], - 'HttpStatusCode' => [ - 'description' => 'HTTP状态码。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '如有错误,返回错误信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求ID。', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '是否成功。', - 'type' => 'boolean', - 'example' => 'True', - ], + 'HttpStatusCode' => ['description' => 'Http状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '错误信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求ID', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '操作是否成功。true表示成功,false表示失败。', 'type' => 'boolean', 'example' => 'True'], + 'SafeAnswer' => ['type' => 'string', 'description' => ''], ], ], ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"WordErrorInfoList\\": [\\n {\\n \\"Index\\": 1,\\n \\"Word\\": \\"投资\\",\\n \\"Label\\": \\"业务敏感\\",\\n \\"ErrorStatus\\": 1,\\n \\"ErrorMessage\\": \\"关键词冲突\\"\\n }\\n ],\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => '更新关键词策略', - ], - 'ListWordGroup' => [ - 'summary' => '查询关键词策略列表。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"RiskResult\\": 0,\\n \\"TraceInfo\\": {\\n \\"BlockWord\\": {\\n \\"RiskResult\\": 0,\\n \\"BlockWordGroupInfoList\\": [\\n {\\n \\"GroupName\\": \\"测试分组\\",\\n \\"BlockWordList\\": [\\n {\\n \\"Word\\": \\"测试关键词\\",\\n \\"WordLabel\\": \\"测试标签\\"\\n }\\n ]\\n }\\n ]\\n },\\n \\"HarmfulCategories\\": {\\n \\"RiskResult\\": 0,\\n \\"ConfidenceScore\\": 0,\\n \\"HarmfulCategoryInfoList\\": [\\n {\\n \\"CategoryType\\": 0,\\n \\"CategoryLabel\\": \\"伦理道德\\",\\n \\"SubCategoryLabel\\": \\"不良行为\\",\\n \\"SecurityLevel\\": 1,\\n \\"RiskResult\\": 0\\n }\\n ]\\n },\\n \\"PromptAttack\\": {\\n \\"RiskResult\\": 0,\\n \\"PromptAttackInfo\\": \\"角色扮演\\",\\n \\"SecurityLevel\\": 1,\\n \\"ConfidenceScore\\": 0,\\n \\"PromptAttackInfoList\\": [\\n {\\n \\"CategoryType\\": 0,\\n \\"CategoryLabel\\": \\"角色扮演\\",\\n \\"SecurityLevel\\": 1,\\n \\"RiskResult\\": 0\\n }\\n ]\\n },\\n \\"DenyTopics\\": {\\n \\"RiskResult\\": 1,\\n \\"ConfidenceScore\\": 0,\\n \\"TopicInfoList\\": [\\n {\\n \\"CategoryType\\": 0,\\n \\"TopicName\\": \\"业务敏感\\",\\n \\"SecurityLevel\\": 0,\\n \\"RiskResult\\": 0\\n }\\n ]\\n },\\n \\"SensitiveType\\": {\\n \\"RiskResult\\": 0,\\n \\"MaskedContent\\": \\"\\",\\n \\"SensitiveTypeInfoList\\": [\\n {\\n \\"SensitiveTypeName\\": \\"\\",\\n \\"SensitiveCategory\\": 0,\\n \\"SensitiveContent\\": \\"\\",\\n \\"MaskedContent\\": \\"\\",\\n \\"ActionType\\": 0\\n }\\n ]\\n }\\n },\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true,\\n \\"SafeAnswer\\": \\"\\"\\n}","type":"json"}]', + 'title' => '模型输入内容同步检测', + 'changeSet' => [ + ['createdAt' => '2025-10-16T03:11:06.000Z', 'description' => '响应参数发生变更'], + ['createdAt' => '2025-08-06T10:35:02.000Z', 'description' => '响应参数发生变更'], + ['createdAt' => '2025-06-12T08:56:27.000Z', 'description' => '响应参数发生变更'], + ], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:ModelInputContentSyncDetect', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'ModelOutputContentAsyncDetect' => [ + 'summary' => '对模型的输出内容进行异步检测,通过任务标识异步获取检测结果', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -5804,85 +3727,42 @@ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], ], 'parameters' => [ [ 'name' => 'RegionId', 'in' => 'query', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'cn-shanghai', - ], - ], - [ - 'name' => 'PageNumber', - 'in' => 'query', - 'schema' => [ - 'description' => '页码。', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '1', - ], - ], - [ - 'name' => 'PageSize', - 'in' => 'query', - 'schema' => [ - 'description' => '分页大小,每页最多显示的返回结果数量。'."\n" - .'最大限制:100。', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '10', - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], ], [ - 'name' => 'GroupName', + 'name' => 'SceneName', 'in' => 'query', - 'schema' => [ - 'description' => '关键词组名称。', - 'type' => 'string', - 'required' => false, - 'example' => '测试分组', - ], + 'schema' => ['description' => '场景名称。', 'type' => 'string', 'required' => false, 'example' => '""'], ], [ - 'name' => 'WorkspaceId', + 'name' => 'ServiceName', 'in' => 'query', - 'schema' => [ - 'description' => '工作空间ID。', - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - 'example' => '620***', - ], + 'schema' => ['description' => '服务名称', 'type' => 'string', 'required' => false, 'example' => 'textDetection'."\n" + .'imageDetection'], ], [ - 'name' => 'SortBy', + 'name' => 'PolicyIdentifier', 'in' => 'query', - 'schema' => [ - 'description' => '排序字段。', - 'type' => 'string', - 'required' => false, - 'example' => 'GmtModified', - ], + 'schema' => ['description' => '策略ID', 'type' => 'string', 'required' => false, 'example' => 'x1bc5xgs4uhx'], ], [ - 'name' => 'Order', - 'in' => 'query', + 'name' => 'BodyData', + 'in' => 'formData', + 'style' => 'json', 'schema' => [ - 'description' => '分页查询时,对指定的排序字段进行升序或降序。取值如下:'."\n" - .'* asc:升序。'."\n" - .'* desc :降序。', - 'type' => 'string', + 'description' => '请求对象', + 'type' => 'object', + 'properties' => [ + 'Content' => ['description' => '1. 要审核的文本内容,最大限制10000个字符。(包括英文和中文)'."\n" + .'2. 或者要审核的图片URL地址', 'type' => 'string', 'required' => false, 'example' => '要检测的内容'], + ], 'required' => false, - 'example' => 'asc', ], ], ], @@ -5890,124 +3770,43 @@ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => '响应。', + 'description' => '响应', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '状态码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'PageNumber' => [ - 'description' => '页码。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'PageSize' => [ - 'description' => '分页大小,每页最多显示的返回结果数量。'."\n" - .'最大限制:100。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '10', - ], - 'TotalCount' => [ - 'description' => '总数量。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'WordGroupInfoList' => [ - 'description' => '关键词分组对象列表。', - 'type' => 'array', - 'items' => [ - 'description' => '关键词分组对象。', - 'type' => 'object', - 'properties' => [ - 'GroupId' => [ - 'description' => '关键词分组ID。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '16', - ], - 'GroupName' => [ - 'description' => '关键词组名称。', - 'type' => 'string', - 'example' => '测试分组', - ], - 'GmtModified' => [ - 'description' => '策略修改时间。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1673578650000', - ], - 'PolicyInfoList' => [ - 'description' => '关联策略对象列表。', - 'type' => 'array', - 'items' => [ - 'description' => '关联策略对象。', - 'type' => 'object', - 'properties' => [ - 'PolicyId' => [ - 'description' => '检测策略ID。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '16', - ], - 'PolicyIdentifier' => [ - 'description' => '策略标识。', - 'type' => 'string', - 'example' => 'mai934jhuekf', - ], - 'PolicyName' => [ - 'description' => '检测策略名称。', - 'type' => 'string', - 'example' => '测试策略', - ], - ], - ], - ], - ], - ], - ], - 'HttpStatusCode' => [ - 'description' => 'HTTP状态码。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '如有错误,返回错误信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求ID。', - 'type' => 'string', - 'example' => 'BE2558EC-A9EA-5276-ADB5-107B09CF3D11', - ], - 'Success' => [ - 'description' => '是否调用成功:true:调用成功。 false:调用失败。', - 'type' => 'boolean', - 'example' => 'True', - ], + 'Code' => ['description' => '状态码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'TaskId' => ['description' => '任务ID。', 'type' => 'string', 'example' => '5d85cd38-03b2-49fd-86b2-be85c4b13215'], + 'HttpStatusCode' => ['description' => 'http状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '错误信息', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求ID', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '操作是否成功。true表示成功,false表示失败。', 'type' => 'boolean', 'example' => 'True'], ], ], ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"PageNumber\\": 1,\\n \\"PageSize\\": 10,\\n \\"TotalCount\\": 1,\\n \\"WordGroupInfoList\\": [\\n {\\n \\"GroupId\\": 16,\\n \\"GroupName\\": \\"测试分组\\",\\n \\"GmtModified\\": 1673578650000,\\n \\"PolicyInfoList\\": [\\n {\\n \\"PolicyId\\": 16,\\n \\"PolicyIdentifier\\": \\"mai934jhuekf\\",\\n \\"PolicyName\\": \\"测试策略\\"\\n }\\n ]\\n }\\n ],\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"BE2558EC-A9EA-5276-ADB5-107B09CF3D11\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => '查询关键词策略列表', - ], - 'GetWordGroup' => [ - 'summary' => '查询关键词策略详情。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"TaskId\\": \\"5d85cd38-03b2-49fd-86b2-be85c4b13215\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => '模型输出内容异步检测', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:ModelOutputContentAsyncDetect', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'ModelOutputContentSyncDetect' => [ + 'summary' => '对模型的输出内容进行同步检测,同步获取检测结果', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -6018,30 +3817,42 @@ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], ], 'parameters' => [ [ 'name' => 'RegionId', 'in' => 'query', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'cn-shanghai', - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], ], [ - 'name' => 'GroupId', + 'name' => 'SceneName', 'in' => 'query', + 'schema' => ['description' => '场景名称。', 'type' => 'string', 'required' => false, 'example' => '""'], + ], + [ + 'name' => 'ServiceName', + 'in' => 'query', + 'schema' => ['description' => '服务名称', 'type' => 'string', 'required' => false, 'example' => 'textDetection'."\n" + .'imageDetection'], + ], + [ + 'name' => 'PolicyIdentifier', + 'in' => 'query', + 'schema' => ['description' => '策略ID', 'type' => 'string', 'required' => false, 'example' => 'x1bc5xgs4uhx'], + ], + [ + 'name' => 'BodyData', + 'in' => 'formData', + 'style' => 'json', 'schema' => [ - 'description' => '关键词分组ID。', - 'type' => 'integer', - 'format' => 'int64', + 'description' => '请求对象', + 'type' => 'object', + 'properties' => [ + 'Content' => ['description' => '1. 要审核的文本内容,最大限制10000个字符。(包括英文和中文)'."\n" + .'2. 或者要审核的图片URL地址', 'type' => 'string', 'required' => false, 'example' => '要检测的内容'], + ], 'required' => false, - 'example' => '1', ], ], ], @@ -6049,184 +3860,267 @@ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => '响应。', + 'description' => '响应', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '状态码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'GroupName' => [ - 'description' => '关键词组名称。', - 'type' => 'string', - 'example' => '测试分组', - ], - 'TotalCount' => [ - 'description' => '总数量。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'WordInfoList' => [ - 'description' => '关键词分组列表。', - 'type' => 'array', - 'items' => [ - 'description' => '关键词分组。', - 'type' => 'object', - 'properties' => [ - 'WordId' => [ - 'description' => '新增成功的词ID。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1', + 'Code' => ['description' => '状态码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'RiskInfo' => ['description' => '风险标签,如有多个逗号分割', 'type' => 'string', 'example' => '“”'], + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'TraceInfo' => [ + 'description' => '检查结果', + 'type' => 'object', + 'properties' => [ + 'BlockWord' => [ + 'description' => '检测关键词', + 'type' => 'object', + 'properties' => [ + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'BlockWordGroupInfoList' => [ + 'description' => '关键词检测结果对象列表', + 'type' => 'array', + 'items' => [ + 'description' => '关键词检测结果对象', + 'type' => 'object', + 'properties' => [ + 'GroupName' => ['description' => '关键词组名称', 'type' => 'string', 'example' => '测试分组'], + 'BlockWordList' => [ + 'description' => '关键词检测结果对象列表', + 'type' => 'array', + 'items' => [ + 'description' => '关键词检测结果列表', + 'type' => 'object', + 'properties' => [ + 'Word' => ['description' => '关键词', 'type' => 'string', 'example' => '测试关键词'], + 'WordLabel' => ['description' => '标签', 'type' => 'string', 'example' => '测试标签'], + ], + ], + ], + ], + ], + ], + ], + ], + 'HarmfulCategories' => [ + 'description' => '有害分类结果对象列表', + 'type' => 'object', + 'properties' => [ + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'ConfidenceScore' => ['description' => '置信度', 'type' => 'number', 'format' => 'double', 'example' => '0.0'], + 'HarmfulCategoryInfoList' => [ + 'description' => '有害分类对象列表', + 'type' => 'array', + 'items' => [ + 'description' => '有害分类对象列表', + 'type' => 'object', + 'properties' => [ + 'CategoryType' => ['description' => '0:文本'."\n" + .'1:图像', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'CategoryLabel' => ['description' => '分类名称', 'type' => 'string', 'example' => '伦理道德'], + 'SubCategoryLabel' => ['description' => '二级分类标签', 'type' => 'string', 'example' => '不良行为'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + ], + ], + ], + ], + ], + 'PromptAttack' => [ + 'description' => '提示词攻击信息', + 'type' => 'object', + 'properties' => [ + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'PromptAttackInfo' => ['description' => '提示词攻击检测结果对象', 'type' => 'string', 'example' => '角色扮演'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'ConfidenceScore' => ['description' => '置信度', 'type' => 'number', 'format' => 'double', 'example' => '0.0'], + 'PromptAttackInfoList' => [ + 'description' => '提示词攻击列表', + 'type' => 'array', + 'items' => [ + 'description' => '提示词攻击列表', + 'type' => 'object', + 'properties' => [ + 'CategoryType' => ['description' => '0:文本'."\n" + .'1:图像', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'CategoryLabel' => ['description' => '分类名称', 'type' => 'string', 'example' => '角色扮演'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + ], + ], + ], ], - 'Word' => [ - 'description' => '关键词。', - 'type' => 'string', - 'example' => '投资', + ], + 'DenyTopics' => [ + 'description' => '敏感主题对象列表', + 'type' => 'object', + 'properties' => [ + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'ConfidenceScore' => ['description' => '置信度', 'type' => 'number', 'format' => 'double', 'example' => '0.0'], + 'TopicInfoList' => [ + 'description' => '敏感主题列表', + 'type' => 'array', + 'items' => [ + 'description' => '敏感主题列表', + 'type' => 'object', + 'properties' => [ + 'CategoryType' => ['description' => '0:文本'."\n" + .'1:图像', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'TopicName' => ['description' => '主题名称', 'type' => 'string', 'example' => '业务敏感'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'example' => '0'], + 'RiskResult' => ['description' => '0: 无风险'."\n" + .'1:存在风险', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + ], + ], + ], ], - 'Label' => [ - 'description' => '标签。', - 'type' => 'string', - 'example' => '业务敏感', + ], + 'SensitiveType' => [ + 'type' => 'object', + 'properties' => [ + 'RiskResult' => ['type' => 'integer', 'format' => 'int32', 'description' => ''], + 'MaskedContent' => ['type' => 'string', 'description' => ''], + 'SensitiveTypeInfoList' => [ + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'SensitiveTypeName' => ['type' => 'string', 'description' => ''], + 'SensitiveCategory' => ['type' => 'integer', 'format' => 'int32', 'description' => ''], + 'SensitiveContent' => ['type' => 'string', 'description' => ''], + 'MaskedContent' => ['type' => 'string', 'description' => ''], + 'ActionType' => ['type' => 'integer', 'format' => 'int32', 'description' => ''], + ], + 'description' => '', + ], + 'description' => '', + ], ], + 'description' => '', ], ], ], - 'HttpStatusCode' => [ - 'description' => 'HTTP状态码。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '如有错误,返回错误信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求ID', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '是否成功。', - 'type' => 'boolean', - 'example' => 'True', - ], + 'HttpStatusCode' => ['description' => 'HTTP状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '错误信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求ID', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '操作是否成功。true表示成功,false表示失败。', 'type' => 'boolean', 'example' => 'True'], + 'SafeAnswer' => ['type' => 'string', 'description' => ''], ], ], ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"GroupName\\": \\"测试分组\\",\\n \\"TotalCount\\": 1,\\n \\"WordInfoList\\": [\\n {\\n \\"WordId\\": 1,\\n \\"Word\\": \\"投资\\",\\n \\"Label\\": \\"业务敏感\\"\\n }\\n ],\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => '查询关键词策略详情', - ], - 'DeleteWordGroup' => [ - 'summary' => '删除关键词策略。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"RiskInfo\\": \\"“”\\",\\n \\"RiskResult\\": 0,\\n \\"TraceInfo\\": {\\n \\"BlockWord\\": {\\n \\"RiskResult\\": 0,\\n \\"BlockWordGroupInfoList\\": [\\n {\\n \\"GroupName\\": \\"测试分组\\",\\n \\"BlockWordList\\": [\\n {\\n \\"Word\\": \\"测试关键词\\",\\n \\"WordLabel\\": \\"测试标签\\"\\n }\\n ]\\n }\\n ]\\n },\\n \\"HarmfulCategories\\": {\\n \\"RiskResult\\": 0,\\n \\"ConfidenceScore\\": 0,\\n \\"HarmfulCategoryInfoList\\": [\\n {\\n \\"CategoryType\\": 0,\\n \\"CategoryLabel\\": \\"伦理道德\\",\\n \\"SubCategoryLabel\\": \\"不良行为\\",\\n \\"SecurityLevel\\": 1,\\n \\"RiskResult\\": 0\\n }\\n ]\\n },\\n \\"PromptAttack\\": {\\n \\"RiskResult\\": 0,\\n \\"PromptAttackInfo\\": \\"角色扮演\\",\\n \\"SecurityLevel\\": 0,\\n \\"ConfidenceScore\\": 0,\\n \\"PromptAttackInfoList\\": [\\n {\\n \\"CategoryType\\": 0,\\n \\"CategoryLabel\\": \\"角色扮演\\",\\n \\"SecurityLevel\\": 0,\\n \\"RiskResult\\": 1\\n }\\n ]\\n },\\n \\"DenyTopics\\": {\\n \\"RiskResult\\": 0,\\n \\"ConfidenceScore\\": 0,\\n \\"TopicInfoList\\": [\\n {\\n \\"CategoryType\\": 0,\\n \\"TopicName\\": \\"业务敏感\\",\\n \\"SecurityLevel\\": 0,\\n \\"RiskResult\\": 1\\n }\\n ]\\n },\\n \\"SensitiveType\\": {\\n \\"RiskResult\\": 0,\\n \\"MaskedContent\\": \\"\\",\\n \\"SensitiveTypeInfoList\\": [\\n {\\n \\"SensitiveTypeName\\": \\"\\",\\n \\"SensitiveCategory\\": 0,\\n \\"SensitiveContent\\": \\"\\",\\n \\"MaskedContent\\": \\"\\",\\n \\"ActionType\\": 0\\n }\\n ]\\n }\\n },\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true,\\n \\"SafeAnswer\\": \\"\\"\\n}","type":"json"}]', + 'title' => '模型输出内容同步检测', + 'changeSet' => [ + ['createdAt' => '2025-10-16T03:11:06.000Z', 'description' => '响应参数发生变更'], + ['createdAt' => '2025-08-06T10:35:02.000Z', 'description' => '响应参数发生变更'], + ['createdAt' => '2025-06-12T08:56:27.000Z', 'description' => '响应参数发生变更'], + ], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:ModelOutputContentSyncDetect', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'RegisterAccount' => [ + 'summary' => '新用户开通服务,如果用户未开通则进行开通。', + 'path' => '', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], 'operationType' => 'readAndWrite', + 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', 'riskType' => 'none', - 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], + 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], ], 'parameters' => [ [ 'name' => 'RegionId', 'in' => 'query', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'cn-shanghai', - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], ], [ - 'name' => 'GroupIdList', + 'name' => 'Memo', 'in' => 'query', - 'style' => 'json', - 'schema' => [ - 'description' => '关键词策略ID列表。', - 'type' => 'array', - 'items' => [ - 'description' => '关键词策略ID。', - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - 'example' => '1', - ], - 'required' => false, - ], + 'schema' => ['description' => '用户备注信息。', 'type' => 'string', 'required' => false, 'example' => '"user api register"'], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => '响应。', + 'description' => '响应', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '结果码,200代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'HttpStatusCode' => [ - 'description' => 'HTTP状态码。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '如有错误,返回错误信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求ID。', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '操作是否成功,可能值:'."\n" - .'- True表示成功。'."\n" - .'- False表示失败。', - 'type' => 'boolean', - 'example' => 'True', - ], + 'Code' => ['description' => '状态码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'HttpStatusCode' => ['description' => 'HTTP状态码。'."\n", 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '如有错误,返回错误信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求ID', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '表示是否调用成功。true:调用成功。 false:调用失败。', 'type' => 'boolean', 'example' => 'True'], ], ], ], ], + 'staticInfo' => ['returnType' => 'synchronous'], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => '删除关键词策略', - ], - 'CreateTopic' => [ - 'summary' => '创建敏感主题', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', + 'title' => '账号开通', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:RegisterAccount', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'UpdateModelInstance' => [ + 'summary' => '更新模型实例。', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -6237,148 +4131,101 @@ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], ], 'parameters' => [ [ - 'name' => 'RegionId', + 'name' => 'ModelCategoryId', 'in' => 'query', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'cn-shanghai', - ], + 'schema' => ['description' => '模型类别Id', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '1'], ], [ - 'name' => 'TopicName', + 'name' => 'EasServiceName', 'in' => 'query', - 'schema' => [ - 'description' => '需创建的topic的名称。', - 'type' => 'string', - 'required' => false, - 'example' => '业务敏感', - ], + 'schema' => ['description' => 'EAS服务名称。', 'type' => 'string', 'required' => false, 'example' => 'rai_content_detection_model'], ], [ - 'name' => 'TopicDefinition', + 'name' => 'EasServiceId', 'in' => 'query', - 'schema' => [ - 'description' => '主题定义', - 'type' => 'string', - 'required' => false, - 'example' => '主题的定义描述', - ], + 'schema' => ['description' => 'EAS 服务Id', 'type' => 'string', 'required' => false, 'example' => 'eas-m-12345678'], ], [ - 'name' => 'WorkspaceId', + 'name' => 'ModelUrl', 'in' => 'query', - 'schema' => [ - 'description' => '工作空间ID', - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - 'example' => '643168', - ], + 'schema' => ['description' => 'EAS 公网调用地址', 'type' => 'string', 'required' => false, 'example' => 'http://12345*****.cn-shanghai.aliyuncs.com/api/predict/echo'], ], [ - 'name' => 'BodyData', - 'in' => 'formData', - 'style' => 'json', - 'schema' => [ - 'description' => '请求对象', - 'type' => 'object', - 'properties' => [ - 'TopicExampleInfoList' => [ - 'description' => '样本示例列表', - 'type' => 'array', - 'items' => [ - 'description' => '样本示例对象', - 'type' => 'object', - 'properties' => [ - 'Content' => [ - 'description' => '黑样本或者白样本示例描述', - 'type' => 'string', - 'required' => false, - 'example' => '食品安全要重视', - ], - 'ExampleType' => [ - 'description' => '样本示例类型'."\n" - .'0: 白样本'."\n" - .'1: 黑样本', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '1', - ], - ], - 'required' => false, - ], - 'required' => false, - ], - ], - 'required' => false, - ], + 'name' => 'ModelVpcUrl', + 'in' => 'query', + 'schema' => ['description' => 'EAS VPC调用地址', 'type' => 'string', 'required' => false, 'example' => 'http://12345*****.vpc.cn-shanghai.aliyuncs.com/api/predict/demo'], + ], + [ + 'name' => 'ModelToken', + 'in' => 'query', + 'schema' => ['description' => '模型token', 'type' => 'string', 'required' => false, 'example' => 'MzJiMDI5MDliODc0MTlkYmI0ZDhlYmExYjczYTIyZTE3Zm********'], + ], + [ + 'name' => 'ModelCallName', + 'in' => 'query', + 'schema' => ['description' => 'OpenAI API接口中 模型名 参数', 'type' => 'string', 'required' => false, 'example' => 'demo'], + ], + [ + 'name' => 'Description', + 'in' => 'query', + 'schema' => ['description' => '型号描述。', 'type' => 'string', 'required' => false, 'example' => 'vllm==0.9.0'], + ], + [ + 'name' => 'ModelInstanceId', + 'in' => 'query', + 'schema' => ['description' => '模型实例Id', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '123'], + ], + [ + 'name' => 'WorkspaceId', + 'in' => 'query', + 'schema' => ['description' => '工作空间ID', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '608226'], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => '响应对象', + 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '状态码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'HttpStatusCode' => [ - 'description' => 'HTTP状态码。'."\n", - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '如有错误,返回错误信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求标识', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '操作是否成功。true表示成功,false表示失败。', - 'type' => 'boolean', - 'example' => 'True', - ], - 'TopicId' => [ - 'description' => '调用成功时,返回新建的敏感主题Id', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '217', - ], + 'Code' => ['description' => '结果码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'HttpStatusCode' => ['description' => 'HTTP状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '如有错误,返回错误信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => 'Id of the request', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '操作是否成功。true表示成功,false表示失败。', 'type' => 'boolean', 'example' => 'True'], + 'ModelInstanceId' => ['description' => '模型实例Id', 'type' => 'integer', 'format' => 'int64', 'example' => '1'], ], ], ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true,\\n \\"TopicId\\": 217\\n}","type":"json"}]', - 'title' => '创建敏感主题', - ], - 'UpdateTopic' => [ - 'summary' => '更新敏感主题', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true,\\n \\"ModelInstanceId\\": 1\\n}","type":"json"}]', + 'title' => '更新模型实例', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:UpdateModelInstance', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'UpdatePolicy' => [ + 'summary' => '更新检测策略', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], @@ -6389,678 +4236,405 @@ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], ], 'parameters' => [ [ 'name' => 'RegionId', 'in' => 'query', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'cn-shanghai', - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], ], [ - 'name' => 'TopicId', + 'name' => 'PolicyId', 'in' => 'query', - 'schema' => [ - 'description' => '调用成功时,返回新建的敏感主题Id', - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - 'example' => '216', - ], + 'schema' => ['description' => '检测策略ID', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '16'], ], [ - 'name' => 'TopicName', + 'name' => 'PolicyName', 'in' => 'query', - 'schema' => [ - 'description' => '需创建的topic的名称。', - 'type' => 'string', - 'required' => false, - 'example' => '业务敏感', - ], + 'schema' => ['description' => '检测策略名称。', 'type' => 'string', 'required' => false, 'example' => '测试策略'], ], [ - 'name' => 'TopicDefinition', + 'name' => 'HarmfulCategoryConfigInfoList', 'in' => 'query', + 'style' => 'json', 'schema' => [ - 'description' => '敏感主题定义', - 'type' => 'string', + 'description' => '有害分类配置列表', + 'type' => 'array', + 'items' => [ + 'description' => '有害分类配置对象', + 'type' => 'object', + 'properties' => [ + 'CategoryConfigId' => ['description' => '有害分类配置ID', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '1'], + 'InputOutputType' => ['description' => '模型输入输出类型'."\n" + .'0:输入'."\n" + .'1:输出', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '0'], + 'CategoryType' => ['description' => '0:文本'."\n" + .'1:图像', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '0'], + 'CategoryLabel' => ['description' => '分类名称', 'type' => 'string', 'required' => false, 'example' => '伦理道德'], + 'IsEnabled' => ['description' => '提示词攻击配置开关'."\n" + .'0:关闭'."\n" + .'1:打开', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '2'], + 'CategoryId' => ['type' => 'integer', 'format' => 'int64', 'required' => false, 'description' => ''], + ], + 'required' => false, + ], 'required' => false, - 'example' => '这里敏感主题描述', ], ], [ - 'name' => 'BodyData', - 'in' => 'formData', + 'name' => 'WordGroupInfoList', + 'in' => 'query', 'style' => 'json', 'schema' => [ - 'description' => '请求对象。', - 'type' => 'object', - 'properties' => [ - 'TopicExampleInfoList' => [ - 'description' => '样本示例列表', - 'type' => 'array', - 'items' => [ - 'description' => '样本示例列表', - 'type' => 'object', - 'properties' => [ - 'Content' => [ - 'description' => '样本示例描述', - 'type' => 'string', - 'required' => false, - 'example' => '食品安全很重要', - ], - 'ExampleType' => [ - 'description' => '样本示例类型'."\n" - .'0:白样本'."\n" - .'1:黑样本', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '0', - ], - ], - 'required' => false, - ], - 'required' => false, + 'description' => '关键词分组对象列表', + 'type' => 'array', + 'items' => [ + 'description' => '关键词分组对象', + 'type' => 'object', + 'properties' => [ + 'GroupId' => ['description' => '关键词分组ID。', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '5fa285a60a9342e097cb7a3491ec00cc'], + 'InputOutputType' => ['description' => '模型输入输出类型'."\n" + .'0:输入'."\n" + .'1:输出', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '0'], + 'GroupName' => ['description' => '关键词组名称', 'type' => 'string', 'required' => false, 'example' => '测试分组'], ], + 'required' => false, ], 'required' => false, ], ], - ], - 'responses' => [ - 200 => [ + [ + 'name' => 'PromptAttackInfo', + 'in' => 'query', + 'style' => 'json', 'schema' => [ - 'title' => 'Schema of Response', - 'description' => '请求对象', + 'description' => '提示词攻击检测结果对象', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '状态码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'HttpStatusCode' => [ - 'description' => 'http状态码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '返回信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求标识', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****F68692', - ], - 'Success' => [ - 'description' => '操作是否成功。true表示成功,false表示失败。', - 'type' => 'boolean', - 'example' => 'True', - ], + 'IsEnabled' => ['description' => '提示词攻击配置开关'."\n" + .'0:关闭'."\n" + .'1:打开', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '2'], ], + 'required' => false, ], ], - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****F68692\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => '更新敏感主题', - ], - 'ListTopic' => [ - 'summary' => '查询敏感主题列表', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', - ], - 'security' => [ - [ - 'AK' => [], - ], - ], - 'operationType' => 'readAndWrite', - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], - ], - 'parameters' => [ [ - 'name' => 'RegionId', + 'name' => 'PromptAttackInfoList', 'in' => 'query', + 'style' => 'json', 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', + 'description' => '提示词攻击列表', + 'type' => 'array', + 'items' => [ + 'description' => '提示词攻击列表', + 'type' => 'object', + 'properties' => [ + 'CategoryConfigId' => ['description' => '有害分类配置ID', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '1'], + 'CategoryLabel' => ['description' => '分类名称', 'type' => 'string', 'required' => false, 'example' => '角色扮演'], + 'IsEnabled' => ['description' => '提示词攻击配置开关'."\n" + .'0:关闭'."\n" + .'1:打开', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1'], + 'CategoryId' => ['type' => 'integer', 'format' => 'int64', 'required' => false, 'description' => ''], + ], + 'required' => false, + ], 'required' => false, - 'example' => 'cn-shanghai', ], ], [ - 'name' => 'PageNumber', + 'name' => 'TopicConfigInfoList', 'in' => 'query', + 'style' => 'json', 'schema' => [ - 'description' => '页码,和请求中的PageNumber一致。', - 'type' => 'integer', - 'format' => 'int32', + 'description' => '敏感主题列表', + 'type' => 'array', + 'items' => [ + 'description' => '敏感主题列表', + 'type' => 'object', + 'properties' => [ + 'TopicId' => ['description' => '敏感主题Id', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '3'], + 'InputOutputType' => ['description' => '模型输入输出类型'."\n" + .'0:输入'."\n" + .'1:输出', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '0'], + 'CategoryType' => ['description' => '0:文本'."\n" + .'1:图像', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '0'], + 'TopicName' => ['description' => '主题名称', 'type' => 'string', 'required' => false, 'example' => '业务敏感'], + 'SecurityLevel' => ['description' => '安全等级'."\n" + .'0:低'."\n" + .'1:中'."\n" + .'2:高', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1'], + ], + 'required' => false, + ], 'required' => false, - 'example' => '1', ], ], [ - 'name' => 'PageSize', + 'name' => 'EnableSensitiveInputCheck', 'in' => 'query', - 'schema' => [ - 'description' => '分页大小,每页最多显示的返回结果数量。', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '10', - ], + 'schema' => ['type' => 'integer', 'format' => 'int32', 'required' => false, 'description' => ''], ], [ - 'name' => 'TopicName', + 'name' => 'EnableSensitiveOutputCheck', 'in' => 'query', - 'schema' => [ - 'description' => '主题的名称。', - 'type' => 'string', - 'required' => false, - 'example' => 'client_exposure_logs', - ], + 'schema' => ['type' => 'integer', 'format' => 'int32', 'required' => false, 'description' => ''], ], [ - 'name' => 'WorkspaceId', + 'name' => 'InputSafeAnswer', 'in' => 'query', - 'schema' => [ - 'description' => '工作空间ID。', - 'type' => 'integer', - 'format' => 'int64', - 'required' => false, - 'example' => '643168', - ], + 'schema' => ['type' => 'string', 'required' => false, 'description' => ''], ], [ - 'name' => 'SortBy', + 'name' => 'InputSafeAnswerSwitch', 'in' => 'query', - 'schema' => [ - 'description' => '排序字段。', - 'type' => 'string', - 'required' => false, - 'example' => 'GmtModified', - ], + 'schema' => ['type' => 'integer', 'format' => 'int32', 'required' => false, 'description' => ''], ], [ - 'name' => 'Order', + 'name' => 'OutputSafeAnswer', 'in' => 'query', - 'schema' => [ - 'description' => '排序方式。取值范围如下:'."\n" - ."\n" - .'- asc(默认):升序'."\n" - ."\n" - .'- desc:降序', - 'type' => 'string', - 'required' => false, - 'example' => 'asc', - ], + 'schema' => ['type' => 'string', 'required' => false, 'description' => ''], ], - ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'title' => 'Schema of Response', - 'description' => '响应对象', - 'type' => 'object', - 'properties' => [ - 'Code' => [ - 'description' => '状态码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'PageNumber' => [ - 'description' => '页码,和请求中的PageNumber一致。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'PageSize' => [ - 'description' => '分页大小,每页最多显示的返回结果数量。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '10', - ], - 'TotalCount' => [ - 'description' => '总数量。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'TopicInfoList' => [ - 'description' => '敏感主题列表', - 'type' => 'array', - 'items' => [ - 'description' => '敏感主题对象', - 'type' => 'object', - 'properties' => [ - 'TopicId' => [ - 'description' => '敏感主题Id', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '216', - ], - 'TopicName' => [ - 'description' => '主题的名称。', - 'type' => 'string', - 'example' => '业务敏感', - ], - 'TopicDefinition' => [ - 'description' => '敏感主题定义', - 'type' => 'string', - 'example' => '这里敏感主题描述', - ], - 'GmtModified' => [ - 'description' => '修改时间。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1597738932000', - ], - 'PolicyInfoList' => [ - 'description' => '关联的策略对象列表。', - 'type' => 'array', - 'items' => [ - 'description' => '关联的策略对象列表。', - 'type' => 'object', - 'properties' => [ - 'PolicyId' => [ - 'description' => '策略ID。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '412', - ], - 'PolicyIdentifier' => [ - 'description' => '策略标识。', - 'type' => 'string', - 'example' => 'bqi1c3s99qx3', - ], - 'PolicyName' => [ - 'description' => '策略名称。', - 'type' => 'string', - 'example' => '业务敏感策略', - ], - ], - ], - ], - ], - ], - ], - 'HttpStatusCode' => [ - 'description' => '错误码描述', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '如有错误,返回错误信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求标识', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '表示是否调用成功。true:调用成功。 false:调用失败。', - 'type' => 'boolean', - 'example' => 'True', - ], - ], - ], + [ + 'name' => 'OutputSafeAnswerSwitch', + 'in' => 'query', + 'schema' => ['type' => 'integer', 'format' => 'int32', 'required' => false, 'description' => ''], ], - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"PageNumber\\": 1,\\n \\"PageSize\\": 10,\\n \\"TotalCount\\": 1,\\n \\"TopicInfoList\\": [\\n {\\n \\"TopicId\\": 216,\\n \\"TopicName\\": \\"业务敏感\\",\\n \\"TopicDefinition\\": \\"这里敏感主题描述\\",\\n \\"GmtModified\\": 1597738932000,\\n \\"PolicyInfoList\\": [\\n {\\n \\"PolicyId\\": 412,\\n \\"PolicyIdentifier\\": \\"bqi1c3s99qx3\\",\\n \\"PolicyName\\": \\"业务敏感策略\\"\\n }\\n ]\\n }\\n ],\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => '查询敏感主题列表', - ], - 'GetTopic' => [ - 'summary' => '查询敏感主题信息', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', - ], - 'security' => [ [ - 'AK' => [], + 'name' => 'IsSidecarPolicy', + 'in' => 'query', + 'schema' => ['type' => 'integer', 'format' => 'int32', 'required' => false, 'description' => ''], ], - ], - 'operationType' => 'readAndWrite', - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', + [ + 'name' => 'ContentSafeModelInstanceId', + 'in' => 'query', + 'schema' => ['type' => 'integer', 'format' => 'int64', 'required' => false, 'description' => ''], ], - ], - 'parameters' => [ [ - 'name' => 'RegionId', + 'name' => 'PromptAttackModelInstanceId', 'in' => 'query', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'cn-shanghai', - ], + 'schema' => ['type' => 'integer', 'format' => 'int64', 'required' => false, 'description' => ''], ], [ - 'name' => 'TopicId', + 'name' => 'SensitiveTopicModelInstanceId', 'in' => 'query', + 'schema' => ['type' => 'integer', 'format' => 'int64', 'required' => false, 'description' => ''], + ], + [ + 'name' => 'WorkspaceId', + 'in' => 'query', + 'schema' => ['type' => 'integer', 'format' => 'int64', 'required' => false, 'description' => ''], + ], + [ + 'name' => 'SensitiveWordList', + 'in' => 'query', + 'style' => 'json', 'schema' => [ - 'description' => '敏感主题Id', - 'type' => 'integer', - 'format' => 'int64', + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'Word' => ['type' => 'string', 'required' => false, 'description' => ''], + 'Label' => ['type' => 'string', 'required' => false, 'description' => ''], + ], + 'required' => false, + 'description' => '', + ], 'required' => false, - 'example' => '216', + 'description' => '', ], ], - ], - 'responses' => [ - 200 => [ + [ + 'name' => 'SensitiveConfigList', + 'in' => 'query', + 'style' => 'json', 'schema' => [ - 'title' => 'Schema of Response', - 'description' => '响应对象', - 'type' => 'object', - 'properties' => [ - 'Code' => [ - 'description' => '状态码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'TopicName' => [ - 'description' => '主题的名称。', - 'type' => 'string', - 'example' => 'test_topic', - ], - 'TopicExampleInfoList' => [ - 'description' => '样本示例列表', - 'type' => 'array', - 'items' => [ - 'description' => '样本示例列表', - 'type' => 'object', - 'properties' => [ - 'ExampleId' => [ - 'description' => '样本示例Id', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '2', - ], - 'Content' => [ - 'description' => '样本示例描述', - 'type' => 'string', - 'example' => '食品安全很重要', - ], - 'ExampleType' => [ - 'description' => '样本示例类型'."\n" - .'0:白样本'."\n" - .'1:黑样本', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '0', - ], - ], - ], - ], - 'HttpStatusCode' => [ - 'description' => '错误码描述', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '错误信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求标识', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '表示是否调用成功。可能值:'."\n" - .'- True:调用成功。'."\n" - .'- False:调用失败。', - 'type' => 'boolean', - 'example' => 'True', - ], - 'TopicDefinition' => [ - 'description' => '敏感主题定义', - 'type' => 'string', - 'example' => '这里是敏感主题的描述', - ], - 'GmtModified' => [ - 'description' => '策略修改时间', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '1634122349000', - ], - 'PolicyInfoList' => [ - 'description' => '关联的策略对象列表。', - 'type' => 'array', - 'items' => [ - 'description' => '策略对象列表。', - 'type' => 'object', - 'properties' => [ - 'PolicyId' => [ - 'description' => '策略ID。', - 'type' => 'integer', - 'format' => 'int64', - 'example' => '16', - ], - 'PolicyIdentifier' => [ - 'description' => '策略标识。', - 'type' => 'string', - 'example' => 'x1bc5xgs4uhx', - ], - 'PolicyName' => [ - 'description' => '策略名称。', - 'type' => 'string', - 'example' => '测试策略', - ], - ], - ], + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'SensitiveConfigId' => ['type' => 'integer', 'format' => 'int64', 'required' => false, 'description' => ''], + 'ActionType' => ['type' => 'integer', 'format' => 'int32', 'required' => false, 'description' => ''], + 'IsEnabled' => ['type' => 'integer', 'format' => 'int32', 'required' => false, 'description' => ''], ], + 'required' => false, + 'description' => '', ], + 'required' => false, + 'description' => '', ], ], - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"TopicName\\": \\"test_topic\\",\\n \\"TopicExampleInfoList\\": [\\n {\\n \\"ExampleId\\": 2,\\n \\"Content\\": \\"食品安全很重要\\",\\n \\"ExampleType\\": 0\\n }\\n ],\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true,\\n \\"TopicDefinition\\": \\"这里是敏感主题的描述\\",\\n \\"GmtModified\\": 1634122349000,\\n \\"PolicyInfoList\\": [\\n {\\n \\"PolicyId\\": 16,\\n \\"PolicyIdentifier\\": \\"x1bc5xgs4uhx\\",\\n \\"PolicyName\\": \\"测试策略\\"\\n }\\n ]\\n}","type":"json"}]', - 'title' => '查询敏感主题信息', - ], - 'DeleteTopic' => [ - 'summary' => '删除敏感主题', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', - ], - 'security' => [ - [ - 'AK' => [], - ], - ], - 'operationType' => 'readAndWrite', - 'systemTags' => [ - 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], - ], - 'parameters' => [ [ - 'name' => 'RegionId', + 'name' => 'RegularExpressList', 'in' => 'query', + 'style' => 'json', 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'RegularExpressName' => ['type' => 'string', 'required' => false, 'description' => ''], + 'RegularExpress' => ['type' => 'string', 'required' => false, 'description' => ''], + 'ActionType' => ['type' => 'integer', 'format' => 'int32', 'required' => false, 'description' => ''], + ], + 'required' => false, + 'description' => '', + ], 'required' => false, - 'example' => 'cn-shanghai', + 'description' => '', ], ], [ - 'name' => 'TopicIdList', + 'name' => 'SensitiveTopicList', 'in' => 'query', 'style' => 'json', 'schema' => [ - 'description' => '要删除的敏感主题Id列表', 'type' => 'array', 'items' => [ - 'description' => '敏感主题Id', - 'type' => 'integer', - 'format' => 'int64', + 'type' => 'object', + 'properties' => [ + 'TopicName' => ['type' => 'string', 'required' => false, 'description' => ''], + 'TopicDefinition' => ['type' => 'string', 'required' => false, 'description' => ''], + 'SecurityLevel' => ['type' => 'integer', 'format' => 'int32', 'required' => false, 'description' => ''], + 'CategoryType' => ['type' => 'integer', 'format' => 'int32', 'required' => false, 'description' => ''], + 'TopicExampleInfoList' => [ + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'Content' => ['type' => 'string', 'required' => false, 'description' => ''], + 'ExampleType' => ['type' => 'integer', 'format' => 'int32', 'required' => false, 'description' => ''], + ], + 'required' => false, + 'description' => '', + ], + 'required' => false, + 'description' => '', + ], + ], 'required' => false, - 'example' => '216', + 'description' => '', ], 'required' => false, + 'description' => '', ], ], + [ + 'name' => 'SceneType', + 'in' => 'query', + 'schema' => ['type' => 'integer', 'format' => 'int32', 'required' => false, 'description' => ''], + ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => '响应对象', + 'description' => '响应', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '状态码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'HttpStatusCode' => [ - 'description' => 'HTTP状态码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '错误信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求标识', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '操作是否成功。true表示成功,false表示失败。', - 'type' => 'boolean', - 'example' => 'True', - ], + 'Code' => ['description' => '状态码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'HttpStatusCode' => ['description' => 'HTTP状态码。'."\n", 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '返回信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求ID', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '操作是否成功。true表示成功,false表示失败。', 'type' => 'boolean', 'example' => 'True'], ], ], ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => '删除敏感主题', - ], - 'ContentSyncDetect' => [ - 'summary' => '单条内容同步检测。', - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'https', + 'title' => '更新检测策略', + 'changeSet' => [ + ['createdAt' => '2025-10-16T03:11:06.000Z', 'description' => '请求参数发生变更'], + ['createdAt' => '2025-08-06T10:35:02.000Z', 'description' => '请求参数发生变更'], + ['createdAt' => '2025-06-12T08:56:27.000Z', 'description' => '请求参数发生变更'], + ], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:UpdatePolicy', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], + ], + 'UpdateTopic' => [ + 'summary' => '更新敏感主题', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], 'operationType' => 'readAndWrite', - 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], ], 'parameters' => [ [ 'name' => 'RegionId', 'in' => 'query', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'cn-shanghai', - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], ], [ - 'name' => 'SceneName', + 'name' => 'TopicId', 'in' => 'query', - 'schema' => [ - 'description' => '场景名称。', - 'type' => 'string', - 'required' => false, - 'example' => '""', - ], + 'schema' => ['description' => '调用成功时,返回新建的敏感主题Id', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '216'], ], [ - 'name' => 'ServiceName', + 'name' => 'TopicName', 'in' => 'query', - 'schema' => [ - 'description' => '服务名字。', - 'type' => 'string', - 'required' => false, - 'example' => 'textDetection', - ], + 'schema' => ['description' => '需创建的topic的名称。', 'type' => 'string', 'required' => false, 'example' => '业务敏感'], ], [ - 'name' => 'body', - 'in' => 'body', + 'name' => 'TopicDefinition', + 'in' => 'query', + 'schema' => ['description' => '敏感主题定义', 'type' => 'string', 'required' => false, 'example' => '这里敏感主题描述'], + ], + [ + 'name' => 'BodyData', + 'in' => 'formData', 'style' => 'json', 'schema' => [ - 'description' => '检测内容', + 'description' => '请求对象。', 'type' => 'object', 'properties' => [ - 'serviceParameter' => [ - 'description' => '检测对象', - 'type' => 'object', - 'properties' => [ - 'content' => [ - 'description' => '要审核的文本内容,最大限制10000个字符。(包括英文和中文)', - 'type' => 'string', - 'required' => false, - 'example' => '"要检测的内容"', + 'TopicExampleInfoList' => [ + 'description' => '样本示例列表', + 'type' => 'array', + 'items' => [ + 'description' => '样本示例列表', + 'type' => 'object', + 'properties' => [ + 'Content' => ['description' => '样本示例描述', 'type' => 'string', 'required' => false, 'example' => '食品安全很重要'], + 'ExampleType' => ['description' => '样本示例类型'."\n" + .'0:白样本'."\n" + .'1:黑样本', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '0'], ], + 'required' => false, ], 'required' => false, ], @@ -7073,139 +4647,101 @@ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => '响应', + 'description' => '请求对象', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '结果码,200代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'Data' => [ - 'description' => '返回受影响的行数。', - 'type' => 'object', - 'properties' => [ - 'RiskInfo' => [ - 'description' => '风险标签,如有多个逗号分割', - 'type' => 'string', - 'example' => '色情', - ], - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - ], - ], - 'HttpStatusCode' => [ - 'description' => 'HTTP状态码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '返回信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求ID', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '操作是否成功。true表示成功,false表示失败。', - 'type' => 'boolean', - 'example' => 'True', - ], + 'Code' => ['description' => '状态码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'HttpStatusCode' => ['description' => 'http状态码', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '返回信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求标识', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****F68692'], + 'Success' => ['description' => '操作是否成功。true表示成功,false表示失败。', 'type' => 'boolean', 'example' => 'True'], ], ], ], ], - 'errorCodes' => [], - 'staticInfo' => [ - 'returnType' => 'synchronous', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****F68692\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => '更新敏感主题', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:UpdateTopic', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"Data\\": {\\n \\"RiskInfo\\": \\"色情\\",\\n \\"RiskResult\\": 1\\n },\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => '单条内容同步检测', ], - 'ContentAsyncDetect' => [ - 'summary' => '单条内容异步检测。', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'https', - ], + 'UpdateWordGroup' => [ + 'summary' => '更新关键词策略。', + 'methods' => ['post', 'get'], + 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], 'operationType' => 'readAndWrite', - 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', - ], + 'abilityTreeNodes' => ['FEATURElearnFME3AK'], ], 'parameters' => [ [ 'name' => 'RegionId', 'in' => 'query', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'cn-shanghai', - ], + 'schema' => ['description' => '地域ID。', 'type' => 'string', 'required' => false, 'example' => 'cn-shanghai'], ], [ - 'name' => 'SceneName', + 'name' => 'GroupId', 'in' => 'query', - 'schema' => [ - 'description' => '场景名称。', - 'type' => 'string', - 'required' => false, - 'example' => '""', - ], + 'schema' => ['description' => '关键词分组ID。', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '1'], ], [ - 'name' => 'ServiceName', + 'name' => 'GroupName', 'in' => 'query', - 'schema' => [ - 'description' => '服务名称。', - 'type' => 'string', - 'required' => false, - 'example' => 'textDetection'."\n" - .'imageDetection', - ], + 'schema' => ['description' => '关键词组名称。', 'type' => 'string', 'required' => false, 'example' => '测试分组'], ], [ - 'name' => 'body', - 'in' => 'body', + 'name' => 'WordInfoListModified', + 'in' => 'query', + 'schema' => ['description' => '关键词信息是否被修改。', 'type' => 'boolean', 'required' => false, 'example' => 'true'], + ], + [ + 'name' => 'Commit', + 'in' => 'query', + 'schema' => ['description' => '是否提交。'."\n" + .'false:不实际保存,仅检查'."\n" + .'true:提交保存', 'type' => 'boolean', 'required' => false, 'example' => 'true'], + ], + [ + 'name' => 'BodyData', + 'in' => 'formData', 'style' => 'json', 'schema' => [ - 'description' => '检测内容', + 'description' => '请求对象。', 'type' => 'object', 'properties' => [ - 'serviceParameter' => [ - 'description' => '检测参数对象', - 'type' => 'object', - 'properties' => [ - 'content' => [ - 'description' => '1. 要审核的文本内容,最大限制10000个字符。(包括英文和中文)'."\n" - .'2. 或者要审核的图片URL地址', - 'type' => 'string', - 'required' => false, - 'example' => '"要检测的内容"', + 'WordInfoList' => [ + 'description' => '关键词分组列表。', + 'type' => 'array', + 'items' => [ + 'description' => '关键词分组。', + 'type' => 'object', + 'properties' => [ + 'Word' => ['description' => '关键词。', 'type' => 'string', 'required' => false, 'example' => '投资'], + 'Label' => ['description' => '标签。', 'type' => 'string', 'required' => false, 'example' => '业务敏感'], ], + 'required' => false, ], 'required' => false, ], @@ -7218,699 +4754,529 @@ 200 => [ 'schema' => [ 'title' => 'Schema of Response', - 'description' => '响应', + 'description' => '返回结果。', 'type' => 'object', 'properties' => [ - 'Code' => [ - 'description' => '状态码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'Data' => [ - 'description' => '响应数据', - 'type' => 'object', - 'properties' => [ - 'TaskId' => [ - 'description' => '任务ID。', - 'type' => 'string', - 'example' => '5d85cd38-03b2-49fd-86b2-be85c4b13215', + 'Code' => ['description' => '状态码,00000代表成功;其它代表失败。', 'type' => 'string', 'example' => '00000'], + 'WordErrorInfoList' => [ + 'description' => '错误信息列表。', + 'type' => 'array', + 'items' => [ + 'description' => '错误信息列表。', + 'type' => 'object', + 'properties' => [ + 'Index' => ['description' => '错误信息在数组中的位置。', 'type' => 'integer', 'format' => 'int64', 'example' => '1'], + 'Word' => ['description' => '关键词。', 'type' => 'string', 'example' => '投资'], + 'Label' => ['description' => '标签。', 'type' => 'string', 'example' => '业务敏感'], + 'ErrorStatus' => ['description' => '错误状态信息。', 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'ErrorMessage' => ['description' => '错误信息描述。', 'type' => 'string', 'example' => '关键词冲突'], ], ], ], - 'HttpStatusCode' => [ - 'description' => '错误码描述', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '如有错误,返回错误信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求ID', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '请求是否成功', - 'type' => 'boolean', - 'example' => 'True', - ], + 'HttpStatusCode' => ['description' => 'HTTP状态码。', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Message' => ['description' => '如有错误,返回错误信息。', 'type' => 'string', 'example' => '""'], + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求ID。', 'type' => 'string', 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'], + 'Success' => ['description' => '是否成功。', 'type' => 'boolean', 'example' => 'True'], ], ], ], ], - 'errorCodes' => [], - 'staticInfo' => [ - 'returnType' => 'synchronous', + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"WordErrorInfoList\\": [\\n {\\n \\"Index\\": 1,\\n \\"Word\\": \\"投资\\",\\n \\"Label\\": \\"业务敏感\\",\\n \\"ErrorStatus\\": 1,\\n \\"ErrorMessage\\": \\"关键词冲突\\"\\n }\\n ],\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', + 'title' => '更新关键词策略', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:UpdateWordGroup', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"Data\\": {\\n \\"TaskId\\": \\"5d85cd38-03b2-49fd-86b2-be85c4b13215\\"\\n },\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => '单条内容异步检测', ], - 'GetContentDetectResult' => [ - 'summary' => '查询异步检测结果。', - 'methods' => [ - 'get', - 'post', - ], - 'schemes' => [ - 'https', - ], - 'security' => [ - [ - 'AK' => [], + ], + 'endpoints' => [ + ['regionId' => 'cn-shanghai', 'regionName' => '华东2(上海)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'rai.cn-shanghai.aliyuncs.com', 'endpoint' => 'rai.cn-shanghai.aliyuncs.com', 'vpc' => 'rai-vpc.cn-shanghai.aliyuncs.com'], + ], + 'errorCodes' => [], + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [], + ], + 'ram' => [ + 'productCode' => 'RAI', + 'productName' => '人工智能平台 PAI', + 'ramCodes' => ['rai'], + 'ramLevel' => '操作级', + 'ramConditions' => [], + 'ramActions' => [ + [ + 'apiName' => 'CreateModelInstance', + 'description' => '创建模型实例', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:CreateModelInstance', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], - 'operationType' => 'readAndWrite', - 'systemTags' => [ + [ + 'apiName' => 'DeletePolicy', + 'description' => '删除检测策略', 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', + 'ramAction' => [ + 'action' => 'rai:DeletePolicy', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], - 'parameters' => [ - [ - 'name' => 'RegionId', - 'in' => 'query', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'cn-shanghai', + [ + 'apiName' => 'GetModelOutputContentDetectResult', + 'description' => '获取模型输出内容检测结果', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:GetModelOutputContentDetectResult', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'TaskId', - 'in' => 'query', - 'schema' => [ - 'description' => '任务ID。', - 'type' => 'string', - 'required' => false, - 'example' => '5d85cd38-03b2-49fd-86b2-be85c4b13215', + ], + [ + 'apiName' => 'ModelInputContentAsyncDetect', + 'description' => '模型输入内容异步检测', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:ModelInputContentAsyncDetect', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'title' => 'Schema of Response', - 'description' => '响应', - 'type' => 'object', - 'properties' => [ - 'Code' => [ - 'description' => '状态码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'Data' => [ - 'description' => '响应数据', - 'type' => 'object', - 'properties' => [ - 'DetectResultList' => [ - 'description' => '检测结果列表', - 'type' => 'array', - 'items' => [ - 'description' => '检测结果对象', - 'type' => 'object', - 'properties' => [ - 'RiskInfo' => [ - 'description' => '风险标签,如有多个逗号分割', - 'type' => 'string', - 'example' => '色情', - ], - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - 'Status' => [ - 'description' => '0:排队中'."\n" - .'1: 处理中'."\n" - .'2:处理完成'."\n" - .'3:处理失败', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '2', - ], - ], - ], - ], - 'ProcessedCount' => [ - 'description' => '任务已处理条数。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '10', - ], - 'TaskId' => [ - 'description' => '异步任务Id', - 'type' => 'string', - 'example' => '任务ID', - ], - 'TaskStatus' => [ - 'description' => '任务处理状态:'."\n" - .'0:排队中'."\n" - .'1: 处理中'."\n" - .'2:处理完成'."\n" - .'3:处理失败', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '2', - ], - 'TotalCount' => [ - 'description' => '任务总条数。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '10', - ], - ], - ], - 'HttpStatusCode' => [ - 'description' => 'http状态码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '如有错误,返回错误信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求ID', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '操作是否成功。true表示成功,false表示失败。', - 'type' => 'boolean', - 'example' => 'True', - ], - ], + [ + 'apiName' => 'ListModelInstance', + 'description' => '查询模型实例列表', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:ListModelInstance', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"Data\\": {\\n \\"DetectResultList\\": [\\n {\\n \\"RiskInfo\\": \\"色情\\",\\n \\"RiskResult\\": 1,\\n \\"Status\\": 2\\n }\\n ],\\n \\"ProcessedCount\\": 10,\\n \\"TaskId\\": \\"任务ID\\",\\n \\"TaskStatus\\": 2,\\n \\"TotalCount\\": 10\\n },\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => '查询异步检测结果', - ], - 'BatchContentSyncDetect' => [ - 'summary' => '批量内容同步检测。', - 'methods' => [ - 'get', - 'post', - ], - 'schemes' => [ - 'https', - ], - 'security' => [ - [ - 'AK' => [], + [ + 'apiName' => 'ModelOutputContentAsyncDetect', + 'description' => '模型输出内容异步检测', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:ModelOutputContentAsyncDetect', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], - 'operationType' => 'readAndWrite', - 'deprecated' => false, - 'systemTags' => [ + [ + 'apiName' => 'ModelInputContentSyncDetect', + 'description' => '模型输入内容同步检测', 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', + 'ramAction' => [ + 'action' => 'rai:ModelInputContentSyncDetect', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], - 'parameters' => [ - [ - 'name' => 'RegionId', - 'in' => 'query', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'cn-shanghai', + [ + 'apiName' => 'BatchContentSyncDetect', + 'description' => '批量内容同步检测', + 'operationType' => 'get', + 'additionalActions' => [], + 'ramAction' => [ + 'action' => 'rai:BatchContentSyncDetect', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'SceneName', - 'in' => 'query', - 'schema' => [ - 'description' => '场景名称。', - 'type' => 'string', - 'required' => false, - 'example' => '""', + ], + [ + 'apiName' => 'DeleteModelInstance', + 'description' => '删除模型实例', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:DeleteModelInstance', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'ServiceName', - 'in' => 'query', - 'schema' => [ - 'description' => '服务名称。', - 'type' => 'string', - 'required' => false, - 'example' => 'textDetection', + ], + [ + 'apiName' => 'UpdateTopic', + 'description' => '更新敏感主题', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:UpdateTopic', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'body', - 'in' => 'body', - 'style' => 'json', - 'schema' => [ - 'description' => '请求Body。', - 'type' => 'object', - 'properties' => [ - 'serviceParameterList' => [ - 'description' => '批量内容安全检测列表,最大限制条数20条', - 'type' => 'array', - 'items' => [ - 'description' => '批量内容安全检测列表,最大限制条数20条', - 'type' => 'object', - 'properties' => [ - 'content' => [ - 'description' => '要审核的文本内容,最大限制10000个字符。(包括英文和中文)', - 'type' => 'string', - 'required' => false, - 'example' => '"要检测的内容"', - ], - ], - 'required' => false, - ], - 'required' => false, - ], - ], - 'required' => false, + ], + [ + 'apiName' => 'CheckAccount', + 'description' => '检查账号状态', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:CheckAccount', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'title' => 'Schema of Response', - 'description' => '响应', - 'type' => 'object', - 'properties' => [ - 'Code' => [ - 'description' => '状态码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'Data' => [ - 'description' => '响应数据', - 'type' => 'object', - 'properties' => [ - 'DetectResultList' => [ - 'description' => '检测结果对象列表', - 'type' => 'array', - 'items' => [ - 'description' => '检测结果对象', - 'type' => 'object', - 'properties' => [ - 'RiskInfo' => [ - 'description' => '风险标签,如有多个逗号分割', - 'type' => 'string', - 'example' => '色情', - ], - 'RiskResult' => [ - 'description' => '0: 无风险'."\n" - .'1:存在风险', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - ], - ], - ], - ], - ], - 'HttpStatusCode' => [ - 'description' => '错误码描述', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '如有错误,返回错误信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求ID', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '操作是否成功。true表示成功,false表示失败。', - 'type' => 'boolean', - 'example' => 'True', - ], - ], + [ + 'apiName' => 'GetModelInstanceInfo', + 'description' => '获取模型实例信息', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:GetModelInstanceInfo', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'errorCodes' => [], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"Data\\": {\\n \\"DetectResultList\\": [\\n {\\n \\"RiskInfo\\": \\"色情\\",\\n \\"RiskResult\\": 1\\n }\\n ]\\n },\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => '批量内容同步检测', - ], - 'BatchContentAsyncDetect' => [ - 'summary' => '批量内容异步检测。', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'https', - ], - 'security' => [ - [ - 'AK' => [], + [ + 'apiName' => 'UpdatePolicy', + 'description' => '更新检测策略', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:UpdatePolicy', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], - 'operationType' => 'readAndWrite', - 'deprecated' => false, - 'systemTags' => [ + [ + 'apiName' => 'UpdateWordGroup', + 'description' => '更新关键词策略', 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'paid', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', + 'ramAction' => [ + 'action' => 'rai:UpdateWordGroup', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], - 'parameters' => [ - [ - 'name' => 'RegionId', - 'in' => 'query', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'cn-shanghai', + [ + 'apiName' => 'ListWordGroup', + 'description' => '查询关键词策略列表', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:ListWordGroup', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'SceneName', - 'in' => 'query', - 'schema' => [ - 'description' => '场景名称', - 'type' => 'string', - 'required' => false, - 'example' => '""', + ], + [ + 'apiName' => 'GetWordGroup', + 'description' => '查询关键词策略详情', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:GetWordGroup', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'ServiceName', - 'in' => 'query', - 'schema' => [ - 'description' => '服务名称。', - 'type' => 'string', - 'required' => false, - 'example' => 'textDetection', + ], + [ + 'apiName' => 'CreateTopic', + 'description' => '创建敏感主题', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:CreateTopic', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'body', - 'in' => 'body', - 'style' => 'json', - 'schema' => [ - 'description' => '检测内容', - 'type' => 'object', - 'properties' => [ - 'serviceParameterList' => [ - 'description' => '检测对象列表', - 'type' => 'array', - 'items' => [ - 'description' => '检测对象', - 'type' => 'object', - 'properties' => [ - 'content' => [ - 'description' => '1. 要审核的文本内容,最大限制10000个字符。(包括英文和中文)'."\n" - .'2. 或者图片URL地址。', - 'type' => 'string', - 'required' => false, - 'example' => '"XXXXXXXX"', - ], - ], - 'required' => false, - ], - 'required' => false, - ], - ], - 'required' => false, + ], + [ + 'apiName' => 'ListModelCategory', + 'description' => '查询模型类别列表', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:ListModelCategory', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'title' => 'Schema of Response', - 'description' => '响应', - 'type' => 'object', - 'properties' => [ - 'Code' => [ - 'description' => '调用失败时,返回的错误码。更多信息,请参见错误码。', - 'type' => 'string', - 'example' => '00000', - ], - 'Data' => [ - 'description' => '返回的数据。', - 'type' => 'object', - 'properties' => [ - 'TaskId' => [ - 'description' => '任务ID。', - 'type' => 'string', - 'example' => '19657954336', - ], - ], - ], - 'HttpStatusCode' => [ - 'description' => 'http状态码', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '如有错误,返回错误信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'description' => '请求ID。', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****F68692', - ], - 'Success' => [ - 'description' => '操作是否成功。true表示成功,false表示失败。', - 'type' => 'boolean', - 'example' => 'True', - ], - ], + [ + 'apiName' => 'DeleteTopic', + 'description' => '删除敏感主题', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:DeleteTopic', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'errorCodes' => [], - 'staticInfo' => [ - 'returnType' => 'synchronous', + [ + 'apiName' => 'ListTopic', + 'description' => '查询敏感主题列表', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:ListTopic', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"Data\\": {\\n \\"TaskId\\": \\"19657954336\\"\\n },\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****F68692\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => '批量内容异步检测', - ], - 'RegisterAccount' => [ - 'summary' => '新用户开通服务,如果用户未开通则进行开通。', - 'path' => '', - 'methods' => [ - 'post', - 'get', + [ + 'apiName' => 'GetPolicyDefaultOptions', + 'description' => '查询检测策略默认选项', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:GetPolicyDefaultOptions', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], ], - 'schemes' => [ - 'https', + [ + 'apiName' => 'GetModelInputContentDetectResult', + 'description' => '获取模型输入内容检测结果', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:GetModelInputContentDetectResult', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], ], - 'security' => [ - [ - 'AK' => [], + [ + 'apiName' => 'UpdateModelInstance', + 'description' => '更新模型实例', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:UpdateModelInstance', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], - 'operationType' => 'readAndWrite', - 'deprecated' => false, - 'systemTags' => [ + [ + 'apiName' => 'RegisterAccount', + 'description' => '账号开通', 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', + 'ramAction' => [ + 'action' => 'rai:RegisterAccount', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], - 'parameters' => [ - [ - 'name' => 'RegionId', - 'in' => 'query', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'cn-shanghai', + [ + 'apiName' => 'ContentSyncDetect', + 'description' => '单条内容同步检测', + 'operationType' => 'get', + 'additionalActions' => [], + 'ramAction' => [ + 'action' => 'rai:ContentSyncDetect', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], ], ], - [ - 'name' => 'Memo', - 'in' => 'query', - 'schema' => [ - 'description' => '用户备注信息。', - 'type' => 'string', - 'required' => false, - 'example' => '"user api register"', + ], + [ + 'apiName' => 'ModelOutputContentSyncDetect', + 'description' => '模型输出内容同步检测', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:ModelOutputContentSyncDetect', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'title' => 'Schema of Response', - 'description' => '响应', - 'type' => 'object', - 'properties' => [ - 'Code' => [ - 'description' => '状态码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'HttpStatusCode' => [ - 'description' => 'HTTP状态码。'."\n", - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '如有错误,返回错误信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求ID', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '表示是否调用成功。true:调用成功。 false:调用失败。', - 'type' => 'boolean', - 'example' => 'True', - ], - ], + [ + 'apiName' => 'GetTopic', + 'description' => '查询敏感主题信息', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:GetTopic', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + [ + 'apiName' => 'GetPolicyInfo', + 'description' => '查询检测策略详情', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:GetPolicyInfo', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => '账号开通', - ], - 'CheckAccount' => [ - 'summary' => '检查用户是否已开通服务,返回该账户的状态。', - 'path' => '', - 'methods' => [ - 'post', - 'get', + [ + 'apiName' => 'CreatePolicy', + 'description' => '创建检测策略', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:CreatePolicy', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], ], - 'schemes' => [ - 'https', + [ + 'apiName' => 'ContentAsyncDetect', + 'description' => '单条内容异步检测', + 'operationType' => 'get', + 'additionalActions' => [], + 'ramAction' => [ + 'action' => 'rai:ContentAsyncDetect', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], ], - 'security' => [ - [ - 'AK' => [], + [ + 'apiName' => 'GetContentDetectResult', + 'description' => '查询异步检测结果', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:GetContentDetectResult', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], - 'operationType' => 'readAndWrite', - 'deprecated' => false, - 'systemTags' => [ + [ + 'apiName' => 'DeleteWordGroup', + 'description' => '删除关键词策略', 'operationType' => 'get', - 'riskType' => 'none', - 'chargeType' => 'free', - 'abilityTreeNodes' => [ - 'FEATURElearnFME3AK', + 'ramAction' => [ + 'action' => 'rai:DeleteWordGroup', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], ], ], - 'parameters' => [ - [ - 'name' => 'RegionId', - 'in' => 'query', - 'schema' => [ - 'description' => '地域ID。', - 'type' => 'string', - 'required' => false, - 'example' => 'cn-shanghai', + [ + 'apiName' => 'BatchContentAsyncDetect', + 'description' => '批量内容异步检测', + 'operationType' => 'get', + 'additionalActions' => [], + 'ramAction' => [ + 'action' => 'rai:BatchContentAsyncDetect', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'title' => 'Schema of Response', - 'description' => '响应。', - 'type' => 'object', - 'properties' => [ - 'Code' => [ - 'description' => '状态码,00000代表成功;其它代表失败。', - 'type' => 'string', - 'example' => '00000', - ], - 'Data' => [ - 'description' => '响应数据。', - 'type' => 'object', - 'properties' => [ - 'CheckResult' => [ - 'description' => '- -1:该账号未注册'."\n" - .'- 0:该账号正常使用中'."\n" - .'- 1:该账号已被冻结,无法使用RAI服务', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '1', - ], - ], - ], - 'HttpStatusCode' => [ - 'description' => '错误码描述。', - 'type' => 'integer', - 'format' => 'int32', - 'example' => '200', - ], - 'Message' => [ - 'description' => '如有错误,返回错误信息。', - 'type' => 'string', - 'example' => '""', - ], - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '请求ID。', - 'type' => 'string', - 'example' => 'AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****', - ], - 'Success' => [ - 'description' => '候选值:True/False,代表了是否当前API调用本身是成功的。不代表后续业务操作的成功。', - 'type' => 'boolean', - 'example' => 'True', - ], - ], + [ + 'apiName' => 'CreateWordGroup', + 'description' => '创建关键词策略', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:CreateWordGroup', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + [ + 'apiName' => 'ListPolicy', + 'description' => '查询检测策略列表', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'rai:ListPolicy', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'RAI', 'resourceType' => '全部资源', 'arn' => '*'], + ], + ], ], - 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"00000\\",\\n \\"Data\\": {\\n \\"CheckResult\\": 1\\n },\\n \\"HttpStatusCode\\": 200,\\n \\"Message\\": \\"\\\\\\"\\\\\\"\\",\\n \\"RequestId\\": \\"AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****\\",\\n \\"Success\\": true\\n}","type":"json"}]', - 'title' => '检查账号状态', - ], - ], - 'endpoints' => [ - [ - 'regionId' => 'cn-shanghai', - 'endpoint' => 'rai.cn-shanghai.aliyuncs.com', ], + 'resourceTypes' => [], ], ]; |
