WHIP/WHEP for Interactive Live Streaming
Overview
WHIP (WebRTC-HTTP Ingestion Protocol) and WHEP (WebRTC-HTTP Egress Protocol) are standardized protocols that enable WebRTC-based streaming over HTTP. These protocols simplify the integration of WebRTC streaming into your applications by providing RESTful HTTP endpoints for media ingestion and egress.
-
WHIP (WebRTC-HTTP Ingestion Protocol) allows you to send (ingest) WebRTC media streams to a VideoSDK meeting.
-
WHEP (WebRTC-HTTP Egress Protocol) allows you to receive (egress) WebRTC media streams from a VideoSDK meeting.
Use Cases
- OBS Studio Integration: Stream professional broadcasts from OBS Studio directly into VideoSDK meetings without custom WebRTC implementations
- Mobile Broadcasting: Stream from mobile apps using native WebRTC SDKs
- Hardware Encoders: Integrate hardware encoders that support WebRTC
- IoT Devices: Stream from IoT devices with WebRTC capabilities
- Multi-Source Aggregation: Combine multiple streams into a single VideoSDK meeting
Real-time Example: Connecting OBS Studio to VideoSDK
This example demonstrates how to stream from OBS Studio into a VideoSDK meeting using WHIP.
Prerequisites
- OBS Studio: Download and install OBS Studio
- VideoSDK Token: Generate a token from the VideoSDK Dashboard
- Room ID: Create or use an existing VideoSDK room
Step-by-Step Guide
Step 1: Configure OBS Studio
-
Open OBS Studio
-
Navigate to Settings → Stream
-
Select Custom as the service type
-
In the Server field, enter:
https://api.videosdk.live/v2/whip?roomId=YOUR_ROOM_ID&participantId=YOUR_PARTICIPANT_IDReplace:
YOUR_ROOM_IDwith your actual VideoSDK room ID (e.g.,zfww-680a-dzen)YOUR_PARTICIPANT_IDwith a custom participant ID (optional, will be auto-generated if not provided)
-
In the Stream Key field, enter your VideoSDK token

Step 2: Start Streaming
- Click Start Streaming in OBS Studio
- Your OBS stream will be ingested into the VideoSDK meeting
- The stream will appear as a participant in the VideoSDK room
Step 3: Verify the Connection
You can verify the connection by:
- Viewing the VideoSDK meeting using any VideoSDK client SDK
- Checking the participant list to see your WHIP stream participant
- Monitoring the stream quality and latency

Endpoint Reference
The following endpoint is used to create a WHIP session for ingesting media streams into a VideoSDK meeting:
| Parameter | Value |
|---|---|
| Method | POST |
| Endpoint | https://api.videosdk.live/v2/whip |
| Headers | Authorization: <Your VideoSDK Token>Content-Type: application/sdp |
| Query Parameters | roomId (required): The VideoSDK room ID where the stream will be ingestedparticipantId (optional): Custom participant ID for the ingested stream. If not provided, a random participant ID will be generated |
| Request Body | SDP offer (Session Description Protocol) |
| Response | The server returns an SDP answer in the response body and a Location header containing the session URL |
What is an SDP Offer?
An SDP (Session Description Protocol) offer is a text-based description of the media capabilities that your WebRTC client wants to send or receive. It contains information about:
- Media types (audio, video)
- Codecs supported (e.g., Opus for audio, VP8/VP9/H264 for video)
- Network information (IP addresses, ports)
- ICE candidates for establishing the connection
- Security parameters (DTLS fingerprints, ICE credentials)
When you create a WebRTC connection, your client generates an SDP offer describing what it can do. The server responds with an SDP answer that confirms the media parameters and establishes the connection.
Example SDP Offer:
v=0
o=- 1495799811084970 1495799811084970 IN IP4 0.0.0.0
s=-
t=0 0
a=msid-semantic: iot
a=group:BUNDLE audio
m=audio 9 UDP/TLS/RTP/SAVP 111
a=rtpmap:111 opus/48000/2
a=ssrc:6 cname:webrtc-opus
a=sendrecv
a=mid:audio
c=IN IP4 0.0.0.0
a=rtcp-mux
a=fingerprint:sha-256 72:7E:06:D6:D0:9C:2E:30:75:22:AD:01:75:D6:5B:2B:D7:FB:00:A2:CD:60:20:49:5B:B0:62:63:A6:5F:A7:B4
a=setup:passive
a=ice-ufrag:a3oo
a=ice-pwd:a3ooPQLUll7W9HOfLpF1GlLT
a=candidate:0 1 UDP 2129213695 10.144.33.135 59704 typ host
a=candidate:2 1 UDP 1693006079 115.246.27.117 59704 typ srflx raddr 0.0.0.0 rport 0
Key parts of this SDP offer:
m=audio 9 UDP/TLS/RTP/SAVP 111: Media line indicating audio supporta=rtpmap:111 opus/48000/2: Opus codec at 48kHz with 2 channelsa=fingerprint:sha-256 ...: DTLS fingerprint for secure connectiona=ice-ufraganda=ice-pwd: ICE credentials for NAT traversala=candidate: Network candidates for establishing the connection
This SDP offer is automatically generated by your WebRTC client (like OBS Studio, a browser, or a mobile SDK) when you initiate a connection.
Example Request:
curl -X POST \
'https://api.videosdk.live/v2/whip?roomId=zfww-680a-dzen&participantId=whip-broadcaster' \
-H 'Authorization: YOUR_TOKEN' \
-H 'Content-Type: application/sdp' \
--data-binary @sdp-offer.txt
API Reference
For detailed API documentation, including request/response examples and all available endpoints, refer to:
- Create WHIP Session API - Create a WHIP session to ingest media streams into a VideoSDK meeting
- Create WHEP Session API - Create a WHEP session to receive media streams from a VideoSDK meeting
Got a Question? Ask us on discord

