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

# 查询工作流运行列表

> 查询当前 API Key 所属用户的工作流运行记录

# 查询工作流运行列表

查询当前 API Key 所属用户提交的工作流运行记录，支持按工作流和运行状态过滤。

## 请求参数

<ParamField query="workflow_id" type="string">
  工作流 ID
</ParamField>

<ParamField query="status" type="string">
  运行状态，如 `queued`、`running`、`succeeded`、`failed`
</ParamField>

<ParamField query="page" type="integer">
  页码，从 `1` 开始，默认 `1`
</ParamField>

<ParamField query="page_size" type="integer">
  每页数量，默认 `20`，最大 `100`
</ParamField>

## 响应参数

<ResponseField name="code" type="integer">
  响应码，`0` 表示成功
</ResponseField>

<ResponseField name="msg" type="string">
  响应信息
</ResponseField>

<ResponseField name="data" type="object">
  运行列表

  <Expandable title="data">
    <ResponseField name="items" type="array">
      运行记录

      <Expandable title="items">
        <ResponseField name="run_order_id" type="string">
          运行订单 ID
        </ResponseField>

        <ResponseField name="workflow_id" type="string">
          工作流 ID
        </ResponseField>

        <ResponseField name="revision_id" type="string">
          运行版本 ID
        </ResponseField>

        <ResponseField name="title" type="string">
          工作流标题
        </ResponseField>

        <ResponseField name="run_status" type="string">
          运行状态
        </ResponseField>

        <ResponseField name="quote_amount" type="string">
          提交时的预估报价
        </ResponseField>

        <ResponseField name="final_amount" type="string">
          实际结算金额
        </ResponseField>

        <ResponseField name="created_at" type="string">
          创建时间
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="total" type="integer">
      总记录数
    </ResponseField>

    <ResponseField name="page" type="integer">
      当前页码
    </ResponseField>

    <ResponseField name="page_size" type="integer">
      每页数量
    </ResponseField>
  </Expandable>
</ResponseField>

## 代码示例

<CodeGroup>
  ```python Python theme={null}
  import requests

  url = "https://www.chenyu.cn/api/open/v2/workflow/run/list"
  headers = {
      "Authorization": "Bearer your_api_key",
      "Content-Type": "application/json"
  }
  params = {
      "workflow_id": "wf_861ef31e94dcfb10e6e7",
      "page": 1,
      "page_size": 20
  }

  response = requests.get(url, headers=headers, params=params)
  print(response.json())
  ```

  ```curl cURL theme={null}
  curl -X GET "https://www.chenyu.cn/api/open/v2/workflow/run/list?workflow_id=wf_861ef31e94dcfb10e6e7&page=1&page_size=20" \
    -H "Authorization: Bearer your_api_key" \
    -H "Content-Type: application/json"
  ```
</CodeGroup>

## 响应示例

```json theme={null}
{
  "code": 0,
  "msg": "查询成功",
  "data": {
    "items": [
      {
        "run_order_id": "wfrun_314ff7d8b7a5beff1388",
        "workflow_id": "wf_861ef31e94dcfb10e6e7",
        "revision_id": "wfr_f9f2a2dcb99d73b0c3aa",
        "title": "文生图111",
        "run_status": "succeeded",
        "quote_amount": "0.03000000",
        "final_amount": "0.00028780",
        "created_at": "2026-05-08T10:00:00Z"
      }
    ],
    "total": 1,
    "page": 1,
    "page_size": 20
  }
}
```
