Skip to main content
POST

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

string
required
Your workspace API key. Create one from the profile menu in the dashboard → API Keys.

Request Parameters

string
required
Name of the video agent.
string
required
Instructions that define the agent’s behavior.
string
Greeting spoken when the conversation begins.
string
Avatar gender: Male or Female. Used to pick matching voices.
string
ID of the avatar shown on screen.
string
ID of the voice the agent speaks with, from Get Available Voices.
boolean
default:"true"
true to let the agent see the visitor’s camera; false for audio only. Pick a voice that works in the chosen mode.
array[string]
default:"[\"en-IN\"]"
Language codes the agent speaks.
object
Knowledge base to answer from: { "vectorDBCollection": "<vectorDbCollection>" }, using the vectorDbCollection from Get Knowledge Bases.
array[object]
Data to extract after each conversation. Each item has metric_name, type, an optional description and optional call_outcome_ids.
object
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

object
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 return status: false, with the reason in errorMessage.
  • 400 Bad Request – agent_name is required, systemMessage is required, or a field has an invalid value (for example gender, or a callSetting value 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.