Setting the file. One moment.
Chapter 04 · Cloudflare Deploy
Subchapter 4.218
references/stream/README.mdMarkdown4 KBView on GitHub
Cloudflare Stream provides video upload, storage, encoding, and delivery without managing infrastructure. Runs on Cloudflare’s global network.
Upload video via API
curl -X POST \
"https://api.cloudflare.com/client/v4/accounts/{account_id}/stream/copy" \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/video.mp4"}'Embed player
<iframe
src="https://customer-<CODE>.cloudflarestream.com/<VIDEO_ID>/iframe"
style="border: none;"
height="720" width="1280"
allow="accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;"
allowfullscreen="true"
></iframe>Create live input
curl -X POST \
"https://api.cloudflare.com/client/v4/accounts/{account_id}/stream/live_inputs" \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
-d '{"recording": {"mode": "automatic"}}'| Order | File | Purpose | When to Use |
|---|---|---|---|
| 1 | configuration.md | Setup SDKs, env vars, signing keys | Starting new project |
| 2 | api.md | On-demand video APIs | Implementing uploads/playback |
| 3 | api-live.md | Live streaming APIs | Building live streaming |
| 4 | patterns.md | Full-stack flows, TUS, JWT signing | Implementing workflows |
| 5 | gotchas.md | Errors, limits, troubleshooting | Debugging issues |