Skip to main content
Humain exposes one API surface for all channel types. The mode you set when opening a session determines which transport patterns are available. HTTP (REST) is used for session lifecycle — open, ticket, end — in every mode; the conversation itself always runs over WebSocket (text) or WebRTC (voice/voip). There is no REST endpoint for sending a text message and getting a reply.

At a glance

REST — text session setup

Open a session, mint a WebSocket ticket, close a session — all plain HTTPS. The conversation turns themselves happen over the WebSocket described below.

WebSocket — streaming

Open a persistent connection and exchange conversation turns. The only way to send and receive text messages.

WebRTC — real-time voice

Full-duplex audio over WebRTC. Server-side VAD, barge-in support, and sub-200 ms latency. For kiosk terminals, drive-throughs, and any hands-free scenario.

VoIP / SIP

Bridge a SIP trunk or PSTN phone line directly to the Humain AI. No WebRTC runtime needed on the client side.

Comparison

Which one should I use?

Every mode uses REST to open and close the session. The question is which mode fits your channel:

Mixing transports within a session

A single session uses one mode for its lifetime. You cannot switch from text to voice mid-session. Open a new session if the user’s channel changes (e.g. a chat user initiates a voice call).

Latency expectations

Latency figures are for the sandbox and production environments with a warm connection. Cold start (first request in a session) adds ~100 ms for cache population.