Cloudflare Docs
Edit this page on GitHub
Set theme to dark (⇧+D)

Upload via link

If you have videos stored in a cloud storage bucket, you can pass a HTTP link for the file. Stream will fetch the file and make it available for streaming.

By using webhooks you can receive a notification when the video is ready to be played or if it errors.

Make a HTTP request to the Stream API with the URL of the video.

curl \
-d '{"url":"","meta":{"name":"My First Stream Video"}}' \
-H "Authorization: Bearer <API_TOKEN>" \<ACCOUNT_ID>/stream/copy
"result": {
"uid": "6b9e68b07dfee8cc2d116e4c51d6a957",
"thumbnail": "",
"thumbnailTimestampPct": 0,
"readyToStream": false,
"status": {
"state": "downloading"
"meta": {
"downloaded-from": "",
"name": "My First Stream Video"
"created": "2020-10-16T20:20:17.872170843Z",
"modified": "2020-10-16T20:20:17.872170843Z",
"size": 9032701,
"preview": "",
"allowedOrigins": [],
"requireSignedURLs": false,
"uploaded": "2020-10-16T20:20:17.872170843Z",
"uploadExpiry": null,
"maxSizeBytes": 0,
"maxDurationSeconds": 0,
"duration": -1,
"input": {
"width": -1,
"height": -1
"playback": {
"hls": "",
"dash": ""
"watermark": null
"success": true,
"errors": [],
"messages": []

​​ Step 2: Poll the API or wait for a webhook

Because Stream must download and encode the video, the video might not be available for a few seconds to a few minutes depending on the length of your video. You should poll the Stream API until readyToStream is true, or use webhooks to be notified when a video is ready for streaming.

​​ Step 3: View the video

The uid of the video can be used refer to the video after uploading and can be used to play it using the Stream video player.

If you’re using your own player or rendering the video in a mobile app, view information on using your own player.

View detailed API reference