TypeScript
import { Livepeer } from "livepeer";
const livepeer = new Livepeer({
apiKey: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await livepeer.multistream.create({
url: "rtmps://live.my-service.tv/channel/secretKey",
});
// Handle the result
console.log(result);
}
run();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.Multistream.Create(ctx, components.MultistreamTargetInput{
URL: "rtmps://live.my-service.tv/channel/secretKey",
})
if err != nil {
log.Fatal(err)
}
if res.MultistreamTarget != nil {
// handle response
}
}from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.multistream.create(request={
"url": "rtmps://live.my-service.tv/channel/secretKey",
})
if res.multistream_target is not None:
# handle response
passcurl --request POST \
--url https://livepeer.studio/api/multistream/target \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "rtmps://live.my-service.tv/channel/secretKey",
"name": "<string>",
"disabled": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'rtmps://live.my-service.tv/channel/secretKey',
name: '<string>',
disabled: true
})
};
fetch('https://livepeer.studio/api/multistream/target', 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/multistream/target",
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([
'url' => 'rtmps://live.my-service.tv/channel/secretKey',
'name' => '<string>',
'disabled' => true
]),
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/multistream/target")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"rtmps://live.my-service.tv/channel/secretKey\",\n \"name\": \"<string>\",\n \"disabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://livepeer.studio/api/multistream/target")
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 \"url\": \"rtmps://live.my-service.tv/channel/secretKey\",\n \"name\": \"<string>\",\n \"disabled\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
"name": "<string>",
"userId": "66E2161C-7670-4D05-B71D-DA2D6979556F",
"disabled": true,
"createdAt": 1587667174725
}{
"errors": [
[
"id not provided",
"Account not found"
]
]
}Multistream target
Create a multistream
POST
/
multistream
/
target
TypeScript
import { Livepeer } from "livepeer";
const livepeer = new Livepeer({
apiKey: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await livepeer.multistream.create({
url: "rtmps://live.my-service.tv/channel/secretKey",
});
// Handle the result
console.log(result);
}
run();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.Multistream.Create(ctx, components.MultistreamTargetInput{
URL: "rtmps://live.my-service.tv/channel/secretKey",
})
if err != nil {
log.Fatal(err)
}
if res.MultistreamTarget != nil {
// handle response
}
}from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.multistream.create(request={
"url": "rtmps://live.my-service.tv/channel/secretKey",
})
if res.multistream_target is not None:
# handle response
passcurl --request POST \
--url https://livepeer.studio/api/multistream/target \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "rtmps://live.my-service.tv/channel/secretKey",
"name": "<string>",
"disabled": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'rtmps://live.my-service.tv/channel/secretKey',
name: '<string>',
disabled: true
})
};
fetch('https://livepeer.studio/api/multistream/target', 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/multistream/target",
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([
'url' => 'rtmps://live.my-service.tv/channel/secretKey',
'name' => '<string>',
'disabled' => true
]),
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/multistream/target")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"rtmps://live.my-service.tv/channel/secretKey\",\n \"name\": \"<string>\",\n \"disabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://livepeer.studio/api/multistream/target")
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 \"url\": \"rtmps://live.my-service.tv/channel/secretKey\",\n \"name\": \"<string>\",\n \"disabled\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
"name": "<string>",
"userId": "66E2161C-7670-4D05-B71D-DA2D6979556F",
"disabled": true,
"createdAt": 1587667174725
}{
"errors": [
[
"id not provided",
"Account not found"
]
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Livepeer-compatible multistream target URL (RTMP(S) or SRT)
Pattern:
^(srt|rtmps?)://Example:
"rtmps://live.my-service.tv/channel/secretKey"
If true then this multistream target will not be used for pushing even if it is configured in a stream object.
Response
Success
Example:
"09F8B46C-61A0-4254-9875-F71F4C605BC7"
Example:
"66E2161C-7670-4D05-B71D-DA2D6979556F"
If true then this multistream target will not be used for pushing even if it is configured in a stream object.
Timestamp (in milliseconds) at which multistream target object was created
Example:
1587667174725
Last modified on March 18, 2026
Was this page helpful?
⌘I