Home / Docs Center / Platform API / Generate Video URL-1

Generate Video URL-1

Platform API · General API

Project: Platform API | page_id: 62

Brief Description:

  • Generate live video addresses by device channel. Video live streaming must be configured and enabled on the device in advance.

Request URL:
- /product/genUrls

Request Method:
- POST

Parameters:

Parameter Required Type Description
pId Yes string Device id
cId Yes int Channel number, starting from 1
genType Yes string Generation type (url == fast live address, fast == low latency address)
des Yes string Description
expiredSec Yes int64 Expiration seconds (timestamp from 1970 to the expiration time)
protocol No string Returned protocol value range: (hls,flv,ws,rtmp,webrtc). All are returned by default; separate multiple values with commas.

Response Example

{
  "item": {
    "id": "cdeb442f7dff7adb0df6bbecc5270827",
    "des": "test",
    "type": "url",
    "createTime": "2025-03-26T11:28:36+08:00",
    "expiredTime": "2025-03-29T11:28:36+08:00"
  },
  "urls": {
    "hlsUrl": "https://hls.cloud.xstrive.com/0b345b5917716f597dda2cab1661a069/hlsram/live0/cdeb442f7dff7adb0df6bbecc5270827.m3u8",
    "flvUrl": "https://flv.cloud.xstrive.com/0b345b5917716f597dda2cab1661a069/hlsram/live0/cdeb442f7dff7adb0df6bbecc5270827.flv",
    "fastFlv": "https://rwen.xstrive.com/hdl/0b345b5917716f597dda2cab1661a069/live0/cdeb442f7dff7adb0df6bbecc5270827.flv",
    "fastWebrtc": "https://rwen.xstrive.com/api/webrtc/cloud/play?sid=0b345b5917716f597dda2cab1661a069&streamPath=live0&sk=cdeb442f7dff7adb0df6bbecc5270827",
    "fastHls": "https://rwen.xstrive.com/hls/0b345b5917716f597dda2cab1661a069/live0/cdeb442f7dff7adb0df6bbecc5270827/index.m3u8",
    "fastWs": "ws://rwen.xstrive.com/ws/0b345b5917716f597dda2cab1661a069/live0/cdeb442f7dff7adb0df6bbecc5270827.flv",
    "fastRtmp": "rtmp://rwen.xstrive.com:19352/0b345b5917716f597dda2cab1661a069/live0_cdeb442f7dff7adb0df6bbecc5270827"
  }
}

Response Parameter Description

Parameter Type Description
item.id string Encrypted token
item.des string Description
item.path string Deprecated, no longer used
item.type string Generation type used in the request
item.createTime string Creation time
item.expiredTime string Expiration time
urls.hlsUrl string Fast live hls address
urls.flvUrl string Fast live flv address
urls.fastFlv string Low latency flv address
urls.fastWebrtc string Low latency webrtc address
urls.fastHls string Low latency hls address
urls.fastWs string Low latency ws address
urls.fastRtmp string Low latency rtmp address

Notes

  • Applicable to third-party platform integration
  • Domain names may change; do not construct playback addresses yourself.
  • Live domains: hls.cloud.xstrive.com、flv.cloud.xstrive.com、rwen.xstrive.com
  • Backup domains hlscloud1.xstrive.com、flvcloud1.xstrive.com、rwen1.xstrive.com、hlscloud2.xstrive.com、flvcloud2.xstrive.com、rwen2.xstrive.com
  • If you need to add a whitelist, add all live domains and backup domains.
Didn't find what you need?Contact us,Talk to our engineers directly.

Request a Quote

Fill in the form and we will get back with a quote and proposal within 1 business day.

Click "Generate inquiry email" to open your mail client with the body pre-filled. If no mail client is configured, click "Copy" and paste it into webmail — recipient: sunshiyang@xstrive.com.