Build powerful integrations with the Aditya Labs REST API. Send messages to agents, manage knowledge bases, and retrieve analytics programmatically.
API access is available on Business plan ($99/mo) and above. View plans →
All API requests require an API key passed in the Authorization header. Generate your API key from Settings → API Keys in your dashboard.
Authorization: Bearer al_live_your_api_key_hereBase URL: https://adityalabs.ai/api
Send messages to your AI agent and receive responses. This is the core API for building custom chat interfaces.
/api/chatSend a message to an AI agent and receive a response.
{
"agent_id": "abc-123-def",
"message": "Do you accept insurance?",
"visitor_id": "visitor-456",
"session_id": "optional-session-id"
}curl -X POST https://adityalabs.ai/api/chat \
-H "Authorization: Bearer al_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "abc-123-def",
"message": "Do you accept insurance?"
}'const response = await fetch("https://adityalabs.ai/api/chat", {
method: "POST",
headers: {
"Authorization": "Bearer al_live_your_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
agent_id: "abc-123-def",
message: "Do you accept insurance?",
}),
});
const data = await response.json();
console.log(data.response);{
"response": "Yes! We accept most major insurance providers including Delta Dental, Cigna, and Aetna. Would you like to schedule an appointment?",
"session_id": "sess_abc123",
"tokens_used": 142
}List and retrieve your AI agents programmatically.
/api/agentsList all your AI agents with their configuration and status.
curl https://adityalabs.ai/api/agents \
-H "Authorization: Bearer al_live_your_key"const response = await fetch("https://adityalabs.ai/api/agents", {
headers: { "Authorization": "Bearer al_live_your_key" },
});
const { agents } = await response.json();
console.log(agents);{
"agents": [
{
"id": "abc-123-def",
"name": "Reception Bot",
"vertical": "dental",
"status": "active",
"total_executions": 1234,
"created_at": "2026-02-01T10:00:00Z"
}
]
}/api/agents/:idRetrieve a specific agent with full configuration details.
curl https://adityalabs.ai/api/agents/abc-123-def \
-H "Authorization: Bearer al_live_your_key"const response = await fetch("https://adityalabs.ai/api/agents/abc-123-def", {
headers: { "Authorization": "Bearer al_live_your_key" },
});
const agent = await response.json();{
"id": "abc-123-def",
"name": "Reception Bot",
"description": "AI receptionist for dental practice",
"vertical": "dental",
"status": "active",
"system_prompt": "You are a helpful dental receptionist...",
"config": { "greeting": "Hi! How can I help?", "temperature": 0.7 },
"total_executions": 1234,
"created_at": "2026-02-01T10:00:00Z"
}Manage your agent's knowledge base entries. Add FAQs, policies, and documentation that your agent uses to answer questions accurately.
/api/knowledgeAdd a new knowledge base entry to an agent.
{
"agentId": "abc-123-def",
"title": "Insurance Providers",
"content": "We accept Delta Dental, Cigna, Aetna, and most PPO plans. Contact us to verify your specific plan.",
"type": "faq"
}curl -X POST https://adityalabs.ai/api/knowledge \
-H "Authorization: Bearer al_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"agentId": "abc-123-def",
"title": "Insurance Providers",
"content": "We accept Delta Dental, Cigna...",
"type": "faq"
}'const response = await fetch("https://adityalabs.ai/api/knowledge", {
method: "POST",
headers: {
"Authorization": "Bearer al_live_your_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
agentId: "abc-123-def",
title: "Insurance Providers",
content: "We accept Delta Dental, Cigna...",
type: "faq",
}),
});{
"entry": {
"id": "kb-789",
"title": "Insurance Providers",
"type": "faq",
"has_embedding": true,
"created_at": "2026-02-19T15:00:00Z"
}
}Receive real-time notifications when events happen in your agents. Configure webhooks in Settings → Webhooks.
message_sentTriggered on every chat messagelead_capturedEmail or phone captured from widget visitorappointment_bookedCalendar booking made through agentcompliance_flagPII detected or jailbreak attempt blocked{
"event": "lead_captured",
"timestamp": "2026-02-19T15:30:00Z",
"data": {
"agent_id": "abc-123-def",
"visitor_email": "customer@example.com",
"source_url": "https://yoursite.com/contact"
}
}
// Verify signature:
// X-AgentForge-Signature: HMAC-SHA256 of body using your webhook secret| Plan | Requests/min | Messages/month |
|---|---|---|
| Business ($99) | 60 | 5,000 |
| Agency ($297) | 120 | 25,000 |
| Agency Elite ($497) | 300 | 100,000 |
| Enterprise ($999) | 600 | 500,000 |
Rate limit headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
| Code | Meaning | Resolution |
|---|---|---|
400 | Bad Request | Check request body format and required fields |
401 | Unauthorized | Verify your API key is correct and active |
403 | Forbidden | Your plan may not include API access |
404 | Not Found | Check the agent_id or resource ID exists |
429 | Rate Limited | Wait and retry, or upgrade your plan |
500 | Server Error | Retry after a moment. Contact support if persistent |
Get your API key from the dashboard and start building in minutes.