VirtuousAI
Reference

Chat

Get Attachment

GET
/api/v1/chat/attachments/{attachment_id}

Path Parameters

attachment_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/chat/attachments/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{
  "artifactId": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "id": "string",
  "ingestionStatus": "none",
  "messageId": "string",
  "mimeType": "string",
  "originalFilename": "string",
  "scope": "thread",
  "sizeBytes": 0,
  "threadId": "string",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Delete Attachment

DELETE
/api/v1/chat/attachments/{attachment_id}

Path Parameters

attachment_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

curl -X DELETE "https://loading/api/v1/chat/attachments/497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

List Threads

GET
/api/v1/chat/threads

Query Parameters

limit?integer
Default20
Range1 <= value <= 100
cursor?|

Header Parameters

authorization?|
X-API-Key?|
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",
      "crystallizeEligible": true,
      "id": "string",
      "lastMessageAt": "2019-08-24T14:15:22Z",
      "lastMessagePreview": "string",
      "lastTurnId": "string",
      "lastTurnStatus": "pending",
      "metadata": {},
      "systemPrompt": "string",
      "title": "string",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "nextCursor": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Create Thread

POST
/api/v1/chat/threads

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Request Body

application/json

agentSpecId?|
metadata?
systemPrompt?|
title?|

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/chat/threads" \  -H "Content-Type: application/json" \  -d '{}'
{
  "agentSpecId": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "crystallizeEligible": true,
  "id": "string",
  "lastMessageAt": "2019-08-24T14:15:22Z",
  "lastMessagePreview": "string",
  "lastTurnId": "string",
  "lastTurnStatus": "pending",
  "metadata": {},
  "systemPrompt": "string",
  "title": "string",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Bulk Delete Threads

POST
/api/v1/chat/threads/bulk-delete

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Request Body

application/json

all?boolean
Defaultfalse
threadIds?array<>
Itemsitems <= 100

Response 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

GET
/api/v1/chat/threads/{thread_id}

Path Parameters

thread_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
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",
  "crystallizeEligible": true,
  "id": "string",
  "lastMessageAt": "2019-08-24T14:15:22Z",
  "lastMessagePreview": "string",
  "lastTurnId": "string",
  "lastTurnStatus": "pending",
  "metadata": {},
  "systemPrompt": "string",
  "title": "string",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Update Thread

PATCH
/api/v1/chat/threads/{thread_id}

Path Parameters

thread_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Request Body

application/json

agentSpecId?|
metadata?|
systemPrompt?|
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",
  "crystallizeEligible": true,
  "id": "string",
  "lastMessageAt": "2019-08-24T14:15:22Z",
  "lastMessagePreview": "string",
  "lastTurnId": "string",
  "lastTurnStatus": "pending",
  "metadata": {},
  "systemPrompt": "string",
  "title": "string",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Delete Thread

DELETE
/api/v1/chat/threads/{thread_id}

Path Parameters

thread_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
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 Attachments

GET
/api/v1/chat/threads/{thread_id}/attachments

Path Parameters

thread_id*string
Formatuuid

Query Parameters

limit?integer
Default100
Range1 <= value <= 100
offset?integer
Default0
Range0 <= value

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/chat/threads/497f6eca-6276-4993-bfeb-53cbbbba6f08/attachments"
[
  {
    "artifactId": "string",
    "createdAt": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "id": "string",
    "ingestionStatus": "none",
    "messageId": "string",
    "mimeType": "string",
    "originalFilename": "string",
    "scope": "thread",
    "sizeBytes": 0,
    "threadId": "string",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
]
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Create Attachment

POST
/api/v1/chat/threads/{thread_id}/attachments

Path Parameters

thread_id*string
Formatuuid

Query Parameters

artifact_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Request Body

application/json

messageId?|

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/chat/threads/497f6eca-6276-4993-bfeb-53cbbbba6f08/attachments?artifact_id=497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
{
  "artifactId": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "id": "string",
  "ingestionStatus": "none",
  "messageId": "string",
  "mimeType": "string",
  "originalFilename": "string",
  "scope": "thread",
  "sizeBytes": 0,
  "threadId": "string",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Crystallize Thread

POST
/api/v1/chat/threads/{thread_id}/crystallize

Path Parameters

thread_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Request Body

application/json

name?|

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/chat/threads/497f6eca-6276-4993-bfeb-53cbbbba6f08/crystallize" \  -H "Content-Type: application/json" \  -d '{}'
{
  "automationId": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Create Feedback

POST
/api/v1/chat/threads/{thread_id}/feedback

Path Parameters

thread_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Request Body

application/json

comment?|
messageId?|
rating*string

User feedback rating on assistant responses.

Value in"positive" | "negative"
turnId?|

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/chat/threads/497f6eca-6276-4993-bfeb-53cbbbba6f08/feedback" \  -H "Content-Type: application/json" \  -d '{    "rating": "positive"  }'
{
  "comment": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "id": "string",
  "messageId": "string",
  "rating": "positive",
  "threadId": "string",
  "turnId": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

List Messages

GET
/api/v1/chat/threads/{thread_id}/messages

Path Parameters

thread_id*string
Formatuuid

Query Parameters

limit?integer
Default50
Range1 <= value <= 200
cursor?|

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/chat/threads/497f6eca-6276-4993-bfeb-53cbbbba6f08/messages"
{
  "items": [
    {
      "content": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "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

POST
/api/v1/chat/threads/{thread_id}/turns/cancel

Path Parameters

thread_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
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

POST
/api/v1/chat/threads/{thread_id}/turns/stream

Path Parameters

thread_id*string
Formatuuid

Header Parameters

X-User-Timezone?|
authorization?|
X-API-Key?|
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"
    }
  ]
}

Get Turn

GET
/api/v1/chat/turns/{turn_id}

Path Parameters

turn_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/chat/turns/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{
  "completedAt": "2019-08-24T14:15:22Z",
  "concurrencyKey": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "durationSeconds": 0,
  "error": {},
  "id": "string",
  "idempotencyKey": "string",
  "inputMessageId": "string",
  "modelId": "string",
  "outputMessageId": "string",
  "settings": {},
  "startedAt": "2019-08-24T14:15:22Z",
  "status": "pending",
  "threadId": "string",
  "updatedAt": "2019-08-24T14:15:22Z",
  "usage": {
    "cachedInputTokens": 0,
    "inputTokens": 0,
    "outputTokens": 0,
    "totalCost": "string"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}