v1
latestOpenAPI 3.0.02026-07-174565114.3 KBv1
Create empty thread
Create a new empty thread. Note: initialMessages is not supported yet; create the thread first, then add messages via runs/message endpoints.
post/v1/threads
Request body
Example request
{
"initialMessages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Hello, world!"
}
]
}
]
}Response
Created thread
Example response
{
"id": "thr_abc123xyz",
"runStatus": "idle",
"lastRunError": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
},
"createdAt": "2024-01-15T12:00:00Z",
"updatedAt": "2024-01-15T12:05:00Z"
}