Threads
创建线程
创建一个新的线程(Thread)。
cURL
Copy
curl --request POST \
--url 'https://dashscope.aliyuncs.com/api/v1/threads' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data '
{
"messages": [
{
"role": "user",
"content": "你好"
}
]
}
'Copy
{
"id": "thread_e99a9fe7-0433-426f-98ad-a5139c36579c",
"object": "thread",
"created_at": 1711448377850,
"metadata": {},
"request_id": "dd9489ec-dbdb-95d4-9ff8-cfe29b61db27"
}