> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vivix.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

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](/streaming-avatar/integrate/trtc). 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.

```json wrap theme={null}
{
  "model": "vivix-a1-stream",
  "output": {
    "aspect_ratio": "9:16",
    "resolution": "720p"
  },
  "avatars": [
    {
      "avatar_id": "host",
      "visual": {
        "source_images": [
          {
            "source_image_id": "portrait",
            "url": "https://static.vivi-x.ai/images/2026/08/03/650665979f5d095f.jpg",
            "media_type": "image/jpeg",
            "description": "A young woman with brown hair wears a white off-shoulder top and a pink skirt on a sunlit street beside a flower cart."
          }
        ]
      }
    }
  ],
  "pipeline_config": {
    "tts_config": {
      "tts_voice_id": "longanhuan_v3.6"
    }
  }
}
```

## 3. Create one session

Set `VIVIX_API_KEY` in your server terminal, then run:

```bash theme={null}
curl https://api.vivix.ai/v1/realtime-avatar/sessions \
  -H "Authorization: Bearer $VIVIX_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @session.json -o session-response.json
```

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](/streaming-avatar/integrate/trtc) in the same directory as the player files:

```bash theme={null}
SESSION_RESPONSE_FILE=./session-response.json node server.mjs
```

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.
