Skip to main content
Runs

列出运行任务

返回属于指定线程的运行列表。

GET
/threads/{thread_id}/runs
cURL
curl --request GET \
  --url 'https://dashscope.aliyuncs.com/api/v1/threads/{thread_id}/runs' \
  --header 'Authorization: Bearer <YOUR_API_KEY>'
{
  "object": "list",
  "data": [
    {
      "id": "run_3de634fa-75d4-4370-adcf-92ba2a60c396",
      "object": "thread.run",
      "created_at": 1711517598169,
      "thread_id": "thread_cc2a3e9d-436b-482b-91c5-377e0f376506",
      "assistant_id": "asst_46e95014-ccac-435d-b884-c97ac44a94d9",
      "status": "completed",
      "required_action": {},
      "last_error": {},
      "expires_at": 0,
      "started_at": 0,
      "cancelled_at": 0,
      "failed_at": 0,
      "completed_at": 0,
      "model": "qwen-max",
      "instructions": "你是一个智能小助手,你可以根据用户的需求去调用不同的工具,进而给出回答。请酌情使用工具。",
      "tools": [
        {
          "type": "search"
        },
        {
          "type": "text_to_image"
        }
      ],
      "metadata": {},
      "usage": {
        "input_tokens": 66,
        "output_tokens": 9,
        "total_tokens": 75
      }
    }
  ],
  "first_id": "run_3de634fa-75d4-4370-adcf-92ba2a60c396",
  "last_id": "run_3de634fa-75d4-4370-adcf-92ba2a60c396",
  "has_more": false,
  "request_id": "ff3d2aea-555c-9825-80ca-24029a636641"
}

Authorizations

string
header
required

DashScope API Key,在控制台 API Key 页面(https://bailian.console.aliyun.com/settings/apikey)获取。请求头格式:Authorization: Bearer $DASHSCOPE_API_KEY。

Path Parameters

string
required

run list 所隶属的 thread ID。

Query Parameters

integer

本次查询的任务数。

string

按照创建时间升序或降序排列,可选 desc(默认)或 asc。

Response

200-application/json
Managed Agent API
Flow Agent API
RAG API
Connector API
框架集成
  • 框架