import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
page = client.streaming.restreams.list()
page = page.items[0]
print(page.id)package main
import (
"context"
"fmt"
"github.com/G-Core/gcore-go"
"github.com/G-Core/gcore-go/option"
"github.com/G-Core/gcore-go/streaming"
)
func main() {
client := gcore.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.Streaming.Restreams.List(context.TODO(), streaming.RestreamListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
curl --request GET \
--url https://api.gcore.com/streaming/restreams \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/streaming/restreams', 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://api.gcore.com/streaming/restreams",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.gcore.com/streaming/restreams")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/streaming/restreams")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"name": "Live Stream to Youtube 2024-06-21",
"active": true,
"uri": "rtmp://a.rtmp.youtube.com/live2/6w4g-9cw7-62dh-c6se-b4hq",
"stream_id": 1439046,
"client_user_id": 1000,
"source": "transcoded",
"no_audio": true,
"no_audio_mode": "silence",
"id": 287834,
"live": false,
"client_id": 102748,
"playlist_id": null,
"quality_id": null
}
]Get all restreams
Returns a list of all restreams created in your account
import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
page = client.streaming.restreams.list()
page = page.items[0]
print(page.id)package main
import (
"context"
"fmt"
"github.com/G-Core/gcore-go"
"github.com/G-Core/gcore-go/option"
"github.com/G-Core/gcore-go/streaming"
)
func main() {
client := gcore.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.Streaming.Restreams.List(context.TODO(), streaming.RestreamListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
curl --request GET \
--url https://api.gcore.com/streaming/restreams \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/streaming/restreams', 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://api.gcore.com/streaming/restreams",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.gcore.com/streaming/restreams")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/streaming/restreams")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"name": "Live Stream to Youtube 2024-06-21",
"active": true,
"uri": "rtmp://a.rtmp.youtube.com/live2/6w4g-9cw7-62dh-c6se-b4hq",
"stream_id": 1439046,
"client_user_id": 1000,
"source": "transcoded",
"no_audio": true,
"no_audio_mode": "silence",
"id": 287834,
"live": false,
"client_id": 102748,
"playlist_id": null,
"quality_id": null
}
]Authorizations
Response
Successful
Removes the source audio track from the restream. Has two possible values:
- false – the source audio track is forwarded to the target as is (default)
- true – the audio track is removed or replaced, depending on
no_audio_mode
Useful to avoid copyright claims on platforms like YouTube when the source stream contains licensed music or other copyrighted audio.
Only strict boolean values (true/false) are accepted; any other value returns a 422 error.
Defines how the audio track is handled when no_audio is true. Ignored when no_audio is false.
Types:
- "drop" – removes the audio track entirely.
- "silence" – replaces the audio track with a silent track instead of removing it.
Note: YouTube rejects incoming streams with no audio track at all. Use
no_audio_mode=silencewhen restreaming to YouTube.
drop, silence Selects which version of the stream is used as the source for the restream.
Types:
- "original" – uses the original ingested stream without any modifications (default).
- "transcoded" – uses the transcoded output, including overlays. Use it when you want to restream the stream with enabled overlays.
Note: For
transcoded, the highest quality available in the stream's quality ladder is used. For example, if the ladder is 480p/720p/1080p, 1080p is used; if the ladder goes up to 4K, 4K is used.
original, transcoded Was this page helpful?