提交图片进行全球版权近似检索。系统会自动检测图片中的图案、美术作品元素等,然后在全球版权库中进行跨库比对。支持多图片同时检索,每张图片可独立配置检索范围。

启用规则(重要)

  • copyrightEnabled 控制是否启用全球版权检索
  • copyright 详细配置对象仅在 copyrightEnabled=true 时生效
  • copyrightEnabled=true 时,copyright 对象必须设置,否则返回 400 错误

请求参数

参数类型必填默认说明
taskIDstringUUID自定义的任务唯一 ID (UUID),不传则自动生成
imagesarray[]图片列表,限制 1 至 10 个
images[].imageIDstring""前端生成的图片唯一标识
images[].imagestring""可公开访问的图片地址或 base64 图片
images[].searchScopeobject{}该图片的检索范围配置
images[].searchScope.copyrightEnabledbooleanfalse是否启用全球版权检索(设为 true
images[].searchScope.copyrightobject{}全球版权检索配置(当 copyrightEnabled=true 时必须提供)
images[].searchScope.copyright.autoSegmentbooleanfalse是否启用 AI 自动裁剪检测元素
images[].searchScope.copyright.minWidthnumber80AI 自动裁剪的最小宽度(像素)
images[].searchScope.copyright.minHeightnumber80AI 自动裁剪的最小高度(像素)

提示:在 images[].searchScope 中,仅需设置 copyrightEnabled=true 并填写 copyright 配置,无需设置其他检索源(trademarkEnableddesignPatentEnabled 等保留为 false 或省略即可)。

请求示例

cURLPython
curl -X POST "https://api.trohub.com/v1/infringement/image-search" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"taskID":"copyright-demo-uuid","images":[{"imageID":"img-cr-001","image":"https://example.com/images/artwork.jpg","searchScope":{"copyrightEnabled":true,"copyright":{"autoSegment":false}}}]}'
import requests

url = "https://api.trohub.com/v1/infringement/image-search"
headers = {
    "X-API-Key": "YOUR_API_KEY",
    "Content-Type": "application/json"
}
payload = {
    "taskID": "copyright-demo-uuid",
    "images": [{
        "imageID": "img-cr-001",
        "image": "https://example.com/images/artwork.jpg",
        "searchScope": {
            "copyrightEnabled": True,
            "copyright": {"autoSegment": False}
        }
    }]
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())
🔧 API 沙盒测试 POST /infringement/image-search

响应示例

{
  "success": true,
  "message": "Element search tasks submitted successfully",
  "data": {
    "taskIDs": [
      "h0d0a0b3-f09c-4824-a745-0d29759c253h"
    ]
  }
}