> ## 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.

# Create New Stream

> Learn how to create a new AI Avatar stream.

To join [`VmonsterRoom`](/pages/vmonsterRoom), a new stream must be created each time. A new stream can be created by making an API call.

* [Authentication](/pages/authentication)
* Include the API key in the request headers for every API call.
* Increase the value of real-time interaction by adjusting the desired background / position / scale.
* After successful API request, you will receive:
  * `session_id`: Unique identifier for the current session
  * `stream_id`: Specific stream identifier
  * `token`: Access token for entering the created room

```javascript theme={null}
const fetchNewStream = async () => {
  const formData = new FormData();
  // Enter the ID of the AI Avatar you want to use.
  formData.append("aiavatar_id", "b9065cba-07ba-4720-8686-69dfca10a94c");
  // Enter the language. The accent and speech pattern will vary based on the language.
  formData.append("language", "en");
  // [Optional] Set the session duration in seconds. Default is 3600 seconds (1 hour) if not specified.
  formData.append("max_duration_s", 300);

  const response = await fetch("https://api.vmonster.io/v1/streams", {
    method: "POST",
    headers: {
      "x-api-key": process.env.VMONSTER_API_KEY,
    },
    body: formData,
  });
  const data = await response.json();
  return data;
};
```

For detailed explanations and parameters, please refer to the API Reference.

<Card title="Create a New Streaming Session" icon="signal-stream" href="/api-reference/create-a-new-streaming-session">
  API Reference for creating new stream.
</Card>
