---
# System prepended metadata

title: CloudFlare Stream PoC

---

---
title: CloudFlare Stream PoC
---

# CloudFlare Stream PoC

## Setup

- [🔗 Get started with Cloudflare Stream](https://developers.cloudflare.com/stream/get-started/)

### Request

```sh=
curl -X POST \
    -H "Authorization: Bearer {{API_TOKEN}}" \
    -D '{"meta": {"name":"test stream"},"recording": { "mode": "automatic" }}' \
    https://api.cloudflare.com/client/v4/accounts/{{ACCOUNT_ID}}/stream/live_inputs
```

### Embed Code
```html=
<iframe
  src="https://customer-<CODE>.cloudflarestream.com/{{VIDEO_UID}}/iframe"
  title="Example Stream video"
  frameBorder="0"
  allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
  allowFullScreen>
</iframe>
```

### Simulcast to YouTube
```sh=
curl -X POST \
--data '{"url": "rtmp://a.rtmp.youtube.com/live2","streamKey": "<redacted>"}' \
-H "Authorization: Bearer {{API_TOKEN}}" \
https://api.cloudflare.com/client/v4/accounts/<ACCOUNT_ID>/stream/live_inputs/{{INPUT_UID}}/outputs
```

## PoC

<div style="position: relative; padding-top: 56.25%;"><iframe src="https://customer-854354kx06vl8pdp.cloudflarestream.com/856ab224ac692b8a518a5b28d57f0bd9/iframe?preload=true&autoplay=true&poster=https%3A%2F%2Fcustomer-854354kx06vl8pdp.cloudflarestream.com%2F856ab224ac692b8a518a5b28d57f0bd9%2Fthumbnails%2Fthumbnail.jpg%3Ftime%3D%26height%3D600" style="border: none; position: absolute; top: 0; left: 0; height: 100%; width: 100%;" allow="accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;" allowfullscreen="true"></iframe></div>


<div style="position: relative; padding-top: 56.25%;"><iframe src="https://customer-854354kx06vl8pdp.cloudflarestream.com/9786270b1e4b5e73e52ea796b728e0d0/watch" style="border: none; position: absolute; top: 0; left: 0; height: 100%; width: 100%;" allow="accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;" allowfullscreen="true"></iframe></div>