Cloudflare Realtime: A unified toolkit for live audio and video

Real-time communication has moved from niche use cases to a core expectation in modern applications. Collaborative tools, live classrooms, and interactive streaming are standard features, and AI is pushing demand even further with natural voice and video interfaces. Developers building these experiences face a fundamental challenge: coordinating media services, AI inference, and compute across a global network while keeping latency imperceptible.

Cloudflare is consolidating its real-time infrastructure under a new umbrella called Cloudflare Realtime. This suite brings together the company's existing WebRTC components — its Selective Forwarding Unit (SFU), STUN, and TURN services — with a new collection of client-side tools named RealtimeKit. The goal is to provide a single, "Region: Earth" platform for building interactive applications.

RealtimeKit: abstractions for WebRTC complexity

RealtimeKit is a set of cross-platform SDKs and server-side services designed to simplify real-time development. It includes mobile SDKs for iOS, Android, React Native, and Flutter, plus web SDKs for React, Angular, vanilla JavaScript, and WebComponents. Beyond the connection layer, it ships with pre-built UI components and handles services like recording, coordination, and transcription.

The technology is backed by the team from Dyte, a real-time communications company that has joined Cloudflare. Dyte built a developer-experience layer on top of Cloudflare's infrastructure that abstracts WebRTC's underlying complexity without sacrificing its capabilities. This acquisition accelerates the development of RealtimeKit, combining Dyte's end-user SDK expertise with Cloudflare's network spanning over 300 cities.

Removing the WebRTC barrier to entry

For many developers, adding a simple video chat feature quickly becomes a deep dive into WebRTC internals. Debugging sessions requires navigating ICE candidate failures, TURN server configurations, and SDP negotiation issues. The challenges extend beyond the protocol itself. Device management is notoriously inconsistent: camera and microphone APIs behave differently across browsers, mobile platforms, and WebViews, leading to production failures that never appear in testing.

Scalability is another hurdle. An application that performs flawlessly with a handful of test users can collapse with dozens of real-world participants. Bandwidth adaptation falters, connection management becomes unwieldy, and maintaining consistent quality across diverse network conditions demands specialized expertise. What starts as a straightforward feature can morph into a multi-month, low-level engineering project.

RealtimeKit aims to handle these foundational concerns, allowing developers to focus on the unique aspects of their products.

SDKs that handle the hard parts

The core of RealtimeKit is a set of SDKs for Kotlin, React Native, Swift, JavaScript, and Flutter that manage the low-level mechanics of real-time sessions. They cover session establishment, media permissions, NAT traversal, and connection management. Features that are typically painful to build from scratch are included out of the box:

  • Built-in recording: The SDKs handle the media pipeline for capturing meetings, archiving streams, or saving classroom sessions, removing the need to build custom recording infrastructure or wrangle with MediaRecorder APIs.
  • Voice AI integration: Providers like ElevenLabs are integrated directly into the platform. Adding an AI participant is a function call, and its voice operates with the same low latency —tens of milliseconds— as a human participant, enabling natural human-AI conversations.
  • Simplified API design: Common tasks like adding participants or starting a recording are single API calls. The SDKs manage device enumeration, permission requests, and UI rendering, whether the app has 5 users or millions of concurrent participants.

This builds on years of network-level investment. Cloudflare's traffic is routed over its global network to minimize latency between users and the service, which is where most network disruptions occur. The SFU intelligently routes streams and adjusts quality in real time, the TURN infrastructure solves NAT traversal behind firewalls, and Workers AI brings inference to the edge. Workers and Durable Objects provide the WebSockets coordination layer for consistent state across sessions.

SFU and TURN reach General Availability

Alongside RealtimeKit, Cloudflare's SFU and TURN services are now Generally Available (GA) for developers who need lower-level control over their WebRTC stack. The GA release adds key features for production use.

The SFU now supports simulcast, allowing the server to send different quality levels of a media stream to different viewers. This lets developers tailor video quality based on each user's network conditions, either automatically or through manual selection.

The TURN service introduces advanced analytics with usage metrics at the regional, country, and city levels. Combined with custom user identifiers and revocable tokens, developers gain deep insight into traffic patterns and a way to prevent abuse. Both services retain their usage-based pricing model: $0.05 per GB after a free allowance of 1,000 GB per month.

Teaming up with Hugging Face for FastRTC

To support the Python AI community, Cloudflare is partnering with Hugging Face. Users of FastRTC, Hugging Face's library for streaming audio and video into AI models, will have free access to Cloudflare's TURN servers. This provides reliable connectivity for WebRTC streams that need to traverse firewalls, a common hurdle for distributed applications.

FastRTC developers get 10 GB of TURN bandwidth per month using only a Hugging Face access token, with no setup or credit card required. As projects scale, they can upgrade to a standard Cloudflare account for a larger free tier and more capacity. This removes a significant network reliability concern and lets AI developers concentrate on their voice interfaces and video pipelines.

What you can build now

With these tools, complex real-time use cases become practical in days rather than weeks. The abstractions handle bandwidth adaptation, connection management, and device permissions, while the API design targets common patterns:

  • Video conferencing: Add multi-participant calls with a few lines of code for connection management and device handling.
  • Live streaming: Host interactive broadcasts to thousands of viewers, selectively bringing participants on-screen while the SFU optimizes routing.
  • Real-time synchronization: Create watch parties with synchronized playback, using a timing API to handle delay calculations and adjustments.
  • Voice AI integrations: Add transcription and AI participants without custom media pipelines, integrating with existing auth and storage systems.

RealtimeKit is available today in a closed beta at no cost. A new "Realtime" section appears in the Cloudflare Dashboard, where TURN, SFU, and RealtimeKit will live together. Interested developers can request early access directly from the dashboard or through Cloudflare's signup page.