Quick usage

A live room in your app in five minutes.

Get a key, open a room with one request, then drop the prebuilt room into React, Flutter, Swift or any of ten SDKs. The same room grows into phone calls, AI agents, live translation and recording when you need them.

Already signed up? Your keys are in the dashboard.

Terminal
$ curl -X POST https://mediasfu.com/v1/rooms \
    -H "Authorization: Bearer $MEDIASFU_API_USERNAME:$MEDIASFU_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"action":"create","userName":"host",
         "duration":30,"capacity":5,"eventType":"conference"}'

{
  "success": true,
  "roomName": "s9x2k7mp4q81",
  "publicURL": "https://…mediasfu.com/meet/s9x2k7mp4q81/…",
  "roomStatus": "ready"
  …
}
Open publicURL: camera, mic, chat and screen share, no front-end code.
  1. 1Get a keyAbout 2 minutes
  2. 2Create a roomOne request
  3. 3Add an SDKTen platforms
  4. 4Ship safelyKey on your server
  5. 5Grow itPhone, AI, translation
1About 2 minutes

Get your API key

Sign up and your dashboard has a sandbox key ready. It runs every feature on your account from any origin, so you can build before you register a domain.

  • Copy your API username and API key from Dashboard → API keys.
  • Keep both in environment variables or a secrets manager, never in source control.
  • When you go live, switch to a production key: it accepts browser calls only from the domains you register.
export MEDIASFU_API_USERNAME="your-api-username"
export MEDIASFU_API_KEY="your-api-key"
2One request

Create a room with one request

Meetings, phone calls and AI agent sessions all run in a room. One POST /v1/rooms creates it and returns a link that opens a complete room in any browser.

FieldWhat it sets
eventTypeconference (everyone talks), webinar (host and panel talk), broadcast (one to many) or chat (one to one)
durationMinutes the room stays open, 5 to 1440
capacityMost people in the room at once
userNameThe host, unique among your active rooms
  • publicURL signs the host in. Keep it for the host.
  • Each guest gets their own link from "action": "join" with the roomName.
curl -X POST https://mediasfu.com/v1/rooms \
  -H "Authorization: Bearer $MEDIASFU_API_USERNAME:$MEDIASFU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "create",
    "userName": "host",
    "duration": 30,
    "capacity": 5,
    "eventType": "conference"
  }'
{
  "success": true,
  "message": "Room created successfully",
  "roomName": "s9x2k7mp4q81",
  "userName": "host",
  "secureCode": "k46g26no08ijc9t3id3ttd",
  "publicURL": "https://<region>.mediasfu.com/meet/s9x2k7mp4q81/<host token>",
  "link": "https://<region>.mediasfu.com",
  "roomStatus": "ready",
  "secret": "<room secret>"
}
roomName starts with s on a sandbox key and p on a production key. Treat secureCode and secret like passwords.
Step 3 · Your app

Put the room inside your app

Pick your platform. Each SDK ships the complete room (video grid, chat, screen share, recording, polls, breakout rooms, whiteboard) as one component you can restyle, override piece by piece, or replace with your own screens.

All SDK guides

React web app

mediasfu-reactjsnpm

The complete room as one component, on Vite or any React 18+ app.

  1. Create the app and install the SDK.
  2. Replace src/App.tsx with the code.
  3. Run npm run dev, open the address it prints and start a room.

Paste your key for a first run on your own machine. Before anyone else uses the app, move it to your server.

Terminal
npm create vite@latest my-room -- --template react-ts
cd my-room
npm install mediasfu-reactjs
src/App.tsx
import { ModernMediasfuGeneric } from 'mediasfu-reactjs';
import 'mediasfu-reactjs/dist/main.css';

export default function App() {
  return (
    <ModernMediasfuGeneric
      credentials={{ apiUserName: 'your-api-username', apiKey: 'your-api-key' }}
    />
  );
}
4Before you share it

Keep the key on your server

