Developer API for custom integrations
For developers: Build custom chat interfaces, integrate with your app, or connect to other tools. Simple REST API with streaming support. Non-developer? Use our no-code widget instead—no API needed. See how →
Base URL
/api/v1
Status
Operational
Auth
Bearer key + allowed origins
Version
v1 · SSE streaming
Three steps to ship a production-ready chat experience.
Generate a scoped key, lock down origins, and call the chat endpoint with streaming responses. The defaults keep your team safe while you move fast.
Create a scoped key
Issue an API key per app with allowed origins to control access.
Set allowed origins
Whitelist production and staging domains to prevent key leakage.
Send a chat request
Post a user message, optionally stream tokens, and log the session id.
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message": "Summarize today’s incidents",
"stream": true
}'
const res = await fetch('/api/v1/chat', {
method: 'POST',
headers: {
'Authorization': `Bearer ${'$'}API_KEY`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ message: 'Hey!', stream: true })
});
// Read chunks as they arrive
for await (const chunk of res.body) {
console.log(new TextDecoder().decode(chunk));
}
A focused API surface that covers the full customer loop.
Keep responses streaming and track sessions without extra infrastructure. Everything ships with sensible defaults.
/api/v1/chat
Send a user message and receive a streaming AI response tailored to your dataset. Sessions keep context across turns.
Request
{
"message": "Summarize the outage playbook",
"api_key": "your_api_key",
"session_id": "sess_9Rna21",
"stream": true
}Response
event: message
data: {"content":"Hi there! I read through your playbook—here's the short version..."}
event: end
data: {"session_id":"sess_9Rna21"}/api/v1/usage
Monitor requests, token usage, and costs per app to keep your team cost-aware.
Request
GET /api/v1/usage?api_key=your_api_key&start_date=2024-01-01
Response
{
"success": true,
"usage": {
"total_requests": 1842,
"total_input_tokens": 205401,
"total_output_tokens": 216529,
"total_tokens": 421930,
"total_cost": 12.45
},
"by_model": []
}/api/v1/sessions
Retrieve chat sessions with message history and usage metadata for your app.
Request
GET /api/v1/sessions?api_key=your_api_key&include_all=true
Response
{
"success": true,
"sessions": [
{
"session_id": "sess_9Rna21",
"last_at": "2024-01-15T10:30:00Z",
"total_tokens": 2430,
"preview": "Hi there! I read through..."
}
],
"meta": {
"current_page": 1,
"per_page": 20,
"has_more": false
}
}Security & Compliance
Enterprise-grade security with encryption at rest and in transit. Your data stays protected.
Data Privacy
You own your content. Delete files anytime for GDPR compliance. Control exactly where your widget appears. No lock-in, ever.
Secure Access
TLS encryption, allowed origins, and scoped API keys prevent unauthorized access to your data.
Reliable Infrastructure
Runs on SOC 2-audited cloud infrastructure with transparent data retention. Your files and vector data can be deleted at any time.
Ready to Build Your AI Chatbot?
Upload your documents, embed the widget, and let customers get instant answers around the clock. Start free — upgrade when your traffic grows.