Add intelligent chat to your app in minutes. Durable message streams, instant SSE delivery, built-in AI responses with Gemini. Zero infrastructure to manage.
Three endpoints. Full-featured conversations. AI included.
curl -X POST https://api.belha.dev/v1/stream/sessions/chat-123 \ -H "Content-Type: application/json" \ -d '{"role":"client","text":"Hello!","ai":true}' curl -N https://api.belha.dev/v1/stream/sessions/chat-123?live=sse curl -X POST https://api.belha.dev/v1/stream/sessions/support \ -F "role=client" -F "text=What does this error mean?" \ -F "media=@screenshot.png" -F "ai=true" <iframe src="https://api.belha.dev/s/chat-123" style="width:100%;height:500px;border:none"/> Built for production. Designed for developers.
Messages delivered instantly via Server-Sent Events. No polling, no WebSocket complexity.
Built-in Gemini AI via Vertex AI. Multi-turn context, image analysis, document understanding.
Messages persist in Google Cloud Storage. Never lose data. Resume from any offset.
Upload images, PDFs, documents, and code files. AI analyzes them in context.
Disconnect and reconnect without missing messages. Offset tokens for perfect resume.
Multiple users in the same conversation. Clients, agents, and AI together.
Built for TanStack Start, Next.js, and any React framework. Real-time subscriptions, type safety, and seamless integration.
import { BelhaChat } from '@belha/sdk'; const chat = new BelhaChat('session-123', { onMessage: (msg) => console.log(msg.text), onConnect: () => setStatus('live'), }); chat.connect(); await chat.askAI('How do I reset my password?'); await chat.sendWithMedia( 'What does this error mean?', [screenshotFile], { ai: true } ); Multi-turn conversations with full history awareness. The AI remembers previous messages and analyzes uploaded files.
Last 20 messages for coherent conversations
JPG, PNG, GIF, WebP, HEIC support
PDF, TXT, Markdown, JSON, CSV
Python, Go, JS, TS, Java, Rust
Deployed on Google Cloud Run with automatic scaling.
From customer support to live collaboration.
Hybrid AI + human support. AI handles common questions, escalates complex issues.
Upload contracts, reports, or code for AI-powered analysis and summarization.
Push alerts and updates to users. SSE ensures instant delivery everywhere.
Standard HTTP endpoints that work with any language or framework.
| Method | Endpoint | Description |
|---|---|---|
| PUT | /v1/stream/sessions/{id} | Create conversation |
| POST | /v1/stream/sessions/{id} | Send message (with optional AI) |
| GET | /v1/stream/sessions/{id} | Read messages (supports SSE) |
| DELETE | /v1/stream/sessions/{id} | Delete conversation |
| GET | /media/{filename} | Get uploaded media |
| GET | /s/{id} | Embeddable chat UI |
Start building real-time conversations with AI in minutes. No credit card required.