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

# Join VmonsterRoom

> Learn how to join VmonsterRoom.

### Overview

The VmonsterRoom is a virtual space for interaction between the User and the AI Avatar.

To join the room, perform the following two steps:

* [Create new Stream](/pages/create_New_Stream)
* Call [`join()`](/pages/instance_Methods#join)

#### Example code

```javascript theme={null}
const { stream_id, token, session_id } = await fetchRoomConfig();
const room = new VmonsterRoom({
  serverUrl: "https://api.vmonster.io/v1",
});

room.join({
  sessionId: session_id,
  streamId: stream_id,
  token: token,
});

// When joined to a room, add the AI Avatar's video.
// It will be appended to the element with the ID "aiavatar-video-parent" or to the body.
room.on("joined", () => {
  room.addVideo({
    width: "400px",
    borderRadius: "10px",
  });
});
```
