Skip to content

sipgate AI FlowSDK Documentation

Build AI-powered voice assistants with real-time speech processing

What is sipgate AI Flow?

sipgate AI Flow is a platform for building AI-powered voice assistants with real-time speech processing capabilities. Whether you're building customer service bots, IVR systems, or interactive voice applications, the API works with any programming language using HTTP webhooks or WebSocket.

For All Languages

The API uses plain JSON over HTTP/WebSocket - no SDK required. Examples are provided in Python, Node.js, Go, Ruby, and more.

TypeScript SDK Available

If you're using TypeScript, we also provide a convenient SDK that wraps the API for easier development.

Key Features

  • Event-Driven Architecture - Respond to user speech, barge-ins, and session events
  • Multiple TTS Providers - Support for Azure Cognitive Services and ElevenLabs
  • Flexible Actions - Speak, play audio, transfer calls, and more
  • TypeScript First - Full type safety with comprehensive type definitions
  • Easy Integration - Express.js middleware and WebSocket support out of the box
  • Production Ready - Built for scale with proper error handling and validation

Quick Example (Any Language)

Python:

python
@app.route('/webhook', methods=['POST'])
def webhook():
    event = request.json
    if event['type'] == 'user_speak':
        return jsonify({
            'type': 'speak',
            'session_id': event['session']['id'],
            'text': f"You said: {event['text']}"
        })
    return '', 204

Node.js:

javascript
app.post('/webhook', (req, res) => {
  const event = req.body;
  if (event.type === 'user_speak') {
    return res.json({
      type: 'speak',
      session_id: event.session.id,
      text: `You said: ${event.text}`
    });
  }
  res.status(204).send();
});

Or use our TypeScript SDK:

typescript
import { AiFlowAssistant } from "@sipgate/ai-flow-sdk";
const assistant = AiFlowAssistant.create({
  onUserSpeak: async (event) => {
    return `You said: ${event.text}`;
  },
});
app.post("/webhook", assistant.express());
Ready to get started? Check out our API Quick Start Guide for language-agnostic examples, or use our TypeScript SDK for convenience.

For AI-Assisted Development

Using Claude Code, ChatGPT, Cursor, or other AI coding assistants? Download our LLM Reference - a single comprehensive document containing all API and SDK knowledge optimized for code generation.