Add stream
streams.add(strnamespace, StreamAddParams**kwargs) -> StreamAddResponse
POST/v1/streams/{namespace}
Monitor the livestream at the given stream URL. This method returns immediately.
Parameters
namespace: str
The namespace to ingest stream data into
id: str
stream_url: str
Returns
Add stream
import os
from safetykit import Safetykit
client = Safetykit(
api_key=os.environ.get("SAFETYKIT_API_KEY"), # This is the default and can be omitted
)
response = client.streams.add(
namespace="namespace",
id="YOUR_STREAM_ID",
stream_url="https://cdn.example.com/20948D23.m3u8",
)
print(response.request_id){
"requestId": "req_01h2m7qdmdjckc30e1mnq6xqfd",
"status": "accepted"
}Returns Examples
{
"requestId": "req_01h2m7qdmdjckc30e1mnq6xqfd",
"status": "accepted"
}