POST
/
v1
/
session
import BeyondPresence from '@bey-dev/sdk';

const client = new BeyondPresence({
  apiKey: process.env['BEY_API_KEY'], // This is the default and can be omitted
});

const session = await client.session.create({
  avatar_id: '01234567-89ab-cdef-0123-456789abcdef',
  livekit_token: '<your-livekit-token>',
  livekit_url: 'wss://<your-domain>.livekit.cloud',
});

console.log(session.id);
{
  "id": "01234567-89ab-cdef-0123-456789abcdef",
  "created_at": "2022-01-01T00:00:00Z",
  "avatar_id": "01234567-89ab-cdef-0123-456789abcdef",
  "livekit_url": "wss://<your-domain>.livekit.cloud",
  "livekit_token": "<your-livekit-token>"
}

Authorizations

x-api-key
string
header
required

Your Beyond Presence API Key.

Body

application/json

Represents a request to create a Beyond Presence Real-Time API session.

Response

201
application/json

Successful Response

Represents a Beyond Presence Real-Time API session.