Skip to main content
POST
/
v1
/
public
/
agents
Create Agent
curl --request POST \
  --url https://api.eigi.ai/v1/public/agents \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "agent_name": "Support Agent",
  "agent_type": "INBOUND",
  "agent_category": "Customer Service",
  "stt": {
    "provider_name": "DEEPGRAM",
    "model_name": "nova-2",
    "language": "en",
    "params": {}
  },
  "llm": {
    "provider_name": "OPENAI",
    "model_name": "gpt-4o",
    "params": {
      "temperature": 0.7
    }
  },
  "tts": {
    "provider_name": "CARTESIA",
    "model_name": "sonic-2",
    "language": "en",
    "voice_id": "a0e99841-438c-4a64-b679-ae501e7d6091",
    "params": {
      "speed": 1
    }
  },
  "prompt_content": "You are a helpful customer support agent.",
  "first_message_prompt": "Hello! How can I help you today?",
  "tools": {
    "end_call": true,
    "transfer_call": {
      "transfer_phone_number": "+919876543210"
    }
  }
}
'
{
  "id": "<string>",
  "agent_name": "<string>",
  "agent_description": "<string>",
  "agent_type": "INBOUND",
  "agent_category": "<string>",
  "agent_tips": [
    "<string>"
  ],
  "agent_mobile_number": [
    "<string>"
  ],
  "stt": {},
  "llm": {},
  "tts": {},
  "sts": {},
  "prompt": {
    "prompt_name": "<string>",
    "prompt_version": 123,
    "prompt_content": "<string>"
  },
  "first_message_prompt": "<string>",
  "dynamic_variables": [
    "<string>"
  ],
  "tools": {},
  "widget_config": {},
  "MediaFiles": [
    {
      "fileType": "<string>",
      "mediaUrl": "<string>"
    }
  ],
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Overview

Create a new AI agent with full configuration including speech-to-text (STT), large language model (LLM), text-to-speech (TTS), prompt, tools, and widget settings.

Prompt Configuration

You can configure the agent’s prompt in two ways:
  1. Inline prompt (prompt_content) — Provide the prompt text directly. An internal prompt is auto-created for the agent.
  2. Prompt reference (prompt) — Reference an existing prompt by name and optionally version.

Provider Restrictions (Public API)

ProviderAllowed params
STTNo params allowed (must be empty {})
LLMOnly temperature (0.0 - 2.0)
TTSOnly speed

Authentication

X-API-Key
string
required
Your eigi.ai API key. Must be prefixed with vk_.

Request Body

agent_name
string
required
Agent name (1-100 characters).
agent_type
string
required
Agent type: INBOUND or OUTBOUND.
stt
object
required
Speech-to-Text configuration.
llm
object
required
Large Language Model configuration.
tts
object
required
Text-to-Speech configuration.
agent_description
string
Agent description (max 500 characters).
agent_category
string
default:"other"
Agent category (e.g., Customer Service, Sales, Healthcare, etc.).
agent_tips
array
Array of usage tip strings for the agent.
agent_mobile_number
array
Mobile numbers to associate with the agent.
prompt_content
string
Inline prompt content. Auto-creates an internal prompt for the agent.
prompt
object
Reference to an existing prompt (alternative to prompt_content).
first_message_prompt
string
Agent’s greeting message displayed when a chat session starts.
tools
object
Configure agent tools. Each tool can be true (enable), false (disable), or an object with configuration.Available tools: end_call, transfer_call, schedule_call, set_language, background_audio, user_idle.
widget_config
object
Widget configuration for chat interface customization.

Response

Returns the complete agent object with all configurations, id, and timestamps.

Authorizations

X-API-Key
string
header
required

API key for authentication. Get your API key from the eigi.ai Dashboard under Settings → API Keys.

Body

application/json
agent_name
string
required

Agent name (1-100 characters)

Required string length: 1 - 100
Example:

"Customer Support Agent"

agent_type
enum<string>
required

Agent type

Available options:
INBOUND,
OUTBOUND
stt
object
required
llm
object
required
tts
object
required
agent_description
string

Agent description (max 500 characters)

Maximum string length: 500
agent_category
enum<string>
default:other

Agent category

Available options:
Customer Service,
Sales,
Scheduling,
Research,
Healthcare,
Customer Success,
Education,
Finance,
HR,
Legal,
Productivity,
Creative,
IT/DevOps,
E-commerce,
Entertainment,
Travel,
Wellness,
Anime,
Cartoon,
Gaming,
Lifestyle,
other
agent_tips
string[]

Usage tips for the agent

agent_mobile_number
string[]

Mobile numbers associated with the agent

prompt_content
string

Inline prompt content — auto-creates an internal prompt for the agent

prompt
object

Reference to an existing prompt (alternative to prompt_content)

first_message_prompt
string

Agent's greeting message shown when chat starts

tools
object

Configure agent tools. Each tool can be true (enable), false (disable), or an object with configuration.

widget_config
object

Widget configuration for chat interface customization

Response

Agent created successfully

id
string

Agent ID

agent_name
string

Agent name

agent_description
string

Agent description

agent_type
enum<string>

Agent type

Available options:
INBOUND,
OUTBOUND
agent_category
string

Agent category

agent_tips
string[]

Usage tips

agent_mobile_number
string[]

Associated mobile numbers

stt
object

STT configuration

llm
object

LLM configuration

tts
object

TTS configuration

sts
object

STS configuration (if set)

prompt
object

Prompt reference

first_message_prompt
string

Agent's greeting message

dynamic_variables
string[]

Dynamic variables in the prompt

tools
object

Configured tools

widget_config
object

Widget configuration

MediaFiles
object[]

Media files associated with the agent

created_at
string<date-time>

Creation timestamp

updated_at
string<date-time>

Last update timestamp