Go
package main
import(
livepeergo "github.com/livepeer/livepeer-go"
"context"
"github.com/livepeer/livepeer-go/models/components"
"log"
)
func main() {
s := livepeergo.New(
livepeergo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
ctx := context.Background()
res, err := s.Room.StartEgress(ctx, "<id>", components.RoomEgressPayload{
StreamID: "aac12556-4d65-4d34-9fb6-d1f0985eb0a9",
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.room.start_egress(id="<id>", room_egress_payload={
"stream_id": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9",
})
if res is not None:
# handle response
passcurl --request POST \
--url https://livepeer.studio/api/room/{id}/egress \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"streamId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({streamId: 'aac12556-4d65-4d34-9fb6-d1f0985eb0a9'})
};
fetch('https://livepeer.studio/api/room/{id}/egress', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://livepeer.studio/api/room/{id}/egress",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'streamId' => 'aac12556-4d65-4d34-9fb6-d1f0985eb0a9'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://livepeer.studio/api/room/{id}/egress")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"streamId\": \"aac12556-4d65-4d34-9fb6-d1f0985eb0a9\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://livepeer.studio/api/room/{id}/egress")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"streamId\": \"aac12556-4d65-4d34-9fb6-d1f0985eb0a9\"\n}"
response = http.request(request)
puts response.read_body{
"errors": [
[
"id not provided",
"Account not found"
]
]
}Rooms
Start Room Egress
deprecated
Livepeer Studio API endpoint
POST
/
room
/
{id}
/
egress
Go
package main
import(
livepeergo "github.com/livepeer/livepeer-go"
"context"
"github.com/livepeer/livepeer-go/models/components"
"log"
)
func main() {
s := livepeergo.New(
livepeergo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
ctx := context.Background()
res, err := s.Room.StartEgress(ctx, "<id>", components.RoomEgressPayload{
StreamID: "aac12556-4d65-4d34-9fb6-d1f0985eb0a9",
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.room.start_egress(id="<id>", room_egress_payload={
"stream_id": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9",
})
if res is not None:
# handle response
passcurl --request POST \
--url https://livepeer.studio/api/room/{id}/egress \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"streamId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({streamId: 'aac12556-4d65-4d34-9fb6-d1f0985eb0a9'})
};
fetch('https://livepeer.studio/api/room/{id}/egress', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://livepeer.studio/api/room/{id}/egress",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'streamId' => 'aac12556-4d65-4d34-9fb6-d1f0985eb0a9'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://livepeer.studio/api/room/{id}/egress")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"streamId\": \"aac12556-4d65-4d34-9fb6-d1f0985eb0a9\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://livepeer.studio/api/room/{id}/egress")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"streamId\": \"aac12556-4d65-4d34-9fb6-d1f0985eb0a9\"\n}"
response = http.request(request)
puts response.read_body{
"errors": [
[
"id not provided",
"Account not found"
]
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
The ID of the Livepeer Stream to stream to
Example:
"aac12556-4d65-4d34-9fb6-d1f0985eb0a9"
Response
Success
Last modified on May 4, 2026
Was this page helpful?
⌘I