To join VmonsterRoom, a new stream must be created each time. A new stream can be created by making an API call.

  • 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
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");

  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.

Create a New Streaming Session

API Reference for creating new stream.