Skip to main content
POST
/
streams
/
validate
curl -X POST https://trio.machinefi.com/streams/validate \
  -H "Content-Type: application/json" \
  -d '{"stream_url": "https://youtube.com/watch?v=LIVE_ID"}'
{
  "valid": true,
  "is_live": true,
  "platform": "youtube",
  "stream_id": "LIVE_ID",
  "title": "City Center Cam",
  "channel": "City Traffic",
  "thumbnail_url": "https://i.ytimg.com/vi/LIVE_ID/hqdefault.jpg",
  "viewer_count": 1234,
  "error_hint": null
}

Request

stream_url
string
required
Stream URL to validate. Supports YouTube (youtube.com/watch?v=, youtu.be/), Twitch (twitch.tv/channel), and RTSP (rtsp://).

Response

valid
boolean
Whether the stream URL is valid and live.
is_live
boolean
Whether the stream is live (same as valid).
platform
string
Detected platform (youtube, twitch, or rtsp).
stream_id
string
Platform stream identifier when available.
title
string
Stream title when available.
channel
string
Channel or uploader name when available.
thumbnail_url
string
Thumbnail URL when available.
viewer_count
integer
Concurrent viewer count when available.
error_hint
string
Error message when the stream is not valid or live.
curl -X POST https://trio.machinefi.com/streams/validate \
  -H "Content-Type: application/json" \
  -d '{"stream_url": "https://youtube.com/watch?v=LIVE_ID"}'
{
  "valid": true,
  "is_live": true,
  "platform": "youtube",
  "stream_id": "LIVE_ID",
  "title": "City Center Cam",
  "channel": "City Traffic",
  "thumbnail_url": "https://i.ytimg.com/vi/LIVE_ID/hqdefault.jpg",
  "viewer_count": 1234,
  "error_hint": null
}