Kodda Docs
Build, ship, and operate grounded AI bots with predictable limits.
This page is aligned with Kodda's server-enforced behavior: plans, ingestion constraints, API request contracts, and security policies.
Quickstart
- Create a workspace and activate a paid plan (default state is FREE).
- Create one Library and upload source files (max 5MB per file).
- Create a Bot and attach one or more Libraries.
- Publish the Bot for public link access or website embedding.
- For private programmatic access, create API keys on Pro and call /api/chat.
RAG Pipeline
Document Upload
Validate MIME + file signature, then persist a processing record.
Text Extraction
Parse PDF/DOCX/DOC/TXT/MD/CSV/JSON/XLSX/HTML/PPTX into plain text.
Chunking + Embedding
Split text into chunks and generate vectors via OpenAI-compatible embedding API.
Vector Search
Retrieve the most relevant chunks by semantic similarity and optional rerank.
Grounded Response
Generate answer + source list, with monthly usage enforcement.
Plan Matrix (Public Beta)
Limits are enforced server-side in bot, library, document, and chat APIs. Pro plan includes a 7-day free trial.
| Feature | Free | Pro |
|---|---|---|
| Bots | 1 | 3 |
| Libraries | 1 | 3 |
| Storage | 15MB | 50MB |
| Messages / Month | 100 | 5,000 |
| Estimated Knowledge Base Pages | 10,000 | 25,000 |
| Public Link | Yes | Yes |
| Website Embed | No | Yes |
| API Keys | No | Yes |
| Platform Integrations | No | Yes |
| Remove Branding | No | Yes |
| Auto-Sync | No | Yes |
| Advanced Analytics | No | Yes |
Pro Paid Features
- API Keys: Programmatic access via REST API with secure key authentication.
- Remove Branding: Hide "Powered by Kodda" from embedded widgets.
- Custom Rate Limiting: Configure per-bot request throttling.
- Integrations: Connect to Slack, Discord, Zapier, and more.
Ingestion Spec
Supported Extensions
Hard Limits
- Single file max size: 15MB.
- Workspace storage quota is enforced by plan.
- Chunk count guardrail is enforced for each bot.
Upload validation includes MIME checks and content signature checks (for example PDF header, Office zip signatures, JSON parse validation, and text-binary safety checks).
Chat API Contract
Endpoint: POST /api/chat
- Private bot: pass
x-api-keyheader (Pro). - Published public bot: request can be unauthenticated (session-guarded).
- Supports both single
messageand fullmessagesarray for conversation history.
Request with Messages Array (Recommended)
curl -X POST https://kodda.dev/api/chat \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"botId": "BOT_ID",
"messages": [
{ "role": "user", "content": "Hi, who are you?" },
{ "role": "assistant", "content": "I am your AI assistant." },
{ "role": "user", "content": "Summarize refund policy" }
],
"stream": false
}'Request with Single Message
curl -X POST https://kodda.dev/api/chat \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"botId": "BOT_ID",
"message": "Summarize refund policy",
"conversationId": "optional_existing_conversation_id",
"stream": false
}'Response
{
"answer": "Refunds are accepted within 30 days...",
"sources": [
{ "filename": "policy.pdf", "libraryName": "Product Docs", "score": 0.92, "content": "Relevant snippet..." }
],
"conversationId": "c_123",
"latencyMs": 842
}Request Parameters
| botId | Required. The bot ID to query. |
| message | Single message string (use this OR messages). |
| messages | Array of { role, content } objects for conversation history. Last message must be from user. |
| conversationId | Optional. Continue an existing conversation. Ignored if messages is provided. |
| stream | Boolean. Default false. If true, returns SSE events. |
Streaming mode (stream=true) emits SSE events: sources, token, done, and error.
API Reference
Authentication
Pass your API key in the x-api-key header or Authorization Bearer header. API keys are available on STARTER plans and above.
curl -H "x-api-key: kodda_xxxxxxxx" \
-H "Content-Type: application/json" \
-X POST https://kodda.dev/api/chat \
-d '{"botId": "...", "message": "..."}'Response Conventions
| 2xx | Success — JSON payload |
| 4xx | Validation or auth failure — { error: string } |
| 5xx | Server error — { error: string } |
API Reference — Live Playground
Test any endpoint directly from your browser. Enter your API key, fill in parameters, and hit Send Request. Codes are generated automatically in cURL, JavaScript, and Python.
/chat
/feedback
Security and Guardrails
- Plan gates are server-enforced for bots, libraries, documents, and chat quotas.
- Chat usage is atomically incremented and rolled back on generation failure.
- API keys are validated by secure hash lookup before request execution.
- CORS whitelist is enforced for published bots when configured.
- RevenueCat webhook sync is used as the source of billing entitlement truth.
REST API Integration
Request schema, auth setup, and integration examples.
Open guide
Website Chat Integration
Publish bots and embed chat with iframe or embed.js.
Open guide
Need clarification? Contact support@kodda.dev.