Skip to main content
Create a session from one image and connect that same session to a browser player. You will see the character’s live video.

1. Before you start

Have a Vivix API key and Node.js 22 ready. Before starting a billable session, prepare and build the files in TRTC browser player. Do not start its server yet. The player will use the response saved below, without creating a second session.

2. Save the request

Save this as session.json in the player directory. The example uses a public character image, 9:16 output at 720p, and a built-in voice. The voice is ready for later speech; this step only displays video.

3. Create one session

Set VIVIX_API_KEY in your server terminal, then run:
Check session-response.json. Its code should be 0, and data should include session_id, control, and delivery.media.trtc. Resolve a create error before starting the player.

4. Play this session

Run the complete server.mjs from the TRTC browser player in the same directory as the player files:
Open http://localhost:3000 and click Start. The player reads the saved connection details and joins this session. The avatar video and “Video playing” confirm playback. Click Stop to close this same session.