Skip to content

Rooms

Rooms enable multi-agent voice conversations. Create a room, add characters as participants, and connect via WebRTC. Characters speak to each other and to your users in real time.

The Room object

json
{
  "id": "room_AbCdEfGh12345678",
  "createdAt": "2026-04-20T12:00:00Z",
  "projectId": "project_abc123",
  "name": "Town Square",
  "mode": "freeform",
  "scenePrompt": null,
  "endedAt": null,
  "participants": []
}
FieldTypeDescription
idstringUnique identifier
namestringRoom name
modestring"freeform" or "scripted"
scenePromptstring | nullScene description for scripted mode (max 5000 chars)
endedAtstring | nullWhen the room ended, or null if active
participantsarrayCharacters in the room

The Participant object

json
{
  "id": "participant_abc123",
  "createdAt": "2026-04-20T12:00:01Z",
  "roomId": "room_AbCdEfGh12345678",
  "characterId": "character_PuTlWmWuynYZu8sP",
  "conversationId": "conv_xyz789",
  "livekitIdentity": "agent-character_PuTlWmWuynYZu8sP",
  "leftAt": null
}

Create a room

POST /v1/rooms

Request body

FieldTypeRequiredDefaultDescription
namestringYesRoom name (max 200 chars)
modestringNo"freeform""freeform" or "scripted"
scenePromptstringNoScene description for scripted mode
sh
curl -X POST https://api.mindforge.ai/v1/rooms \
  -H "Authorization: Bearer $MINDFORGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Town Square",
    "mode": "freeform"
  }'

List rooms

GET /v1/rooms

Returns active rooms with their participants.

Get a room

GET /v1/rooms/{roomId}

Add a participant

POST /v1/rooms/{roomId}/participants
FieldTypeRequiredDescription
characterIdstringYesCharacter to add to the room
sh
curl -X POST https://api.mindforge.ai/v1/rooms/room_AbCdEfGh12345678/participants \
  -H "Authorization: Bearer $MINDFORGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "characterId": "character_PuTlWmWuynYZu8sP" }'

Remove a participant

DELETE /v1/rooms/{roomId}/participants/{characterId}

Get room transcript

GET /v1/rooms/{roomId}/transcript

Returns all messages spoken in the room.

json
[
  {
    "id": "entry_abc123",
    "createdAt": "2026-04-20T12:01:00Z",
    "roomId": "room_AbCdEfGh12345678",
    "speakerType": "agent",
    "characterId": "character_PuTlWmWuynYZu8sP",
    "content": "Welcome to the town square!"
  }
]
FieldTypeDescription
speakerTypestring"user" or "agent"
characterIdstring | nullCharacter ID (null for user messages)
contentstringWhat was said

Get a join token

GET /v1/rooms/{roomId}/token

Returns a LiveKit token for connecting to the room via WebRTC.

json
{
  "token": "eyJ...",
  "url": "wss://livekit.example.com"
}

Start the room

POST /v1/rooms/{roomId}/start

Starts the voice agent pipelines for all participants. The room must have at least one participant.

json
{ "started": true }