Documentation

Agent API

Create, list, update, and delete voice AI agents. Agents define the voice (TTS), LLM, transcriber (STT), conversational flow, filler phrases, idle handling, and post-call behavior.

Quick Start

Create your first agent with just a name and welcome message. All other settings are optional.

cURL
curl -X POST "https://bkbharatai.blutec.ai/api/agents/create" \
  -H "Authorization: Bearer your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Assistant",
    "welcome_message": "Hello! How can I help you today?",
    "languages": ["en"]
  }'

Basic Operations

List, get, update, and delete agents.

cURL
# List all your agents
curl -X GET "https://bkbharatai.blutec.ai/api/agents" \
  -H "Authorization: Bearer your_api_key"

# Get a single agent
curl -X GET "https://bkbharatai.blutec.ai/api/agents/AGENT_ID" \
  -H "Authorization: Bearer your_api_key"

# Update an agent
curl -X PUT "https://bkbharatai.blutec.ai/api/agents/AGENT_ID" \
  -H "Authorization: Bearer your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Name",
    "welcome_message": "New greeting..."
  }'

# Delete an agent
curl -X DELETE "https://bkbharatai.blutec.ai/api/agents/AGENT_ID" \
  -H "Authorization: Bearer your_api_key"

Configuration Options

Expand each section to see how to configure specific features. All options are optional.

Complete Example

Full example with all configuration options. Use this as a reference when building complex agents.

cURL
curl -X POST "https://bkbharatai.blutec.ai/api/agents/create" \
  -H "Authorization: Bearer your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "My Sales Assistant",
  "welcome_message": "Hello, I am calling regarding your recent inquiry.",
  "context_breakdown": [
    {"title": "Introduction", "body": "Introduce yourself.", "is_enabled": true},
    {"title": "Qualify", "body": "Ask if they are the decision maker.", "is_enabled": true}
  ],
  "languages": ["en"],
  "voice": {"provider": "google", "voice_id": "en-in-Chirp3-HD-Despina", "speed": 1.0},
  "model": {"provider": "openai", "model": "gpt-4.1-mini", "temperature": 0.7, "streaming": true},
  "transcriber": {"provider": "deepgram_stream", "model": "nova-3", "language": "en"},
  "idle_settings": {"threshold": 7, "first_message": "Are you still there?", "last_message": "Goodbye."},
  "background_track": {"enabled": false, "volume": 0.5},
  "call_transfer": {"enabled": false},
  "max_call_duration": 1800,
  "auto_end_call": true,
  "voicemail_detection": true,
  "web_search": {"enabled": false, "provider": "DuckDuckGo"},
  "filler": {
    "enabled": true,
    "after_sec": 1.5,
    "fillers": ["Let me check that for you", "One moment please"]
  },
  "post_call_actions": {
    "webhook": {"enabled": false, "url": "", "include": {"call_summary": true}}
  }
}'

Related