Unified Communication Platform

Connect with users through multiple channels using AI. Seamlessly integrate OpenAI assistants with voice capabilities and WhatsApp messaging.

Explore Features API Documentation

Key Features

AI Hub combines powerful technologies to create a unified communication platform that works across multiple channels.

💬

Text Communication

Leverage OpenAI's powerful Assistants API for intelligent text conversations with streaming responses.

  • Real-time streaming responses
  • Thread management and persistence
  • Function calling capabilities
  • WebSocket connections
📞

Voice Communication

Create natural voice conversations using Twilio and Ultravox integration.

  • Inbound and outbound calls
  • Real-time transcription
  • Transfer to human agents
  • Call recording and archiving
📱

WhatsApp Integration

Connect with users through WhatsApp messaging with comprehensive API support.

  • QR code session authentication
  • Text, media, and template messages
  • Status tracking (delivered, read)
  • Media handling and processing
🔌

n8n Integration

Integrate with the n8n workflow automation platform to extend functionality.

  • Webhook integrations
  • Custom business logic
  • External service connectors
  • Data transformation
🧩

Modular Architecture

Easily extend the platform with new features thanks to a modular, service-oriented design.

  • Service-oriented architecture
  • Event-driven communication
  • Clean API boundaries
  • Robust error handling
🚀

Easy Development

Developer-friendly APIs and comprehensive documentation make integration simple.

  • RESTful API design
  • WebSocket support
  • Detailed documentation
  • Environment-based configuration

API Documentation

Explore our comprehensive API endpoints for text, voice, and WhatsApp integration.

Text API
Voice API
WhatsApp API
WebSocket

GET /api/text/threads

Get all active text threads.

curl -X GET https://your-server.com/api/text/threads \ -H "Content-Type: application/json"

POST /api/text/threads

Create a new thread.

curl -X POST https://your-server.com/api/text/threads \ -H "Content-Type: application/json" \ -d '{"metadata": {"userId": "123"}}'

GET /api/text/threads/:threadId/messages

Get messages for a thread.

curl -X GET https://your-server.com/api/text/threads/thread_abc123/messages \ -H "Content-Type: application/json"

POST /api/text/threads/:threadId/messages

Send a message to a thread.

curl -X POST https://your-server.com/api/text/threads/thread_abc123/messages \ -H "Content-Type: application/json" \ -d '{"content": "Hello, AI!", "metadata": {"userId": "123"}}'

GET /api/voice/calls

Get active voice calls.

curl -X GET https://your-server.com/api/voice/calls \ -H "Content-Type: application/json"

GET /api/voice/calls/:callId/transcript

Get transcript for a call.

curl -X GET https://your-server.com/api/voice/calls/call_123/transcript \ -H "Content-Type: application/json"

POST /api/voice/create-call

Create an outbound call.

curl -X POST https://your-server.com/api/voice/create-call \ -H "Content-Type: application/json" \ -d '{ "to": "+15551234567", "from": "+15557654321", "prompt": "You are a helpful assistant.", "languageHint": "EN", "metadata": {"userId": "123"} }'

POST /api/whatsapp/sessions

Create a new WhatsApp session.

curl -X POST https://your-server.com/api/whatsapp/sessions \ -H "Content-Type: application/json" \ -d '{"sessionId": "user_123_session"}'

GET /api/whatsapp/sessions/:sessionId/qr

Get QR code for a session.

curl -X GET https://your-server.com/api/whatsapp/sessions/user_123_session/qr \ -H "Content-Type: application/json"

POST /api/whatsapp/messages

Send a text message.

curl -X POST https://your-server.com/api/whatsapp/messages \ -H "Content-Type: application/json" \ -d '{ "sessionId": "user_123_session", "to": "1234567890", "text": "Hello from AI Hub!" }'

POST /api/whatsapp/webhook

Webhook endpoint for WhatsApp events.

# This endpoint receives webhooks from WhatsApp servers # You don't typically call this endpoint directly

Text Chat WebSocket

Connect to receive real-time AI responses.

// JavaScript WebSocket example const ws = new WebSocket('wss://your-server.com'); // With existing thread const ws = new WebSocket('wss://your-server.com?threadId=thread_abc123'); // Send a message ws.send(JSON.stringify({ type: 'user_message', message: 'Hello, AI!', metadata: { userId: '123' } })); // Handle responses ws.onmessage = (event) => { const data = JSON.parse(event.data); console.log(data); };

WhatsApp QR Code WebSocket

Connect to receive QR code updates for WhatsApp sessions.

// JavaScript WebSocket example const ws = new WebSocket('wss://your-server.com/whatsapp/qr/session_123'); // Handle QR code updates ws.onmessage = (event) => { const data = JSON.parse(event.data); if (data.type === 'whatsapp_qr_code_ready') { // Display QR code displayQRCode(data.data.qrCode); } };

Ready to Get Started?

Check out our comprehensive documentation to integrate AI Hub into your applications.

GitHub Repository System Health