Elai Realtime API allows you to create a stream with a specific avatar and render speech instantly in real-time. It is based on WebRTC (Web Real-Time Communication protocol) which is the best technology right now to use for live streaming in browsers.

📘

Client-facing app is not provided

Note that for now we don't provide any SDK or frontend app to use, but pelase let us know what will work best for your company.

To obtain a video stream you should follow 4 steps:

Step 1: Create a new stream session

To establish a real-time WebRTC connection, call the Create a stream API endpoint to retrieve the server's offer SDP and ICE information.

This request will provide you with a unique id (use it as streamId in other requests as URL path parameter) and a webrtcData object. The stream ID is an identifier for the streaming session, while the webrtcData contains offer and iceServers properties, that will be needed to start a stream session described in the next step.

Step 2: Starting a stream

Utilize the offer and iceServers data obtained from Step 1 to create a new WebRTC peer connection and generate an answer to the server. All necessary information is described in the Start a stream API endpoint.

Step 3: Submit network information

After a successful exchange of SDP, you will need to send some network information to establish a connection fully. Additional information is described in the Submit network information API endpoint.

Step 4: Render a video

After successfully establishing a stream session, the final step is to send text what the avatar will say. Use Render a video API endpoint to make avatar talk.

🚧

Do not exposure your API Key

We recommend to call our API only from your secured backend app or use some backend proxy service, so your API key is never stored in browser but only in secured storage


Limitations

The stream will expire in 2 minutes without any requests to render text.

All plans except custom enterprise are limited to 1 session at a time.