Skip to main content
Messages

检索消息

检索指定线程中的一条消息。

GET
/threads/{thread_id}/messages/{message_id}
cURL
curl --request GET \
  --url 'https://dashscope.aliyuncs.com/api/v1/threads/{thread_id}/messages/{message_id}' \
  --header 'Authorization: Bearer <YOUR_API_KEY>'
{
  "id": "message_ea26d29d-4509-490e-98e9-9f6238bd821b",
  "object": "thread.message",
  "created_at": 1711508622598,
  "thread_id": "thread_e99a9fe7-0433-426f-98ad-a5139c36579c",
  "assistant_id": "",
  "run_id": "",
  "role": "user",
  "content": [
    {
      "type": "text",
      "text": {
        "value": "你好",
        "annotations": []
      }
    }
  ],
  "metadata": {},
  "name": "",
  "plugin_call": {},
  "tool_calls": [],
  "status": "",
  "request_id": "4d5ce962-91c3-9edb-87f7-00bbf985135e"
}

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

待检索的 message 所传入的 thread ID。

string
required

待检索的 message ID。

Response

200-application/json
Managed Agent API
Flow Agent API
RAG API
Connector API
框架集成
  • 框架
Assistant API(下线中)