Anything in a browser or app bundle can be read. Before anyone outside your team uses the app, move room creation behind your own sign-in: your server adds the key, the SDK calls your server.

  • Your route checks who is asking and which room they may create or join.
  • The SDK's createMediaSFURoom and joinMediaSFURoom hooks call that route instead of MediaSFU.
  • The room component and everything inside it stay exactly the same.
// npm install express   (Node 18 or later)
import express from 'express';

const app = express();
app.use(express.json());

// requireSignedInUser is your existing auth middleware.
app.post('/api/mediasfu/rooms', requireSignedInUser, async (req, res) => {
  const payload = req.body;
  if (!['create', 'join'].includes(payload?.action)) {
    return res.status(400).json({ success: false, error: 'Unsupported action.' });
  }
  // Decide here which rooms this user may create or join.

  try {
    const upstream = await fetch('https://mediasfu.com/v1/rooms', {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        Authorization: `Bearer ${process.env.MEDIASFU_API_USERNAME}:${process.env.MEDIASFU_API_KEY}`,
      },
      body: JSON.stringify(payload),
    });
    const data = await upstream.json();
    if (!upstream.ok) {
      return res.status(upstream.status).json({ success: false, error: data.error || 'Room request failed.' });
    }
    res.json({ success: true, data });
  } catch {
    res.status(502).json({ success: false, error: 'MediaSFU is unreachable. Try again.' });
  }
});

app.listen(3000);
Make it yours

Keep our room, restyle it, or build your own screens

The same room connection powers all three, so you can start with the prebuilt room and move down a level only where your product needs it.

Browse the components

Use the prebuilt room

Video grid, chat, screen share, recording, polls, breakout rooms and a whiteboard, ready the moment the room connects.

Restyle or swap pieces

Theme it, then replace only the parts you care about: the video card, the controls, the chat panel, the join screen.

Own every screen

Run the room without our UI and drive media, participants and chat from your own components.

Step 5 · Grow it

One room, every channel your product needs

Phone callers, AI agents, interpreters and recordings join the same room you just built, through the same key and the same API.

Developer console guide

Record and stream

Record any room to the cloud, or add an HLS stream for large audiences. Bring in OBS or a hardware encoder over WHIP.

recordingParams on create · /v1/recordings

Phone calls

Give a room a phone number so callers dial straight in, or place outbound calls from your app.

supportSIP on create · /v1/sipconfigs

AI agents

Put a voice agent in a room or on a phone line, with your own prompt and your choice of model providers.

/v1/aicredentials

AI notes

A summary, decisions and action items when the room ends, ready to send to your own system.

Vibe Studio

Describe the room you need and download a React project, or an integration kit for an app you already have.

Self-host

Run the open-source MediaSFU Open server on your own hardware with the same SDKs and room UI.

Try before you code

Open a finished product, then take its code

Each of these runs in your browser on the same SDKs. Join from a second tab or your phone to see both sides.

Kits and starters
Keep these open

Reference for when you need the detail

Questions

What developers ask first

Do I need a backend to start?

No. Build your first room with the key in an environment variable on your own machine. Add the small server route from step 4 before anyone outside your team uses the app.

Which SDK should I pick?

The one your app is already written in. Every SDK joins the same rooms, so a React web app, a Flutter app and a Swift app can all be in one call.

What's the difference between a sandbox and a production key?

Where requests may come from, not what they can do. A sandbox key works from any origin for building; a production key accepts browser requests only from the domains you register.

Can I use my own UI?

Yes. Restyle the prebuilt room, swap individual pieces, or hide it completely and drive the room from your own components. The connection, media and room state stay the same.

Can I run it on my own servers?

Yes. MediaSFU Open is the open-source server; point the SDKs at it instead of MediaSFU Cloud. Cloud adds managed scaling, recording, phone numbers, AI agents and translation.

What does it cost to try?

Signing up is free, and new accounts start with free minutes to build with. The pricing page has the usage rates for when you go live.

Ready

Your first room is one request away

Sign up, copy your key, and paste the request above.