> ## Documentation Index
> Fetch the complete documentation index at: https://docs.acturehub.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 创建诊断任务

> 使用上传返回的 file_id 创建 BP 诊断流水线。

```http theme={null}
POST /api/open/runs
Authorization: Bearer <API_TOKEN>
Content-Type: application/json
```

```json theme={null}
{
  "file_id": "of_...",
  "pipeline": "bp_diagnosis",
  "target": "export_optimization"
}
```

## target

| target                | 说明                                     |
| --------------------- | -------------------------------------- |
| `export_preliminary`  | 生成初步诊断报告产物                             |
| `export_optimization` | 生成初步诊断 JSON、完整诊断 JSON、PDF 与 DOCX 等完整产物 |

完整业务接入通常使用 `export_optimization`。

创建成功后返回：

```json theme={null}
{
  "code": 0,
  "message": "流水线已创建，等待执行",
  "data": {
    "pipeline_run_id": "uuid",
    "status": "QUEUED",
    "queue_message_id": "queue-task-id"
  }
}
```

<Note>
  调用方应保存 `pipeline_run_id`，后续状态、日志和产物查询都以它为主键。不要使用 `queue_message_id` 作为业务任务 ID。
</Note>
