Reference
Chat
List Threads
Query Parameters
limit?integer
Default
20Range
1 <= value <= 100cursor?|
Header Parameters
authorization?|
X-API-Key?|
Cookie Parameters
vai_token?|
Response Body
application/json
application/json
curl -X GET "https://loading/api/v1/chat/threads"{
"items": [
{
"agentSpecId": "string",
"createdAt": "2019-08-24T14:15:22Z",
"id": "string",
"lastTurnStatus": "pending",
"title": "string",
"updatedAt": "2019-08-24T14:15:22Z"
}
],
"nextCursor": "string"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Create Thread
Header Parameters
authorization?|
X-API-Key?|
Cookie Parameters
vai_token?|
Request Body
application/json
agentSpecId*string
title?|
Response Body
application/json
application/json
curl -X POST "https://loading/api/v1/chat/threads" \ -H "Content-Type: application/json" \ -d '{ "agentSpecId": "string" }'{
"agentSpecId": "string",
"createdAt": "2019-08-24T14:15:22Z",
"id": "string",
"lastTurnStatus": "pending",
"title": "string",
"updatedAt": "2019-08-24T14:15:22Z"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Bulk Delete Threads
Header Parameters
authorization?|
X-API-Key?|
Cookie Parameters
vai_token?|
Request Body
application/json
all?boolean
Default
falsethreadIds?array<>
Items
items <= 100Response Body
application/json
application/json
curl -X POST "https://loading/api/v1/chat/threads/bulk-delete" \ -H "Content-Type: application/json" \ -d '{}'{
"deletedCount": 0
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Get Thread
Path Parameters
thread_id*string
Format
uuidHeader Parameters
authorization?|
X-API-Key?|
Cookie Parameters
vai_token?|
Response Body
application/json
application/json
curl -X GET "https://loading/api/v1/chat/threads/497f6eca-6276-4993-bfeb-53cbbbba6f08"{
"agentSpecId": "string",
"createdAt": "2019-08-24T14:15:22Z",
"id": "string",
"lastTurnStatus": "pending",
"title": "string",
"updatedAt": "2019-08-24T14:15:22Z"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Update Thread
Path Parameters
thread_id*string
Format
uuidHeader Parameters
authorization?|
X-API-Key?|
Cookie Parameters
vai_token?|
Request Body
application/json
agentSpecId?|
title?|
Response Body
application/json
application/json
curl -X PATCH "https://loading/api/v1/chat/threads/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{}'{
"agentSpecId": "string",
"createdAt": "2019-08-24T14:15:22Z",
"id": "string",
"lastTurnStatus": "pending",
"title": "string",
"updatedAt": "2019-08-24T14:15:22Z"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Delete Thread
Path Parameters
thread_id*string
Format
uuidHeader Parameters
authorization?|
X-API-Key?|
Cookie Parameters
vai_token?|
Response Body
application/json
curl -X DELETE "https://loading/api/v1/chat/threads/497f6eca-6276-4993-bfeb-53cbbbba6f08"Empty
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}List Messages
Path Parameters
thread_id*string
Format
uuidQuery Parameters
limit?integer
Default
50Range
1 <= value <= 200cursor?|
Header Parameters
authorization?|
X-API-Key?|
Cookie Parameters
vai_token?|
Response Body
application/json
application/json
curl -X GET "https://loading/api/v1/chat/threads/497f6eca-6276-4993-bfeb-53cbbbba6f08/messages"{
"items": [
{
"cancelled": false,
"content": "string",
"createdAt": "2019-08-24T14:15:22Z",
"createdBy": "string",
"durationSeconds": 0,
"format": "pydantic_ai",
"id": "string",
"rawData": {},
"role": "user",
"threadId": "string",
"turnId": "string",
"updatedAt": "2019-08-24T14:15:22Z"
}
],
"nextCursor": "string"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Cancel Active Turn
Path Parameters
thread_id*string
Format
uuidHeader Parameters
authorization?|
X-API-Key?|
Cookie Parameters
vai_token?|
Request Body
application/json
partialText?|
Response Body
application/json
curl -X POST "https://loading/api/v1/chat/threads/497f6eca-6276-4993-bfeb-53cbbbba6f08/turns/cancel" \ -H "Content-Type: application/json" \ -d '{}'Empty
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Stream Turn
Path Parameters
thread_id*string
Format
uuidHeader Parameters
X-User-Timezone?|
authorization?|
X-API-Key?|
Cookie Parameters
vai_token?|
Response Body
application/json
application/json
curl -X POST "https://loading/api/v1/chat/threads/497f6eca-6276-4993-bfeb-53cbbbba6f08/turns/stream"null{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}