Developer Platform

Build with KarmasAI

You can register and test a signed webhook endpoint today. Event delivery, our REST API and the Node.js / Python SDKs are in private beta. Here's where we're headed.

Getting Started

Up and running in minutes

1. Request beta access

The developer API is in private beta. Request access and we'll provision your API key and onboard you.

2. Install the SDK

Install the SDK for your language of choice. We support Node.js and Python with more coming soon.

3. Make your first call

Create an agent, assign a phone number, and your AI is ready to handle calls.

SDKs & Libraries

Choose your language

Node.js

TypeScript / JavaScript

npm install @karmasai/sdk

Python

Python 3.8+

pip install karmasai

REST API

Any language

curl https://api.karmas.ai/v1/

Node.js Example

Create an agent in 10 lines

Our SDK makes it simple to create agents, assign phone numbers, and start handling calls programmatically.

agent.ts
import { KarmasAI } from '@karmasai/sdk';

const karmas = new KarmasAI({
  apiKey: process.env.KARMAS_API_KEY,
});

// Create an agent
const agent = await karmas.agents.create({
  name: 'Reception Agent',
  voice: 'alloy',
  language: 'en-US',
  systemPrompt: `You are a friendly receptionist for
    Acme Dental. Help callers book appointments,
    answer questions, and take messages.`,
  knowledgeBaseId: 'kb_123',
  tools: ['calendar_booking', 'sms_notification'],
});

// Assign a phone number
await karmas.phoneNumbers.assign({
  agentId: agent.id,
  number: '+14155551234',
});

// Listen for call events
karmas.webhooks.on('call.ended', async (event) => {
  console.log('Call summary:', event.data.summary);
  console.log('Sentiment:', event.data.sentiment);
  console.log('Duration:', event.data.duration);
});

Python Example

Outbound calls made easy

Initiate outbound calls with context, get transcripts, and analyze results programmatically.

outbound.py
from karmasai import KarmasAI

karmas = KarmasAI(api_key="your-api-key")

# Initiate an outbound call
call = karmas.calls.create(
    agent_id="agent_abc123",
    to="+14155551234",
    context={
        "customer_name": "John Smith",
        "appointment_date": "2025-03-15",
        "reason": "appointment_reminder"
    }
)

# Get call results
result = karmas.calls.get(call.id)
print(f"Status: {result.status}")
print(f"Duration: {result.duration}s")
print(f"Transcript: {result.transcript}")

API Reference

RESTful API endpoints

Full CRUD operations for agents, calls, knowledge bases, and more

POST/v1/agentsCreate a new AI agent
GET/v1/agents/:idRetrieve agent details
POST/v1/calls/initiateInitiate an outbound call
GET/v1/calls/:idGet call details and transcript
POST/v1/knowledge-basesCreate a knowledge base
POST/v1/knowledge-bases/:id/documentsUpload documents
GET/v1/analytics/callsQuery call analytics
POST/v1/webhooksRegister a webhook endpoint

Real-time webhooks

The planned event set covers calls starting, ending and being transferred, and recordings becoming ready, so you can build workflows that react to call events.

Endpoints are registered with a secret and every payload carries an HMAC-SHA256 signature; the delivery path retries with exponential backoff. Automatic event dispatch is still in private beta — today you can register an endpoint and send it a signed test delivery.

call.started
call.ended
call.transferred
call.recording.ready
agent.created
agent.updated
campaign.completed
knowledge_base.synced

Start building today

Get your API key and deploy your first AI voice agent in minutes.