curl --location 'https://api.weya.live/backend/api/video-agents' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"agent_name": "Sales Video Agent",
"systemMessage": "You are a professional AI sales representative.",
"startMessage": "Hello! Welcome to Example Store. How can I help you today?",
"gender": "Female",
"avatar": "6891a23bc456def789aaaaaa",
"voice": "6891a23bc456def789bbbbbb",
"enable_input_video": false,
"selectedLanguage": ["en-IN"],
"rag": { "vectorDBCollection": "kb_sales_1a2b3c" },
"callSetting": { "callTimeout": 10, "voiceSpeed": 1 }
}'
{
"status": true,
"code": 201,
"message": "Video agent created successfully",
"errorMessage": null,
"data": {
"_id": "6891a23bc456def789123456",
"agent_name": "Sales Video Agent",
"gender": "Female",
"avatar": "6891a23bc456def789aaaaaa",
"voice": "6891a23bc456def789bbbbbb",
"enable_input_video": false,
"selectedLanguage": ["en-IN"],
"createdAt": "2026-07-21T09:30:00.000Z"
}
}
Video Agents
Create Video Agent
Create an AI video agent with an avatar, voice and instructions.
POST
/
api
/
video-agents
curl --location 'https://api.weya.live/backend/api/video-agents' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"agent_name": "Sales Video Agent",
"systemMessage": "You are a professional AI sales representative.",
"startMessage": "Hello! Welcome to Example Store. How can I help you today?",
"gender": "Female",
"avatar": "6891a23bc456def789aaaaaa",
"voice": "6891a23bc456def789bbbbbb",
"enable_input_video": false,
"selectedLanguage": ["en-IN"],
"rag": { "vectorDBCollection": "kb_sales_1a2b3c" },
"callSetting": { "callTimeout": 10, "voiceSpeed": 1 }
}'
{
"status": true,
"code": 201,
"message": "Video agent created successfully",
"errorMessage": null,
"data": {
"_id": "6891a23bc456def789123456",
"agent_name": "Sales Video Agent",
"gender": "Female",
"avatar": "6891a23bc456def789aaaaaa",
"voice": "6891a23bc456def789bbbbbb",
"enable_input_video": false,
"selectedLanguage": ["en-IN"],
"createdAt": "2026-07-21T09:30:00.000Z"
}
}
Overview
Create a video agent for the user who owns the API key. A video agent talks to visitors on screen with an avatar and a voice. To share it, create a video campaign with Create Campaign (channel_type: "video"), which returns the link people join with.
Only agent_name and systemMessage are required; other fields can be added later with Update Video Agent. Fields not listed below are ignored.
Prerequisites
- An API key for your workspace
Request
curl --location 'https://api.weya.live/backend/api/video-agents' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"agent_name": "Sales Video Agent",
"systemMessage": "You are a professional AI sales representative.",
"startMessage": "Hello! Welcome to Example Store. How can I help you today?",
"gender": "Female",
"avatar": "6891a23bc456def789aaaaaa",
"voice": "6891a23bc456def789bbbbbb",
"enable_input_video": false,
"selectedLanguage": ["en-IN"],
"rag": { "vectorDBCollection": "kb_sales_1a2b3c" },
"callSetting": { "callTimeout": 10, "voiceSpeed": 1 }
}'
Request Parameters
ID of the voice the agent speaks with, from Get Available Voices.
true to let the agent see the visitor’s camera; false for audio only. Pick a voice that works in the chosen mode.Knowledge base to answer from:
{ "vectorDBCollection": "<vectorDbCollection>" }, using the vectorDbCollection from Get Knowledge Bases.Data to extract after each conversation. Each item has
metric_name, type, an optional description and optional call_outcome_ids.Conversation settings, including
callTimeout (2–60 minutes, default 30), voiceSpeed (0.7–1.2, default 1), vocabulary (array of words), auto_detect_language and llmConfigs (temperature 0–2, top_p 0–1, max_tokens 1–2000, frequency_penalty and presence_penalty -2–2).Response
{
"status": true,
"code": 201,
"message": "Video agent created successfully",
"errorMessage": null,
"data": {
"_id": "6891a23bc456def789123456",
"agent_name": "Sales Video Agent",
"gender": "Female",
"avatar": "6891a23bc456def789aaaaaa",
"voice": "6891a23bc456def789bbbbbb",
"enable_input_video": false,
"selectedLanguage": ["en-IN"],
"createdAt": "2026-07-21T09:30:00.000Z"
}
}
The new video agent with its full configuration.
data._id is the ID to use as videoAgentId when creating a video campaign.Error Handling
Errors returnstatus: false, with the reason in errorMessage.
- 400 Bad Request –
agent_name is required,systemMessage is required, or a field has an invalid value (for examplegender, or acallSettingvalue out of range). - 401 Unauthorized – Missing or invalid API key.
- 429 Too Many Requests – More than 1,000 video agent requests in 15 minutes from your IP address.
- 500 Internal Server Error – Unexpected server error.
Was this page helpful?

