- 系统介绍
- 系统 优势
- 补充说明
- 辅助功能
- 按量计费
- 按次计费
列出消息
GET
https://api.zyai.online/v1/threads/{thread_id}/messages
请求参数
Path 参数
thread_id
string
必需
Query 参数
limit
integer
可选
order
string
可选
after
string
可选
before
string
可选
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.zyai.online/v1/threads//messages'
返回响应
🟢200成功
application/json
Body
object
string
必需
data
array [object {10}]
必需
id
string
必需
object
string
必需
created_at
integer
必需
thread_id
string
必需
role
string
必需
content
array [object {2}]
必需
file_ids
array[string]
必需
assistant_id
null
必需
run_id
null
必需
metadata
object
必需
first_id
string
必需
last_id
string
必需
has_more
boolean
必需
示例
{
"object": "list",
"data": [
{
"id": "msg_abc123",
"object": "thread.message",
"created_at": 1699016383,
"thread_id": "thread_abc123",
"role": "user",
"content": [
{
"type": "text",
"text": {
"value": "How does AI work? Explain it in simple terms.",
"annotations": []
}
}
],
"file_ids": [],
"assistant_id": null,
"run_id": null,
"metadata": {}
},
{
"id": "msg_abc456",
"object": "thread.message",
"created_at": 1699016383,
"thread_id": "thread_abc123",
"role": "user",
"content": [
{
"type": "text",
"text": {
"value": "Hello, what is AI?",
"annotations": []
}
}
],
"file_ids": [
"file-abc123"
],
"assistant_id": null,
"run_id": null,
"metadata": {}
}
],
"first_id": "msg_abc123",
"last_id": "msg_abc456",
"has_more": false
}