Chapter 04 · Cloudflare Deploy
Subchapter 4.182
references/realtimekit/README.mdMarkdown4 KBView on GitHub
Expert guidance for building real-time video and audio applications using Cloudflare RealtimeKit - a comprehensive SDK suite for adding customizable live video and voice to web or mobile applications.
RealtimeKit is Cloudflare’s SDK suite built on Realtime SFU, abstracting WebRTC complexity with fast integration, pre-built UI components, global performance (300+ cities), and production features (recording, transcription, chat, polls).
Use cases: Team meetings, webinars, social video, audio calls, interactive plugins
authToken for client SDK. Do not reuse tokensid): Unique per session, changes on rejoinuserId): Persistent across sessions# Create app
curl -X POST 'https://api.cloudflare.com/client/v4/accounts/<account_id>/realtime/kit/apps' \
-H 'Authorization: Bearer <api_token>' \
-d '{"name": "My RealtimeKit App"}'
# Create meeting
curl -X POST 'https://api.cloudflare.com/client/v4/accounts/<account_id>/realtime/kit/<app_id>/meetings' \
-H 'Authorization: Bearer <api_token>' \
-d '{"title": "Team Standup"}'
# Add participant
curl -X POST 'https://api.cloudflare.com/client/v4/accounts/<account_id>/realtime/kit/<app_id>/meetings/<meeting_id>/participants' \
-H 'Authorization: Bearer <api_token>' \
-d '{"name": "Alice", "preset_name": "host"}'
# Returns: { authToken }React:
import { RtkMeeting } from '@cloudflare/realtimekit-react-ui';
function App() {
return <RtkMeeting authToken="<participant_auth_token>" onLeave={() => {}} />;
}Core SDK:
import RealtimeKitClient from '@cloudflare/realtimekit';
const meeting = new RealtimeKitClient({ authToken: '<token>', video: true, audio: true });
await meeting.join();| Task | Files |
|---|---|
| Quick integration | README only |
| Custom UI | README → patterns → api |
| Backend setup | README → configuration |
| Debug issues | gotchas |
| Advanced features | patterns → api |
| Choose | When |
|---|---|
| RealtimeKit | Need pre-built UI, fast integration, React/Angular/HTML |
| Realtime SFU | Building from scratch, custom WebRTC, full control |
RealtimeKit is built on Realtime SFU but abstracts WebRTC complexity with UI components and SDKs.
Need pre-built meeting UI?
@cloudflare/realtimekit-react-ui (<RtkMeeting>)@cloudflare/realtimekit-angular-ui@cloudflare/realtimekit-uiNeed custom UI?
@cloudflare/realtimekit (RealtimeKitClient) - full controlNeed raw WebRTC control?
realtime-sfu/ reference