[AI39-1] Design Patent Infringement Search - Submit Workflow Task

post
https://connect.patsnap.com/api/mcp/submit-workflow
Try in Sandbox

Submit images and create an asynchronous search task. Provide single-image url/target_image_base64 or an image_urls/image_base64s list. Do not mix the two modes or supply both lists. URL takes precedence when both single-image fields are supplied. For multiple images, recognize main/auxiliary views before optional LOC prediction. Manual loc_items take priority. Automatic LOC runs only when auto_loc_enabled=true, description is nonblank and manual LOC is empty. Preprocessing increases submit latency. After receiving task_id, use the existing status and stage-result APIs; the remaining workflow runs automatically. On automatic LOC failure or no result, continue with other filters and no automatic LOC restriction; check preprocessing.auto_loc.status. If all multi-view recognition attempts fail, use only the first image. Validation failures do not create a task; other submission failures do not guarantee that no task record exists. Request (single URL, manual LOC): ```json { "url": "https://static-open.zhihuiya.com/sample/common_demo.png", "description": "目标产品描述", "lang": "cn", "country": [ "CN", "EU" ], "loc_items": [ { "id": "14-03", "desc": "电信设备、无线遥控设备和无线电放大器" } ], "apply_start_time": "20200101", "apply_end_time": "20260917", "simple_legal_status": "1,2", "auto_loc_enabled": false } ``` Request (single Base64): ```json { "target_image_base64": "", "description": "目标产品描述", "lang": "cn" } ``` Request (automatic LOC, no manual LOC): ```json { "url": "https://static-open.zhihuiya.com/sample/common_demo.png", "description": "目标产品描述", "auto_loc_enabled": true } ``` Request (multiple URLs, automatic LOC): ```json { "image_urls": [ "https://static-open.zhihuiya.com/sample/common_demo.png", "https://example.com/product-side.png" ], "description": "目标产品描述", "auto_loc_enabled": true } ``` Request (multiple Base64 images, automatic LOC): ```json { "image_base64s": [ "", "" ], "description": "目标产品描述", "auto_loc_enabled": true } ``` Success (legacy single image): ```json { "code": 0, "success": true, "task_id": "task_0123456789ab", "country": [ "CN", "EU" ], "message": "工作流任务已提交", "status": true } ``` Success (multi-view and automatic LOC completed): ```json { "code": 0, "success": true, "task_id": "task_0123456789ab", "country": [ "CN", "EU" ], "message": "工作流任务已提交", "status": true, "preprocessing": { "multi_view": { "can_use_single_product_multi_view": true, "main_image_index": 1, "auxiliary_image_indexes": [ 0 ], "excluded_image_indexes": [], "reason": "同一产品的不同视角" }, "auto_loc": { "status": "completed", "loc_items": [ { "id": "14-03", "desc": "电信设备、无线遥控设备和无线电放大器" } ] } } } ``` Failure response: ```json { "code": 1, "success": false, "task_id": null, "message": "提交工作流失败: 图片读取失败", "status": false } ``` Validation failure (HTTP 422): ```json { "detail": [ { "loc": [ "body", "country" ], "msg": "Input should be a valid list", "type": "list_type", "input": "EU" } ], "code": 1, "status": false, "success": false } ``` Replace the example.com additional-view URL, task IDs and Base64 placeholders with real data. Use each image-input example separately; do not combine different modes into one request. Example message values are not guaranteed to be translated according to lang.

Success Response Example

Example of a successful API response

JSON
{
  "code": 0,
  "status": true,
  "country": [
    "CN",
    "EU"
  ],
  "message": "工作流任务已提交",
  "success": true,
  "task_id": "task_0123456789ab",
  "error_code": 0
}

Error Codes

List of possible error codes returned by this endpoint

Business Errors

Error CodeDescription
68300004Invalid parameter!
68300005Search api failure!
68300006Analytic basic access error!
68300007Bad request!
68300008Service error, please try again later!
68300010The file does not comply with upload specifications!

Platform Errors

Error CodeDescription
67200001API call exceeds the total limit set by the platform!
67200002Quota exceeds the limit!
67200003Access token expired or authentication error!
67200004No permission or API package quota has exceeded the limit!
67200005Insufficient balance, call failed!
67200006This client has expired and call failed!
67200007Exceeded the call limit, call failed!

HTTP Status Codes

Status CodeDescription
0Success
422Request validation failed: status=false, code=1, with detail retained.

Performance Metrics

Expected performance characteristics for this endpoint

Normal Response Time

5000 ms

Max Response Time

10000 ms