[AI39-2] 外观防侵权检索-查询工作流任务状态
查询任务整体状态和各阶段摘要,用于轮询。顶层 status=true 仅表示查询成功;任务是否执行成功应读取 task.workflow_status。task.country 是保存的提交地区条件。 输入示例(参数通过 URL query 传递,无请求体): ```http GET /api/mcp/task/status?task_id=task_0123456789ab ``` 成功响应示例: ```json { "code": 0, "success": true, "task": { "task_id": "task_0123456789ab", "workflow_status": "running", "current_stage": "rerank", "current_stage_order": 3, "title": "产品外观检索", "country": [ "CN", "EU" ], "total_execution_duration": null, "error_message": null, "created_at": "2026-09-17 02:00:00+00:00" }, "stages": [ { "stage": "convert_lineart", "stage_order": 1, "status": "completed", "execution_duration": 12.3, "retry_count": 0, "error_message": null }, { "stage": "image_search", "stage_order": 2, "status": "completed", "execution_duration": 8.5, "retry_count": 0, "error_message": null }, { "stage": "rerank", "stage_order": 3, "status": "running", "execution_duration": null, "retry_count": 0, "error_message": null }, { "stage": "generate_report", "stage_order": 4, "status": "pending", "execution_duration": null, "retry_count": 0, "error_message": null } ], "status": true } ``` 失败响应示例: ```json { "code": 1, "success": false, "message": "任务不存在: task_0123456789ab", "status": false } ``` 示例中的任务 ID 和地址需替换;Base64 占位符需替换为实际图片数据。result_data 示例省略了业务内容。示例中的 message 为实际接口文本示意,不保证随 lang 翻译。
请求参数
此 API 接口支持的参数列表
| 名称 | 类型 | 示例 | 描述 |
|---|---|---|---|
必填 | string | task_0123456789ab | 【必填】提交接口返回的任务 ID。 示例:"task_0123456789ab" |
错误码
此接口可能返回的错误码列表
业务错误码
| 错误码 | 描述 |
|---|---|
68300004 | 请求参数异常! |
68300005 | 查询Api失败! |
68300006 | 解析基本存取错误! |
68300007 | 存在错误的请求! |
68300008 | 服务中断异常,请稍后再试! |
68300010 | 文件不符合上传规范! |
平台错误码
| 错误码 | 描述 |
|---|---|
67200001 | API整体限流错误! |
67200002 | 用户调用请求限流限制错误! |
67200003 | 申请token的key和secret不正确或者状态错误! |
67200004 | 无权限或该接口的套餐已超过系统设置的上限! |
67200005 | 账户余额不足,调用失败! |
67200006 | 客户端已过期,调用失败! |
67200007 | 超过调用额度,调用失败! |
HTTP 状态码
| 状态码 | 描述 |
|---|---|
0 | 请求成功 |
422 | 参数校验失败:status=false、code=1,并保留 detail。 |
性能指标
此接口的预期性能特征
正常响应时间
5000 ms
最大响应时间
10000 ms