diff options
Diffstat (limited to 'data/zh_cn/aideepsign/2026-05-11')
| -rw-r--r-- | data/zh_cn/aideepsign/2026-05-11/api-docs.php | 876 |
1 files changed, 876 insertions, 0 deletions
diff --git a/data/zh_cn/aideepsign/2026-05-11/api-docs.php b/data/zh_cn/aideepsign/2026-05-11/api-docs.php new file mode 100644 index 0000000..81bdcfb --- /dev/null +++ b/data/zh_cn/aideepsign/2026-05-11/api-docs.php @@ -0,0 +1,876 @@ +<?php return [ + 'version' => '1.0', + 'info' => ['style' => 'RPC', 'product' => 'AIDeepSign', 'version' => '2026-05-11'], + 'directories' => ['CreateImageTask', 'CreateSensitiveScanTask', 'DetectAigcImage', 'GetImageTaskResult', 'GetSensitiveScanResult', 'VerifyImageSignature', 'SignUserImage', 'DetectImageBasicInfo', 'CreateImageDetectionTask', 'GetImageDetectionTaskResult'], + 'components' => [ + 'schemas' => [], + ], + 'apis' => [ + 'CreateImageDetectionTask' => [ + 'summary' => '创建异步图片检测任务,支持AIGC和篡改检测。', + 'path' => '', + 'methods' => ['get', 'post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'create', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATUREkms586TOR'], + 'tenantRelevance' => 'publicInformation', + ], + 'parameters' => [ + [ + 'name' => 'ClientToken', + 'in' => 'query', + 'allowEmptyValue' => false, + 'schema' => ['title' => '幂等参数', 'description' => '用于保证请求的幂等性。由客户端生成该参数值,要保证在不同请求间唯一。`ClientToken` 只支持 ASCII 字符,且不能超过 64 个字符。'."\n", 'type' => 'string', 'required' => false, 'example' => '5A2CFF0E-5718-45B5-9D4D-70B3FF3898'], + ], + [ + 'name' => 'ObjectKey', + 'in' => 'query', + 'schema' => ['description' => '待检测图片在 OSS 中的 `ObjectKey`。使用 `ObjectKey` 时需确保该 Key 属于当前调用者的命名空间。`ImageUrl` 与 `ObjectKey` 二选一,至少提供一个。'."\n", 'type' => 'string', 'required' => false, 'example' => 'deepsign/123456789/scan/abc12345.jpg'], + ], + [ + 'name' => 'ImageUrl', + 'in' => 'query', + 'schema' => ['description' => '待检测图片的 URL 地址,仅支持 HTTP/HTTPS 协议。`ImageUrl` 与 `ObjectKey` 二选一,至少提供一个。'."\n", 'type' => 'string', 'required' => false, 'example' => 'https://example.com/id-card.jpg'], + ], + [ + 'name' => 'DetectType', + 'in' => 'query', + 'schema' => ['description' => '检测类型。取值:`auto`(自动,默认)、`aigc`(仅 AIGC 检测)、`tamper`(凭证篡改检测)。', 'type' => 'string', 'required' => false, 'example' => 'auto'], + ], + [ + 'name' => 'CredType', + 'in' => 'query', + 'schema' => ['description' => '该参数已废弃', 'type' => 'string', 'required' => false, 'example' => 'deprecated'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => '返回参数包括请求 ID 和任务 ID,用于调用 `GetImageDetectionTaskResult` 查询结果。'."\n", + 'type' => 'object', + 'properties' => [ + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求 ID。'."\n", 'type' => 'string', 'example' => 'A1B2C3D4-E5F6-7890-ABCD-EF1234567890'], + 'Success' => ['description' => '请求是否成功。'."\n", 'type' => 'boolean'], + 'Message' => ['description' => '附加信息。请求成功时返回 `success`。'."\n", 'type' => 'string', 'example' => 'success'], + 'HttpStatusCode' => ['description' => 'HTTP 状态码。请求成功时返回 `200`。'."\n", 'type' => 'string', 'example' => '200'], + 'Code' => ['description' => '业务错误码。请求成功时返回 `OK`。'."\n", 'type' => 'string', 'example' => 'OK'], + 'TaskId' => ['description' => '任务 ID,用于调用 `GetImageDetectionTaskResult` 查询结果。'."\n", 'type' => 'string', 'example' => 'f47ac10b-58cc-4372-a567-0e02b2c3d479'], + ], + ], + ], + ], + 'errorCodes' => [ + 400 => [ + ['errorCode' => 'IdempotentParameterMismatch', 'errorMessage' => 'The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.', 'description' => ''], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '创建图片检测任务', + 'description' => '## 请求说明'."\n" + .'- 本接口用于创建一个异步的图片检测任务,支持自动分类、AIGC检测及篡改检测。'."\n" + .'- `ImageUrl` 和 `ObjectKey` 必须至少提供一个;如果同时提供,则优先使用 `ObjectKey`。'."\n" + .'- 当选择 `DetectType` 为 `auto` 时,系统将根据图片内容自动决定执行 AIGC 检测还是篡改检测。', + 'changeSet' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"A1B2C3D4-E5F6-7890-ABCD-EF1234567890\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"success\\",\\n \\"HttpStatusCode\\": \\"200\\",\\n \\"Code\\": \\"OK\\",\\n \\"TaskId\\": \\"f47ac10b-58cc-4372-a567-0e02b2c3d479\\"\\n}","type":"json"}]', + ], + 'CreateImageTask' => [ + 'methods' => ['get', 'post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'create', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATUREkms586TOR'], + 'tenantRelevance' => 'publicInformation', + ], + 'parameters' => [ + [ + 'name' => 'ClientToken', + 'in' => 'query', + 'allowEmptyValue' => false, + 'schema' => ['title' => '幂等参数', 'description' => '用于保证请求的幂等性。由客户端生成该参数值,要保证在不同请求间唯一。`ClientToken` 只支持 ASCII 字符,且不能超过 64 个字符。'."\n", 'type' => 'string', 'required' => false, 'example' => '5A2CFF0E-5718-45B5-9D4D-70B3FF3898'], + ], + [ + 'name' => 'Prompt', + 'in' => 'query', + 'schema' => ['title' => '图片描述文字(正向提示词),不超过800字符', 'description' => '图片描述文字(正向提示词),不超过 800 字符。'."\n", 'type' => 'string', 'required' => false, 'example' => '一间全是猫的会议室'], + ], + [ + 'name' => 'NegativePrompt', + 'in' => 'query', + 'schema' => ['title' => '反向提示词,不超过500字符', 'description' => '反向提示词,不超过 500 字符。'."\n", 'type' => 'string', 'required' => false, 'example' => '低质量,模糊,变形'], + ], + [ + 'name' => 'Model', + 'in' => 'query', + 'schema' => ['title' => '模型名称,默认qwen-image-2.0-pro', 'description' => '模型名称,默认 `qwen-image-2.0-pro`。'."\n", 'type' => 'string', 'required' => false, 'example' => 'qwen-image-2.0-pro'], + ], + [ + 'name' => 'Size', + 'in' => 'query', + 'schema' => ['title' => '图片尺寸(格式 宽*高),默认2048*2048', 'description' => '图片尺寸(格式 宽高),默认 `20482048`。'."\n", 'type' => 'string', 'required' => false, 'example' => '1024*1024'], + ], + [ + 'name' => 'N', + 'in' => 'query', + 'schema' => ['title' => '生成数量(1-6),默认1', 'description' => '生成数量(1~6),默认 `1`。'."\n", 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1'], + ], + [ + 'name' => 'Seed', + 'in' => 'query', + 'schema' => ['title' => '随机种子(0-2147483647),0表示随机', 'description' => '随机种子(0~2147483647),0 表示随机。'."\n", 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '42'], + ], + [ + 'name' => 'PromptExtend', + 'in' => 'query', + 'schema' => ['title' => '是否开启提示词智能改写,默认true', 'description' => '是否开启提示词智能改写,默认true', 'type' => 'boolean', 'required' => false], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求 ID。'."\n", 'type' => 'string', 'example' => 'A1B2C3D4-E5F6-7890-ABCD-EF1234567890'], + 'TaskId' => ['title' => '任务ID,用于查询生成结果', 'description' => '任务 ID,用于调用 `GetImageTaskResult` 查询结果。'."\n", 'type' => 'string', 'example' => 'f47ac10b-58cc-4372-a567-0e02b2c3d479'], + 'Success' => ['description' => '表示是否调用成功。true:调用成功。 false:调用失败。', 'type' => 'boolean'], + 'Message' => ['description' => '附加信息。请求成功时返回 `success`。'."\n", 'type' => 'string', 'example' => 'success'], + 'HttpStatusCode' => ['description' => 'HTTP 状态码。请求成功时返回 `200`。'."\n", 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Code' => ['description' => '业务错误码。请求成功时返回 `OK`。'."\n", 'type' => 'string', 'example' => 'OK'], + ], + ], + ], + ], + 'errorCodes' => [ + 400 => [ + ['errorCode' => 'IdempotentParameterMismatch', 'errorMessage' => 'The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.', 'description' => ''], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '创建图片生成任务', + 'summary' => '根据提供的文字描述生成图片,并返回任务ID。', + 'description' => '## 请求说明'."\n" + .'- 本接口用于创建AI图片生成任务,系统将依据用户提供的正向提示词(Prompt)生成相应的图片。'."\n" + .'- 支持配置反向提示词、模型选择、图片尺寸等参数以优化生成效果。'."\n" + .'- 默认情况下,生成的图片会自动嵌入C2PA数字签名;可选是否添加右下角水印。'."\n" + .'- 通过设置`ClientToken`参数可以保证请求的幂等性,确保在不同请求间唯一。'."\n" + .'- 创建任务后,使用`TaskId`调用`GetImageTaskResult`接口查询生成结果。'."\n", + 'changeSet' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"A1B2C3D4-E5F6-7890-ABCD-EF1234567890\\",\\n \\"TaskId\\": \\"f47ac10b-58cc-4372-a567-0e02b2c3d479\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"success\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Code\\": \\"OK\\"\\n}","type":"json"}]', + ], + 'CreateSensitiveScanTask' => [ + 'summary' => '用于创建图片敏感信息扫描任务并返回任务ID。', + 'methods' => ['get', 'post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'create', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATUREkms586TOR'], + 'tenantRelevance' => 'publicInformation', + ], + 'parameters' => [ + [ + 'name' => 'ClientToken', + 'in' => 'query', + 'allowEmptyValue' => false, + 'schema' => ['title' => '幂等参数', 'description' => '用于保证请求的幂等性。由客户端生成该参数值,要保证在不同请求间唯一。`ClientToken` 只支持 ASCII 字符,且不能超过 64 个字符。'."\n", 'type' => 'string', 'required' => false, 'example' => '5A2CFF0E-5718-45B5-9D4D-70B3FF3898'], + ], + [ + 'name' => 'ObjectKey', + 'in' => 'query', + 'schema' => ['title' => 'OSS文件路径', 'description' => '待扫描图片在 OSS 中的 `ObjectKey`。使用 `ObjectKey` 时需确保该 Key 属于当前调用者的命名空间。`ImageUrl` 与 `ObjectKey` 二选一,至少提供一个。'."\n", 'type' => 'string', 'required' => false, 'example' => 'deepsign/123456789/scan/abc12345.jpg'], + ], + [ + 'name' => 'ImageUrl', + 'in' => 'query', + 'schema' => ['description' => '待扫描图片的 URL 地址,仅支持 HTTP/HTTPS 协议。图片大小不超过 10 MB。`ImageUrl` 与 `ObjectKey` 二选一,至少提供一个。'."\n", 'type' => 'string', 'required' => false, 'example' => 'https://example.com/document.jpg'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求 ID。'."\n", 'type' => 'string', 'example' => 'A1B2C3D4-E5F6-7890-ABCD-EF1234567890'], + 'TaskId' => ['description' => '任务 ID,用于调用 `GetSensitiveScanResult` 查询结果。'."\n", 'type' => 'string', 'example' => 'f47ac10b-58cc-4372-a567-0e02b2c3d479'], + 'Success' => ['description' => '表示是否调用成功。true:调用成功。 false:调用失败。', 'type' => 'boolean', 'example' => 'True'], + 'Message' => ['description' => '附加信息', 'type' => 'string', 'example' => 'null'], + 'HttpStatusCode' => ['description' => 'HTTP状态码。', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Code' => ['description' => '内部错误码。', 'type' => 'string', 'example' => 'OK'], + ], + ], + ], + ], + 'errorCodes' => [ + 400 => [ + ['errorCode' => 'IdempotentParameterMismatch', 'errorMessage' => 'The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.', 'description' => ''], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '创建敏感信息扫描任务', + 'description' => '## 请求说明'."\n" + .'- 本接口用于创建图片敏感信息扫描任务,系统将对指定的图片进行敏感数据识别。'."\n" + .'- 支持通过图片URL或OSS ObjectKey指定待扫描图片。'."\n" + .'- 图片大小不能超过10MB。'."\n" + .'- `ImageUrl`和`ObjectKey`必须至少提供一个;如果两个都提供,则优先使用`ObjectKey`。'."\n" + .'- 使用`ObjectKey`时,需确保该Key属于当前调用者的命名空间,不允许跨租户访问。'."\n" + .'- 可以通过`ClientToken`参数保证请求的幂等性。'."\n", + 'changeSet' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"A1B2C3D4-E5F6-7890-ABCD-EF1234567890\\",\\n \\"TaskId\\": \\"f47ac10b-58cc-4372-a567-0e02b2c3d479\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"null\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Code\\": \\"OK\\"\\n}","type":"json"}]', + ], + 'DetectAigcImage' => [ + 'methods' => ['get', 'post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'get', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATUREkms586TOR'], + 'tenantRelevance' => 'publicInformation', + ], + 'parameters' => [ + [ + 'name' => 'ObjectKey', + 'in' => 'query', + 'schema' => ['description' => '待检测图片在 OSS 中的 ObjectKey。使用 ObjectKey 时需确保该 Key 属于当前调用者的命名空间。ImageUrl 与 ObjectKey 二选一,至少提供一个。'."\n", 'type' => 'string', 'required' => false, 'example' => 'deepsign/123456789/image-generation/abc12345-def6-7890-abcd-ef1234567890.png'], + ], + [ + 'name' => 'ImageUrl', + 'in' => 'query', + 'schema' => ['description' => '待检测图片的 URL 地址,仅支持 HTTP/HTTPS 协议。`ImageUrl` 与 `ObjectKey` 二选一,至少提供一个。'."\n", 'type' => 'string', 'required' => false, 'example' => 'https://example.com/photo.jpg'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求 ID。'."\n", 'type' => 'string', 'example' => 'A1B2C3D4-E5F6-7890-ABCD-EF1234567890'], + 'Body' => [ + 'description' => 'AIGC 检测结果标签列表。'."\n", + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'Label' => ['description' => '**检测标签**。取值:'."\n" + .'- `ai_generated`(AI 生成)'."\n" + .'- `non_ai_generated`(非 AI 生成)'."\n", 'type' => 'string', 'example' => 'ai_generated'], + 'Confidence' => ['description' => '**置信度**,取值范围 0~1,值越大表示可能性越高。'."\n", 'type' => 'string', 'example' => '0.51'], + ], + 'description' => '', + ], + ], + 'Success' => ['description' => '表示是否调用成功。true:调用成功。 false:调用失败。', 'type' => 'boolean'], + 'Message' => ['description' => '附加信息。请求成功时返回 `success`。'."\n", 'type' => 'string', 'example' => 'success'], + 'HttpStatusCode' => ['description' => 'HTTP 状态码。请求成功时返回 `200`。'."\n", 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Code' => ['description' => '业务错误码。请求成功时返回 `OK`。'."\n", 'type' => 'string', 'example' => 'OK'], + ], + ], + ], + ], + 'errorCodes' => [ + 400 => [ + ['errorCode' => 'IdempotentParameterMismatch', 'errorMessage' => 'The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.', 'description' => ''], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '检测AI生成图片', + 'summary' => '判断图片是否由AI生成,并返回检测标签及置信度。', + 'description' => '## 请求说明'."\n" + .'- 本接口用于检测指定图片是否为AI生成内容(AIGC),支持通过图片URL或OSS ObjectKey指定待检测图片。'."\n" + .'- ImageUrl和ObjectKey必须至少提供一个,如果两个都提供,则优先使用ObjectKey。'."\n" + .'- 使用ObjectKey方式时,系统会校验该ObjectKey是否属于当前调用者,不允许跨租户访问。'."\n" + .'- 该接口为同步接口,适合对单张图片进行实时检测。如果需要异步检测或同时进行凭证检测,请使用CreateImageDetectionTask接口。'."\n", + 'changeSet' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"A1B2C3D4-E5F6-7890-ABCD-EF1234567890\\",\\n \\"Body\\": [\\n {\\n \\"Label\\": \\"ai_generated\\",\\n \\"Confidence\\": \\"0.51\\"\\n }\\n ],\\n \\"Success\\": true,\\n \\"Message\\": \\"success\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Code\\": \\"OK\\"\\n}","type":"json"}]', + ], + 'DetectImageBasicInfo' => [ + 'methods' => ['post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'get', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATUREkms586TOR'], + 'autoTest' => true, + 'tenantRelevance' => 'publicInformation', + ], + 'parameters' => [ + [ + 'name' => 'ImageUrl', + 'in' => 'query', + 'schema' => ['description' => '图片的 URL 地址,仅支持 HTTP/HTTPS 协议。`ImageUrl` 与 `ObjectKey` 二选一,至少提供一个。'."\n", 'type' => 'string', 'required' => false, 'example' => 'https://example.com/photo.jpg'], + ], + [ + 'name' => 'ObjectKey', + 'in' => 'query', + 'schema' => ['description' => '图片在 OSS 中的 `ObjectKey`。使用 `ObjectKey` 时需确保该 Key 属于当前调用者的命名空间。`ImageUrl` 与 `ObjectKey` 二选一,至少提供一个。'."\n", 'type' => 'string', 'required' => false, 'example' => 'deepsign/123456789/image-generation/abc12345-def6-7890-abcd-ef1234567890.png'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'type' => 'object', + 'properties' => [ + 'Type' => ['description' => '图片格式,如 JPEG、PNG、GIF、WEBP 等。无法识别时返回 `UNKNOWN`。'."\n", 'type' => 'string', 'example' => 'PNG'], + 'RequestId' => ['description' => '请求 ID。'."\n", 'type' => 'string', 'example' => 'A1B2C3D4-E5F6-7890-ABCD-EF1234567890'], + 'Size' => ['description' => '文件大小(人类可读格式),如 1.5 MB、256 KB。'."\n", 'type' => 'string', 'example' => '2.3 MB'], + 'Dpi' => ['description' => '图片分辨率(宽 * 高),如 1920 * 1080。无法识别时为空。'."\n", 'type' => 'string', 'example' => '2048 * 2048'], + 'Name' => ['description' => '文件名。'."\n", 'type' => 'string', 'example' => 'photo.jpg'], + 'Success' => ['description' => '请求是否成功。'."\n", 'type' => 'boolean'], + 'Message' => ['description' => '附加信息。请求成功时返回 "success"。'."\n", 'type' => 'string', 'example' => 'success'], + 'HttpStatusCode' => ['description' => 'HTTP 状态码。请求成功时返回 200。'."\n", 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Code' => ['description' => '业务错误码。请求成功时返回 "OK"。'."\n", 'type' => 'string', 'example' => 'OK'], + ], + 'description' => '', + ], + ], + ], + 'errorCodes' => [ + 400 => [ + ['errorCode' => 'IdempotentParameterMismatch', 'errorMessage' => 'The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.', 'description' => ''], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '检测图片基本信息', + 'summary' => '获取指定图片的文件名、格式、大小和分辨率等基本信息。', + 'description' => '## 请求说明'."\n" + .'- 本接口用于检测并返回图片的基本信息,包括但不限于文件名、图片格式(如JPEG/PNG)、文件大小以及分辨率。'."\n" + .'- 支持通过提供图片URL或OSS ObjectKey来指定待检测的图片。如果同时提供了ImageUrl和ObjectKey,则优先使用ObjectKey。'."\n" + .'- 当使用ObjectKey时,请确保该对象属于当前调用者的命名空间内,不允许跨租户访问。'."\n" + .'- 可选参数ClientToken用于保证请求的幂等性,建议每次请求都生成一个新的唯一值。'."\n", + 'changeSet' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Type\\": \\"PNG\\",\\n \\"RequestId\\": \\"A1B2C3D4-E5F6-7890-ABCD-EF1234567890\\",\\n \\"Size\\": \\"2.3 MB\\",\\n \\"Dpi\\": \\"2048 * 2048\\",\\n \\"Name\\": \\"photo.jpg\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"success\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Code\\": \\"OK\\"\\n}","type":"json"}]', + ], + 'GetImageDetectionTaskResult' => [ + 'path' => '', + 'methods' => ['get', 'post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'get', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATUREkms586TOR'], + 'tenantRelevance' => 'publicInformation', + ], + 'parameters' => [ + [ + 'name' => 'ClientToken', + 'in' => 'query', + 'allowEmptyValue' => false, + 'schema' => ['title' => '幂等参数', 'description' => '用于保证请求的幂等性。由客户端生成该参数值,要保证在不同请求间唯一。`ClientToken` 只支持 ASCII 字符,且不能超过 64 个字符。'."\n", 'type' => 'string', 'required' => false, 'example' => '5A2CFF0E-5718-45B5-9D4D-70B3FF3898'], + ], + [ + 'name' => 'TaskId', + 'in' => 'query', + 'schema' => ['description' => '任务 ID,由 `CreateImageDetectionTask` 返回。'."\n", 'type' => 'string', 'required' => true, 'example' => 'f47ac10b-58cc-4372-a567-0e02b2c3d479'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求 ID。'."\n", 'type' => 'string', 'example' => 'A1B2C3D4-E5F6-7890-ABCD-EF1234567890'], + 'TaskId' => ['description' => '任务 ID。'."\n", 'type' => 'string', 'example' => 'f47ac10b-58cc-4372-a567-0e02b2c3d479'], + 'Success' => ['description' => '请求是否成功。'."\n", 'type' => 'boolean'], + 'DetectMode' => ['description' => '实际执行的检测模式。取值:'."\n" + .'- aigc(仅 AIGC)'."\n" + .'- tamper(篡改检测)'."\n" + ."\n" + .'仅在 `Status` 为 `succeeded` 时返回。', 'type' => 'string', 'example' => 'tamper'], + 'Labels' => [ + 'description' => 'AIGC 检测结果标签列表。仅在 `Status` 为 `succeeded` 且包含 AIGC 检测时返回。'."\n", + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'Label' => ['description' => '检测标签。取值:'."\n" + .'- ai_generated(AI 生成)'."\n" + .'- non_ai_generated(非 AI 生成)'."\n", 'type' => 'string', 'example' => 'non_ai_generated'], + 'Confidence' => ['description' => '置信度,取值范围 0~1。'."\n", 'type' => 'number', 'format' => 'float', 'example' => '0.9562'], + ], + 'description' => '', + ], + ], + 'Message' => ['description' => '**附加信息**。请求成功时返回 `"success"`。任务失败时的错误信息。仅在 `Status` 为 `failed` 时返回。'."\n", 'type' => 'string', 'example' => 'success'], + 'HttpStatusCode' => ['description' => '**HTTP 状态码**。请求成功时返回 `200`。'."\n", 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Code' => ['description' => '**业务错误码**。请求成功时返回 `"OK"`。'."\n", 'type' => 'string', 'example' => 'OK'], + 'Tamper' => [ + 'description' => '篡改检测结果。仅在 `DetectType` 为 `tamper` 或 `auto`(且识别为凭证类图片)时返回。'."\n", + 'type' => 'object', + 'properties' => [ + 'RiskCode' => ['description' => '风险编码,`"0"` 表示无风险。'."\n", 'type' => 'string', 'example' => '0'], + 'RiskReasons' => [ + 'description' => '风险原因列表。无风险时为空数组。'."\n", + 'type' => 'array', + 'items' => ['description' => '风险原因', 'type' => 'string', 'example' => '图片存在AI生成痕迹'], + ], + 'BaseResults' => [ + 'description' => '基础检测结果,包含多维度检测得分。'."\n", + 'type' => 'object', + 'properties' => [ + 'Aigc' => [ + 'description' => 'AIGC 检测得分。'."\n", + 'type' => 'object', + 'properties' => [ + 'Score' => ['description' => 'AIGC 检测得分,范围 0~1,值越高表示 AI 生成可能性越大。', 'type' => 'number', 'format' => 'float', 'example' => '0.47'], + 'Desc' => ['description' => 'AIGC 检测结果描述。', 'type' => 'string', 'example' => '疑似AI生成图片'], + ], + ], + 'Aips' => [ + 'description' => 'AI 后处理检测得分。'."\n", + 'type' => 'object', + 'properties' => [ + 'Score' => ['description' => 'AI 后处理检测得分,范围 0~1,值越高表示 AI 后处理可能性越大。'."\n", 'type' => 'number', 'format' => 'float', 'example' => '0.12'], + 'Desc' => ['description' => 'AI 后处理检测结果描述。'."\n", 'type' => 'string', 'example' => '未发现AI后处理痕迹'], + ], + ], + 'PsLoc' => [ + 'description' => 'PS 篡改定位结果。'."\n", + 'type' => 'object', + 'properties' => [ + 'Items' => [ + 'description' => '篡改区域列表。'."\n", + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'Bbox' => [ + 'description' => '篡改区域边界框坐标,格式为 `[x1, y1, x2, y2]`。'."\n", + 'type' => 'array', + 'items' => ['description' => '篡改区域边界框坐标', 'type' => 'number', 'format' => 'float', 'example' => '[120.0, 80.0, 350.0, 260.0]'], + ], + 'Score' => ['description' => '该区域的篡改置信度,范围 `0~1`。'."\n", 'type' => 'number', 'format' => 'float', 'example' => '0.67'], + ], + 'description' => '', + ], + ], + 'Desc' => ['description' => 'PS 篡改定位结果描述。'."\n", 'type' => 'string', 'example' => '发现1处疑似PS修改区域'], + ], + ], + 'ImgType' => ['description' => '图片类型。'."\n", 'type' => 'string', 'example' => 'natural'], + ], + ], + 'LlmResult' => ['description' => '大模型综合分析结果。'."\n", 'type' => 'string', 'example' => '该图片经检测存在AI生成痕迹,AIGC检测得分0.95,建议进一步核实图片来源。'], + ], + ], + 'Status' => ['description' => '任务状态。取值:'."\n" + .'- `pending`(等待中)'."\n" + .'- `running`(执行中)'."\n" + .'- `succeeded`(已完成)'."\n" + .'- `failed`(失败)'."\n", 'type' => 'string', 'example' => 'succeeded'], + ], + ], + ], + ], + 'errorCodes' => [ + 400 => [ + ['errorCode' => 'IdempotentParameterMismatch', 'errorMessage' => 'The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.', 'description' => ''], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '查询图片检测任务结果', + 'summary' => '查询图片检测任务的状态和结果,包括AIGC检测标签和篡改检测结果。', + 'description' => '## 请求说明'."\n" + .'调用本接口查询通过 `CreateImageDetectionTask` 创建的异步检测任务的执行状态和结果。建议以2~5秒的间隔轮询,直到任务状态变为 `succeeded` 或 `failed`。'."\n" + ."\n" + .'### 注意事项'."\n" + .'- 请确保使用有效的 `TaskId` 进行查询。'."\n" + .'- 如果任务尚未完成,请适当增加轮询间隔时间,避免频繁请求导致资源浪费。'."\n", + 'changeSet' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"A1B2C3D4-E5F6-7890-ABCD-EF1234567890\\",\\n \\"TaskId\\": \\"f47ac10b-58cc-4372-a567-0e02b2c3d479\\",\\n \\"Success\\": true,\\n \\"DetectMode\\": \\"tamper\\",\\n \\"Labels\\": [\\n {\\n \\"Label\\": \\"non_ai_generated\\",\\n \\"Confidence\\": 0.9562\\n }\\n ],\\n \\"Message\\": \\"success\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Code\\": \\"OK\\",\\n \\"Tamper\\": {\\n \\"RiskCode\\": \\"0\\",\\n \\"RiskReasons\\": [\\n \\"图片存在AI生成痕迹\\"\\n ],\\n \\"BaseResults\\": {\\n \\"Aigc\\": {\\n \\"Score\\": 0.47,\\n \\"Desc\\": \\"疑似AI生成图片\\"\\n },\\n \\"Aips\\": {\\n \\"Score\\": 0.12,\\n \\"Desc\\": \\"未发现AI后处理痕迹\\"\\n },\\n \\"PsLoc\\": {\\n \\"Items\\": [\\n {\\n \\"Bbox\\": [\\n 0\\n ],\\n \\"Score\\": 0.67\\n }\\n ],\\n \\"Desc\\": \\"发现1处疑似PS修改区域\\"\\n },\\n \\"ImgType\\": \\"natural\\"\\n },\\n \\"LlmResult\\": \\"该图片经检测存在AI生成痕迹,AIGC检测得分0.95,建议进一步核实图片来源。\\"\\n },\\n \\"Status\\": \\"succeeded\\"\\n}","type":"json"}]', + ], + 'GetImageTaskResult' => [ + 'summary' => '查询异步图片生成任务的状态和结果,获取图片下载地址。', + 'methods' => ['get', 'post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'get', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATUREkms586TOR'], + 'tenantRelevance' => 'publicInformation', + ], + 'parameters' => [ + [ + 'name' => 'TaskId', + 'in' => 'query', + 'schema' => ['title' => '任务ID', 'description' => '任务 ID,由 `CreateImageTask` 返回。'."\n", 'type' => 'string', 'required' => true, 'example' => 'f47ac10b-58cc-4372-a567-0e02b2c3d479'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求 ID。'."\n", 'type' => 'string', 'example' => 'A1B2C3D4-E5F6-7890-ABCD-EF1234567890'], + 'TaskId' => ['title' => '任务ID', 'description' => '任务 ID。'."\n", 'type' => 'string', 'example' => 'f47ac10b-58cc-4372-a567-0e02b2c3d479'], + 'Status' => ['title' => '任务状态:pending/running/succeeded/failed', 'description' => '任务状态。取值:`pending`(等待中)、`running`(执行中)、`succeeded`(已完成)、`failed`(失败)。'."\n", 'type' => 'string', 'example' => 'succeeded'], + 'ErrorMessage' => ['title' => '错误信息(仅failed状态)', 'description' => '错误信息(仅failed状态)', 'type' => 'string', 'example' => 'Instance access forbidden.'], + 'Images' => [ + 'description' => '生成的图片列表。仅在 `Status` 为 `succeeded` 时返回。'."\n", + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'Url' => ['description' => '图片预签名下载地址,有效期 1 小时。'."\n", 'type' => 'string', 'example' => 'https://bucket.oss-cn-hangzhou.aliyuncs.com/deepsign/123456789/image-generation/abc12345.png?Expires=1718700000&OSSAccessKeyId=...'], + 'ObjectKey' => ['description' => '图片在 OSS 中的 `ObjectKey`,可用于后续接口调用。'."\n", 'type' => 'string', 'example' => 'deepsign/123456789/image-generation/abc12345-def6-7890-abcd-ef1234567890.png'], + ], + 'description' => '', + ], + ], + 'Success' => ['description' => '请求是否成功。'."\n", 'type' => 'boolean', 'example' => 'true'], + 'Message' => ['description' => '附加信息。请求成功时返回 `success`。任务失败时的错误信息。仅在 `Status` 为 `failed` 时返回。'."\n", 'type' => 'string', 'example' => 'success'], + 'HttpStatusCode' => ['description' => 'HTTP 状态码。请求成功时返回 `200`。'."\n", 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Code' => ['description' => '业务错误码。请求成功时返回 `OK`。'."\n", 'type' => 'string', 'example' => 'OK'], + ], + ], + ], + ], + 'errorCodes' => [ + 400 => [ + ['errorCode' => 'IdempotentParameterMismatch', 'errorMessage' => 'The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.', 'description' => ''], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '查询图片生成结果', + 'description' => '## 请求说明'."\n" + .'- 调用本接口可以查询通过 `CreateImageTask` 创建的异步图片生成任务的执行状态和结果。'."\n" + .'- 建议以 2~5 秒的间隔轮询,直到任务状态变为 `succeeded` 或 `failed`。'."\n" + .'- 任务成功后返回的图片下载地址(Url)为预签名地址,有效期 1 小时。'."\n" + .'- 为了保证请求的幂等性,可以通过设置 `ClientToken` 参数来实现。'."\n", + 'changeSet' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"A1B2C3D4-E5F6-7890-ABCD-EF1234567890\\",\\n \\"TaskId\\": \\"f47ac10b-58cc-4372-a567-0e02b2c3d479\\",\\n \\"Status\\": \\"succeeded\\",\\n \\"ErrorMessage\\": \\"Instance access forbidden.\\",\\n \\"Images\\": [\\n {\\n \\"Url\\": \\"https://bucket.oss-cn-hangzhou.aliyuncs.com/deepsign/123456789/image-generation/abc12345.png?Expires=1718700000&OSSAccessKeyId=...\\",\\n \\"ObjectKey\\": \\"deepsign/123456789/image-generation/abc12345-def6-7890-abcd-ef1234567890.png\\"\\n }\\n ],\\n \\"Success\\": true,\\n \\"Message\\": \\"success\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Code\\": \\"OK\\"\\n}","type":"json"}]', + ], + 'GetSensitiveScanResult' => [ + 'summary' => '查询敏感信息扫描任务的状态和结果,返回扫描发现的敏感数据详情。', + 'methods' => ['get', 'post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'get', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATUREkms586TOR'], + 'tenantRelevance' => 'publicInformation', + ], + 'parameters' => [ + [ + 'name' => 'TaskId', + 'in' => 'query', + 'schema' => ['title' => 'OSS文件路径', 'description' => '任务 ID,由 `CreateSensitiveScanTask` 返回。'."\n", 'type' => 'string', 'required' => true, 'example' => 'f47ac10b-58cc-4372-a567-0e02b2c3d479'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => 'Schema of Response', + 'description' => 'Schema of Response', + 'type' => 'object', + 'properties' => [ + 'RequestId' => ['title' => 'Id of the request', 'description' => '请求 ID。'."\n", 'type' => 'string', 'example' => 'A1B2C3D4-E5F6-7890-ABCD-EF1234567890'], + 'Status' => ['title' => '任务状态:pending/running/paused/terminated/completed', 'description' => '任务状态。取值:`running`(执行中)、`completed`(已完成)、`terminated`(终止/失败)。'."\n", 'type' => 'string', 'example' => 'completed'], + 'Result' => [ + 'title' => '扫描结果(仅completed状态返回)', + 'description' => '扫描结果(仅completed状态返回)', + 'type' => 'object', + 'properties' => [ + 'OssObjectDetail' => [ + 'description' => '扫描对象名称。'."\n", + 'type' => 'object', + 'properties' => [ + 'Name' => ['description' => '**扫描对象名称。**'."\n", 'type' => 'string', 'example' => 'abc12345.jpg'], + 'BucketName' => ['description' => '**所属 Bucket 名称。**'."\n", 'type' => 'string', 'example' => 'aideepsign-bucket'], + 'RiskLevelName' => ['description' => '**整体风险等级名称。**'."\n", 'type' => 'string', 'example' => 'S2'], + 'CategoryName' => ['description' => '**敏感数据分类名称。**'."\n", 'type' => 'string', 'example' => '个人信息'], + 'RuleList' => [ + 'description' => '命中的敏感数据规则列表。'."\n", + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'CategoryName' => ['description' => '规则所属分类名称。'."\n", 'type' => 'string', 'example' => '个人信息'], + 'RuleName' => ['description' => '规则名称。'."\n", 'type' => 'string', 'example' => '身份证号'], + 'Count' => ['description' => '命中次数。'."\n", 'type' => 'integer', 'format' => 'int32', 'example' => '1'], + 'RiskLevelName' => ['description' => '该规则的风险等级名称。'."\n", 'type' => 'string', 'example' => 'S2'], + ], + 'description' => '', + ], + ], + ], + ], + ], + ], + 'Success' => ['description' => '请求是否成功。'."\n", 'type' => 'boolean'], + 'Message' => ['description' => '附加信息。请求成功时返回 "success"。'."\n", 'type' => 'string', 'example' => 'success'], + 'HttpStatusCode' => ['description' => 'HTTP 状态码。请求成功时返回 200。'."\n", 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Code' => ['description' => '业务错误码。请求成功时返回 "OK"。'."\n", 'type' => 'string', 'example' => 'OK'], + ], + ], + ], + ], + 'errorCodes' => [ + 400 => [ + ['errorCode' => 'IdempotentParameterMismatch', 'errorMessage' => 'The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.', 'description' => ''], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '查询敏感信息扫描结果', + 'description' => '## 请求说明'."\n" + .'- 调用本接口查询通过 `CreateSensitiveScanTask` 创建的敏感信息扫描任务的执行状态和结果。'."\n" + .'- 建议以 3~5 秒的间隔轮询,直到任务状态变为 `completed` 或 `terminated`。'."\n" + .'- `ClientToken` 参数用于保证请求的幂等性,由客户端生成且在不同请求间唯一,支持 ASCII 字符,长度不超过 64 个字符。'."\n", + 'changeSet' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"A1B2C3D4-E5F6-7890-ABCD-EF1234567890\\",\\n \\"Status\\": \\"completed\\",\\n \\"Result\\": {\\n \\"OssObjectDetail\\": {\\n \\"Name\\": \\"abc12345.jpg\\",\\n \\"BucketName\\": \\"aideepsign-bucket\\",\\n \\"RiskLevelName\\": \\"S2\\",\\n \\"CategoryName\\": \\"个人信息\\",\\n \\"RuleList\\": [\\n {\\n \\"CategoryName\\": \\"个人信息\\",\\n \\"RuleName\\": \\"身份证号\\",\\n \\"Count\\": 1,\\n \\"RiskLevelName\\": \\"S2\\"\\n }\\n ]\\n }\\n },\\n \\"Success\\": true,\\n \\"Message\\": \\"success\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Code\\": \\"OK\\"\\n}","type":"json"}]', + ], + 'SignUserImage' => [ + 'summary' => '对用户上传的图片嵌入C2PA数字签名并返回下载地址。', + 'methods' => ['post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'readAndWrite', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'update', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATUREkms586TOR'], + 'autoTest' => true, + 'tenantRelevance' => 'publicInformation', + ], + 'parameters' => [ + [ + 'name' => 'ClientToken', + 'in' => 'query', + 'allowEmptyValue' => false, + 'schema' => ['title' => '幂等参数', 'description' => '用于保证请求的幂等性。由客户端生成该参数值,要保证在不同请求间唯一。ClientToken 只支持 ASCII 字符,且不能超过 64 个字符。'."\n", 'type' => 'string', 'required' => false, 'example' => '5A2CFF0E-5718-45B5-9D4D-70B3FF3898'], + ], + [ + 'name' => 'ImageUrl', + 'in' => 'query', + 'schema' => ['description' => '待签名图片的 URL 地址。支持 HTTP/HTTPS 链接。`ImageUrl` 与 `ObjectKey` 二选一,至少提供一个。', 'type' => 'string', 'required' => false, 'example' => 'https://example.com/photo.jpg'], + ], + [ + 'name' => 'ObjectKey', + 'in' => 'query', + 'schema' => ['description' => '待签名图片在 OSS 中的 `ObjectKey`。使用 `ObjectKey` 时需确保该 Key 属于当前调用者的命名空间。`ImageUrl` 与 `ObjectKey` 二选一,至少提供一个。'."\n", 'type' => 'string', 'required' => false, 'example' => 'deepsign/123456789/image-generation/abc12345-def6-7890-abcd-ef1234567890.png'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'type' => 'object', + 'properties' => [ + 'SignTime' => ['description' => '签名时间(ISO 8601 格式),如 `2026-01-15T08:30:00Z`。'."\n", 'type' => 'string', 'example' => '2026-06-18T10:30:00Z'], + 'RequestId' => ['description' => '请求 ID。'."\n", 'type' => 'string', 'example' => 'A1B2C3D4-E5F6-7890-ABCD-EF1234567890'], + 'SignedImageUrl' => ['description' => '已签名图片的预签名下载地址。'."\n", 'type' => 'string', 'example' => 'https://bucket.oss-cn-hangzhou.aliyuncs.com/deepsign/123456789/signed/abc12345.png?Expires=1718700000&OSSAccessKeyId=...'], + 'CertificateSubject' => ['description' => '签名证书的主题(Subject)信息。'."\n", 'type' => 'string', 'example' => 'CN=AIDeepSign User Certificate,O=Alibaba Cloud'], + 'ObjectKey' => ['description' => '已签名图片在 OSS 中的 ObjectKey,可用于后续接口调用。'."\n", 'type' => 'string', 'example' => 'deepsign/123456789/signed/abc12345-def6-7890-abcd-ef1234567890.png'], + 'Algorithm' => ['description' => '签名使用的算法,如 ps256、es256 等。'."\n", 'type' => 'string', 'example' => 'ps256'], + 'Success' => ['description' => '请求是否成功。'."\n", 'type' => 'boolean'], + 'Message' => ['description' => '附加信息。请求成功时返回 "success"。'."\n", 'type' => 'string', 'example' => 'success'], + 'HttpStatusCode' => ['description' => 'HTTP 状态码。请求成功时返回 200。'."\n", 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'Code' => ['description' => '业务错误码。请求成功时返回 "OK"。'."\n", 'type' => 'string', 'example' => 'OK'], + ], + 'description' => '', + ], + ], + ], + 'errorCodes' => [ + 400 => [ + ['errorCode' => 'IdempotentParameterMismatch', 'errorMessage' => 'The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.', 'description' => ''], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '图片签名', + 'description' => '## 请求说明'."\n" + .'- `ImageUrl` 和 `ObjectKey` 必须至少提供一个,如果两个都提供,则优先使用 `ObjectKey`。'."\n" + .'- 使用 `ObjectKey` 方式时,系统会校验该 `ObjectKey` 是否属于当前调用者,不允许跨租户访问。'."\n" + .'- 支持的图片格式为 JPEG 和 PNG,不支持的格式将返回 `C2PA_FORMAT_UNSUPPORTED` 错误。'."\n" + .'- 如果原图已包含 C2PA 签名,系统会保留原始签名作为成分,并在此基础上追加新签名。'."\n" + .'- 可通过 `ClientToken` 参数保证请求的幂等性,但需确保其在不同请求间唯一且不超过64个字符。'."\n", + 'changeSet' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"SignTime\\": \\"2026-06-18T10:30:00Z\\",\\n \\"RequestId\\": \\"A1B2C3D4-E5F6-7890-ABCD-EF1234567890\\",\\n \\"SignedImageUrl\\": \\"https://bucket.oss-cn-hangzhou.aliyuncs.com/deepsign/123456789/signed/abc12345.png?Expires=1718700000&OSSAccessKeyId=...\\",\\n \\"CertificateSubject\\": \\"CN=AIDeepSign User Certificate,O=Alibaba Cloud\\",\\n \\"ObjectKey\\": \\"deepsign/123456789/signed/abc12345-def6-7890-abcd-ef1234567890.png\\",\\n \\"Algorithm\\": \\"ps256\\",\\n \\"Success\\": true,\\n \\"Message\\": \\"success\\",\\n \\"HttpStatusCode\\": 200,\\n \\"Code\\": \\"OK\\"\\n}","type":"json"}]', + ], + 'VerifyImageSignature' => [ + 'methods' => ['post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + ], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => [ + 'operationType' => 'get', + 'riskType' => 'none', + 'chargeType' => 'free', + 'abilityTreeNodes' => ['FEATUREkms586TOR'], + 'autoTest' => true, + 'tenantRelevance' => 'publicInformation', + ], + 'parameters' => [ + [ + 'name' => 'ImageUrl', + 'in' => 'query', + 'schema' => ['description' => '待验证图片的 URL 地址。`ImageUrl` 与 `ObjectKey` 二选一,至少提供一个。'."\n", 'type' => 'string', 'required' => false, 'example' => 'https://example.com/signed-photo.jpg'], + ], + [ + 'name' => 'ObjectKey', + 'in' => 'query', + 'schema' => ['description' => '待验证图片在 OSS 中的 `ObjectKey`。使用 `ObjectKey` 时需确保该 Key 属于当前调用者的命名空间。`ImageUrl` 与 `ObjectKey` 二选一,至少提供一个。'."\n", 'type' => 'string', 'required' => false, 'example' => 'deepsign/123456789/image-generation/abc12345-def6-7890-abcd-ef1234567890.png'], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'type' => 'object', + 'properties' => [ + 'Message' => ['description' => '附加信息。请求成功时返回 `success`。'."\n", 'type' => 'string', 'example' => 'success'], + 'RequestId' => ['description' => '请求 ID。'."\n", 'type' => 'string', 'example' => 'A1B2C3D4-E5F6-7890-ABCD-EF1234567890'], + 'Issuer' => [ + 'description' => '签发者信息。'."\n", + 'type' => 'object', + 'properties' => [ + 'CommonName' => ['description' => '签发者通用名称(CN)。'."\n", 'type' => 'string', 'example' => 'AIDeepSign User Certificate'], + 'Organization' => ['description' => '签发者组织名称(O)。'."\n", 'type' => 'string', 'example' => 'Alibaba Cloud'], + ], + ], + 'HttpStatusCode' => ['description' => 'HTTP 状态码。请求成功时返回 `200`。'."\n", 'type' => 'integer', 'format' => 'int64', 'example' => '200'], + 'VerificationState' => ['description' => '签名验证状态。取值:Valid(签名有效)、Invalid(签名无效或已被篡改)、Trusted(签名有效且被信任)。', 'type' => 'string', 'example' => 'Valid'], + 'IssuerTrusted' => ['description' => '签发者是否可信。true 表示签发者证书由受信任的 CA 签发。'."\n", 'type' => 'boolean'], + 'Manifest' => [ + 'description' => '内容凭证清单信息。仅在图片包含 C2PA 签名时返回。'."\n", + 'type' => 'object', + 'properties' => [ + 'Assertions' => [ + 'description' => '断言信息列表,包含图片的来源和编辑历史等元数据。'."\n", + 'type' => 'array', + 'items' => [ + 'type' => 'object', + 'properties' => [ + 'Data' => ['description' => '断言数据,JSON 格式的详细元数据。'."\n", 'type' => 'string', 'example' => '{"actions":[{"action":"c2pa.created"}]}'], + 'Label' => ['description' => '断言标签,如 c2pa.actions、stds.exif 等。'."\n", 'type' => 'string', 'example' => 'c2pa.actions'], + ], + 'description' => '', + ], + ], + 'SignatureInfo' => [ + 'description' => '签名详细信息。'."\n", + 'type' => 'object', + 'properties' => [ + 'Alg' => ['description' => '签名算法,如 `ps256`、`es256` 等。'."\n", 'type' => 'string', 'example' => 'ps256'], + 'Issuer' => ['description' => '签名证书的签发者 DN。'."\n", 'type' => 'string', 'example' => 'CN=AIDeepSign CA,O=Alibaba Cloud'], + 'Time' => ['description' => '签名时间(ISO 8601 格式)。'."\n", 'type' => 'string', 'example' => '2026-06-18T10:30:00Z'], + ], + ], + ], + ], + 'Success' => ['description' => '请求是否成功。'."\n", 'type' => 'boolean'], + 'Code' => ['description' => '业务错误码。请求成功时返回 "OK"。'."\n", 'type' => 'string', 'example' => 'OK'], + ], + 'description' => '', + ], + ], + ], + 'errorCodes' => [ + 400 => [ + ['errorCode' => 'IdempotentParameterMismatch', 'errorMessage' => 'The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.', 'description' => ''], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => '验证图片签名', + 'summary' => '验证图片中的C2PA数字签名,返回签名状态及签发者信息。', + 'description' => '## 请求说明'."\n" + .'- 本接口用于验证图片中嵌入的 C2PA 数字签名,并返回签名验证状态、签发者可信度、签发者信息以及完整的内容凭证清单(Manifest)。'."\n" + .'- 支持通过图片 URL 或 OSS ObjectKey 指定待验证图片。如果同时提供 ImageUrl 和 ObjectKey,则优先使用 ObjectKey。'."\n" + .'- 使用 ObjectKey 方式时,系统会校验该 ObjectKey 是否属于当前调用者,不允许跨租户访问。'."\n" + .'- 为了保证请求的幂等性,可以提供 ClientToken 参数,但需确保其在不同请求间唯一且不超过 64 个字符。'."\n", + 'changeSet' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Message\\": \\"success\\",\\n \\"RequestId\\": \\"A1B2C3D4-E5F6-7890-ABCD-EF1234567890\\",\\n \\"Issuer\\": {\\n \\"CommonName\\": \\"AIDeepSign User Certificate\\",\\n \\"Organization\\": \\"Alibaba Cloud\\"\\n },\\n \\"HttpStatusCode\\": 200,\\n \\"VerificationState\\": \\"Valid\\",\\n \\"IssuerTrusted\\": true,\\n \\"Manifest\\": {\\n \\"Assertions\\": [\\n {\\n \\"Data\\": \\"{\\\\\\"actions\\\\\\":[{\\\\\\"action\\\\\\":\\\\\\"c2pa.created\\\\\\"}]}\\",\\n \\"Label\\": \\"c2pa.actions\\"\\n }\\n ],\\n \\"SignatureInfo\\": {\\n \\"Alg\\": \\"ps256\\",\\n \\"Issuer\\": \\"CN=AIDeepSign CA,O=Alibaba Cloud\\",\\n \\"Time\\": \\"2026-06-18T10:30:00Z\\"\\n }\\n },\\n \\"Success\\": true,\\n \\"Code\\": \\"OK\\"\\n}","type":"json"}]', + ], + ], + 'endpoints' => [ + ['regionId' => 'cn-hangzhou', 'regionName' => '华东1(杭州)', 'areaId' => 'asiaPacific', 'areaName' => '亚太', 'public' => 'aideepsign.cn-hangzhou.aliyuncs.com', 'endpoint' => 'aideepsign.cn-hangzhou.aliyuncs.com', 'vpc' => 'aideepsign-vpc.cn-hangzhou.aliyuncs.com'], + ], + 'errorCodes' => [ + ['code' => 'Throttling', 'message' => 'user xxx does not hold a valid subscription.', 'http_code' => 429, 'description' => '用户无有效订阅'], + ], + 'changeSet' => [], +]; |
