提交元素级多源综合检索任务。系统会自动检测图片中的文字、图形、Logo等元素,然后在商标库、外观专利库、版权库中分别进行跨库比对。支持多图片同时检索,每张图片可独立配置检索范围。
启用规则(重要):
trademarkEnabled/designPatentEnabled/copyrightEnabled布尔字段控制是否启用对应检索源- 详细配置(
trademark/designPatent/copyright对象)仅在对应 Enabled 为 true 时生效 - 当 Enabled=true 时,对应的详细配置对象必须设置,否则返回 400 错误
- 当 Enabled=false 时,忽略对应的高级配置对象
- 至少启用一个检索源,否则返回 400 错误
请求参数
| 参数 | 类型 | 必填 | 默认 | 说明 |
|---|---|---|---|---|
taskID | string | ❌ | UUID | 自定义的任务唯一 ID (UUID),不传则自动生成 |
images | array | ✅ | [] | 图片列表,限制 1 至 10 个 |
images[].imageID | string | ❌ | "" | 前端生成的图片唯一标识 |
images[].image | string | ✅ | "" | 可公开访问的图片地址或 base64 图片 |
images[].searchScope | object | ✅ | {} | 该图片的检索范围配置 |
images[].searchScope.trademarkEnabled | boolean | ✅ | false | 是否启用图形商标检索 |
images[].searchScope.designPatentEnabled | boolean | ✅ | false | 是否启用外观专利检索 |
images[].searchScope.copyrightEnabled | boolean | ✅ | false | 是否启用全球版权检索 |
images[].searchScope.trademark | object | ⚠️ | null | 图形商标检索配置(当 trademarkEnabled=true 时必须提供对象,不能为 null) |
images[].searchScope.trademark.autoSegment | boolean | ❌ | false | 是否启用 AI 自动裁剪检测元素 |
images[].searchScope.trademark.minWidth | number | ❌ | 60 | AI 自动裁剪的最小宽度(像素) |
images[].searchScope.trademark.minHeight | number | ❌ | 60 | AI 自动裁剪的最小高度(像素) |
images[].searchScope.trademark.countries | array | ✅ | ["US"] | 商标国家过滤列表 (现只支持美国) |
images[].searchScope.designPatent | object | ⚠️ | null | 外观专利检索配置(当 designPatentEnabled=true 时必须提供对象,不能为 null) |
images[].searchScope.designPatent.autoSegment | boolean | ❌ | false | 是否启用 AI 自动裁剪检测元素 |
images[].searchScope.designPatent.minWidth | number | ❌ | 100 | AI 自动裁剪的最小宽度(像素) |
images[].searchScope.designPatent.minHeight | number | ❌ | 100 | AI 自动裁剪的最小高度(像素) |
images[].searchScope.designPatent.removeBg | boolean | ❌ | false | 是否移除背景后检索 |
images[].searchScope.designPatent.countries | array | ✅ | ["US"] | 专利国家过滤列表 (如 ["US", "EU"]) |
images[].searchScope.designPatent.productName | string | ❌ | "" | 产品名称描述,用于辅助品类过滤 |
images[].searchScope.copyright | object | ❌ | null | 全球版权检索配置 |
images[].searchScope.copyright.autoSegment | boolean | ❌ | false | 是否启用 AI 自动裁剪检测元素 |
images[].searchScope.copyright.minWidth | number | ❌ | 80 | AI 自动裁剪的最小宽度(像素) |
images[].searchScope.copyright.minHeight | number | ❌ | 80 | AI 自动裁剪的最小高度(像素) |
请求示例
📝 图形商标示例
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":"trademark-demo-uuid","images":[{"imageID":"img-tm-001","image":"https://example.com/images/logo.png","searchScope":{"trademarkEnabled":true,"designPatentEnabled":false,"copyrightEnabled":false,"trademark":{"autoSegment":false,"countries":["US"]}}}]}'import requests
url = "https://api.trohub.com/v1/infringement/image-search"
headers = {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"taskID": "trademark-demo-uuid",
"images": [{
"imageID": "img-tm-001",
"image": "https://example.com/images/logo.png",
"searchScope": {
"trademarkEnabled": True,
"designPatentEnabled": False,
"copyrightEnabled": False,
"trademark": {"autoSegment": False, "countries": ["US"]}
}
}]
}
response = requests.post(url, headers=headers, json=payload)
print(response.json()) 🔗 外观专利示例
cURLPython
curl -X POST "https://api.trohub.com/v1/infringement" \
-H "X-API-Key: YOUT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"taskID":"patent-demo-uuid","images":[{"imageID":"img-dp-001","image":"https://example.com/images/product.jpg","searchScope":{"trademarkEnabled":false,"designPatentEnabled":true,"copyrightEnabled":false,"designPatent":{"autoSegment":false,"removeBg":false,"countries":["US"],"productName":"wireless headphone"}}}]}'import requests
url = "https://api.trohub.com/v1/infringement"
headers = {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"taskID": "patent-demo-uuid",
"images": [{
"imageID": "img-dp-001",
"image": "https://example.com/images/product.jpg",
"searchScope": {
"trademarkEnabled": False,
"designPatentEnabled": True,
"copyrightEnabled": False,
"designPatent": {
"autoSegment": False,
"removeBg": False,
"countries": ["US"],
"productName": "wireless headphone"
}
}
}]
}
response = requests.post(url, headers=headers, json=payload)
print(response.json()) ©️ 全球版权示例
cURLPython
curl -X POST "https://api.trohub.com/v1/infringement" \
-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":{"trademarkEnabled":false,"designPatentEnabled":false,"copyrightEnabled":true,"copyright":{"autoSegment":false}}}]}'import requests
url = "https://api.trohub.com/v1/infringement"
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": {
"trademarkEnabled": False,
"designPatentEnabled": False,
"copyrightEnabled": True,
"copyright": {"autoSegment": False}
}
}]
}
response = requests.post(url, headers=headers, json=payload)
print(response.json()) 🔧 API 沙盒测试 POST
/infringement 响应示例
{
"success": true,
"message": "Element search tasks submitted successfully",
"data": {
"taskIDs": [
"h0d0a0b3-f09c-4824-a745-0d29759c253h"
]
}
}