Skip to main content
POST
/
stream
/
{id}
/
create-multistream-target
TypeScript
import { Livepeer } from "livepeer";

const livepeer = new Livepeer({
  apiKey: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await livepeer.stream.addMultistreamTarget({
    profile: "720p0",
    videoOnly: false,
    id: "PUSH123",
    spec: {
      name: "My target",
      url: "rtmps://live.my-service.tv/channel/secretKey",
    },
  }, "<id>");

  // 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.Stream.AddMultistreamTarget(ctx, "<id>", components.TargetAddPayload{
        Profile: "720p0",
        VideoOnly: livepeergo.Bool(false),
        ID: livepeergo.String("PUSH123"),
        Spec: &components.TargetAddPayloadSpec{
            Name: livepeergo.String("My target"),
            URL: "rtmps://live.my-service.tv/channel/secretKey",
        },
    })
    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.stream.add_multistream_target(id="<id>", target_add_payload={
    "profile": "720p0",
    "video_only": False,
    "id": "PUSH123",
    "spec": {
        "name": "My target",
        "url": "rtmps://live.my-service.tv/channel/secretKey",
    },
})

if res is not None:
    # handle response
    pass
curl --request POST \
  --url https://livepeer.studio/api/stream/{id}/create-multistream-target \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "profile": "720p0",
  "videoOnly": false,
  "id": "PUSH123"
}
'
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({profile: '720p0', videoOnly: false, id: 'PUSH123'})
};

fetch('https://livepeer.studio/api/stream/{id}/create-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/stream/{id}/create-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([
    'profile' => '720p0',
    'videoOnly' => false,
    'id' => 'PUSH123'
  ]),
  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/stream/{id}/create-multistream-target")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"profile\": \"720p0\",\n  \"videoOnly\": false,\n  \"id\": \"PUSH123\"\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://livepeer.studio/api/stream/{id}/create-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  \"profile\": \"720p0\",\n  \"videoOnly\": false,\n  \"id\": \"PUSH123\"\n}"

response = http.request(request)
puts response.read_body
{
  "errors": [
    [
      "id not provided",
      "Account not found"
    ]
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

ID of the parent stream

Body

application/json
profile
string
required

Name of transcoding profile that should be sent. Use "source" for pushing source stream data

Required string length: 1 - 500
Example:

"720p0"

videoOnly
boolean
default:false

If true, the stream audio will be muted and only silent video will be pushed to the target.

Example:

false

id
string

ID of multistream target object where to push this stream

Example:

"PUSH123"

spec
object
write-only

Inline multistream target object. Will automatically create the target resource to be used by the created stream.

Response

Success (No content)

Last modified on March 18, 2026