Create Conversation
Creates a new conversation session with an AI agent.
Endpoint
Authentication
Requires a valid API key or user authentication token.
Request Body
Request Fields
agent_id
string
Yes
ID of the agent to converse with
title
string
No
Title of the conversation (default: "New Conversation")
Response
Returns the created conversation object with LiveKit connection details.
Response Format
Response Fields
id
string
Unique identifier for the conversation
agent_id
string
ID of the agent participating in the conversation
title
string
Title of the conversation
created_at
datetime
When the conversation was created
updated_at
datetime
When the conversation was last updated
created_by
string
ID of the user who created the conversation
status
string
Current status ("active", "completed")
room_name
string
LiveKit room identifier
room_url
string
WebSocket URL for LiveKit connection
token
string
Authentication token for the room
Example Request
Example Response
Error Responses
400
Bad Request - Invalid input data
401
Unauthorized - Invalid or missing API key
403
Forbidden - Not authorized to use this agent
404
Not Found - Agent not found
500
Internal Server Error
Notes
A new room is automatically created for the conversation
The agent joins the room when the first user connects
The conversation status starts as "active"
All messages in the conversation are automatically recorded
The connection token has a limited validity period
Last updated