Conversations (Text and Voice)
A conversation is a series of text, audio, and image exchanges between a user and a character.
You can use the conversation endpoint to ask the user's personal model for the context you need. For example, Imersian, an interior design app, uses the API to ask a user's personal model about aesthetic preferences.
You can also use the conversation endpoint for voice generation. For example, USlap uses the endpoint to generate audio in a user's voice for a daily motivational message.
Create a new conversation
Create a new conversation between a user and a character
POST
https://api.vana.com/api/v0/conversations
Returns the ID of the newly created conversation
Request Body
Name | Type | Description |
---|---|---|
characterId* | uuid |
Sample Response Body
List existing conversations
Lists conversations between a user and other characters
GET
https://api.vana.com/api/v0/conversations
Sample Response Body
List messages from a conversation
Lists messages for a given conversation
GET
https://api.vana.com/api/v0/conversations/:conversation-id
Path Parameters
Name | Type | Description |
---|---|---|
conversation-id* | uuid |
Sample Response Body
Send a message (Synchronous)
Send a new message in a conversation
POST
https://api.vana.com/api/v0/conversations/:conversation-id/chat
Path Parameters
Name | Type | Description |
---|---|---|
conversation-id* | uuid |
Request Body
Name | Type | Description |
---|---|---|
data* | String | The content of the message |
mimeType | String | Represents the mimeType of the data field (ex: text/plain, image/png) |
allow | String Array | The allowed mimetypes of the response from the character. To receive text, use |
Sample Request Body
Sample Response Body
Send a message (Stream)
Send a new message in a conversation
POST
https://api.vana.com/api/v0/conversations/:conversation-id/chat/stream
Path Parameters
Name | Type | Description |
---|---|---|
conversation-id* | uuid |
Request Body
Name | Type | Description |
---|---|---|
data* | String | The content of the message |
mimeType | String | Represents the mimeType of the data field (ex: text/plain, image/png) |
allow | String Array | The allowed mimetypes of the response from the character. To receive text, use |
Sample Request Body
Sample Response Body
Clear a conversation
Deletes all the messages in a conversation
POST
https://api.vana.com/api/v0/conversations/:conversation-id/clear
Path Parameters
Name | Type | Description |
---|---|---|
conversation-id* | uuid |
\Sample Response Body
Last updated