---
title: Introducing Stream Bindings for Workers
description: Interact with Cloudflare Stream videos directly from Workers without API tokens or HTTP requests.
image: https://developers.cloudflare.com/changelog-preview.png
---

> Documentation Index  
> Fetch the complete documentation index at: https://developers.cloudflare.com/changelog/llms.txt  
> Use this file to discover all available pages before exploring further.

[Skip to content](#%5Ftop) 

# Changelog

New updates and improvements at Cloudflare.

[ Subscribe to RSS ](https://developers.cloudflare.com/changelog/rss/index.xml) [ View RSS feeds ](https://developers.cloudflare.com/fundamentals/new-features/available-rss-feeds/) 

![hero image](https://developers.cloudflare.com/_astro/hero.CVYJHPAd_26AMqX.svg) 

[ ← Back to all posts ](https://developers.cloudflare.com/changelog/) 

## Introducing Stream Bindings for Workers

May 07, 2026 

[ Stream ](https://developers.cloudflare.com/stream/) 

You can now interact with your Stream video library using new bindings for Workers! This allows customers to upload content to Stream, provision direct uploads, manage videos, and generate signed URLs from a Worker without making authenticated API calls. We're excited to bring Stream and Workers closer together to empower more programmatic pipelines, tighter integrations, and support generative AI and inference workloads.

Use the Stream binding when you want to:

* Upload videos from URLs or create basic direct upload links for end users
* Generate signed playback tokens without managing signing keys
* Manage video metadata, captions, downloads, and watermarks
* Build video pipelines entirely within Workers

To get started, add the Stream binding to your Wrangler configuration:

* [  wrangler.jsonc ](#tab-panel-1000)
* [  wrangler.toml ](#tab-panel-1001)

JSONC

```

{

  "$schema": "./node_modules/wrangler/config-schema.json",

  "stream": {

    "binding": "STREAM"

  }

}


```

TOML

```

[stream]

binding = "STREAM"


```

**Generate a video with AI and upload directly to Stream** or send a URL of a file you already have:

* [  JavaScript ](#tab-panel-1006)
* [  TypeScript ](#tab-panel-1007)

JavaScript

```

const aiResponse = await env.AI.run(

  "google/veo-3.1",

  {

    prompt: "A dog walking next to a river",

    duration: "10s",

    aspect_ratio: "16:9",

    resolution: "1080p",

    generate_audio: true,

  },

  {

    gateway: { id: "experiments" },

  },

);


// Veo will return a URL of the generated asset.

const videoUrl = aiResponse.result.video;


// Alternative option: a video of the Austin Office mobile

// const videoUrl = 'https://pub-d9fcbc1abcd244c1821f38b99017347f.r2.dev/aus-mobile.mp4';


// Upload to Stream by providing a URL

const streamVideo = await env.STREAM.upload(videoUrl);


// The streamVideo response will include the video ID, playback and manifest

// URLs, and other information, just like the REST API.


```

TypeScript

```

const aiResponse = await env.AI.run(

  'google/veo-3.1',

  {

    prompt: 'A dog walking next to a river',

    duration: '10s',

    aspect_ratio: '16:9',

    resolution: '1080p',

    generate_audio: true,

  },

  {

    gateway: { id: 'experiments' },

  },

);


// Veo will return a URL of the generated asset.

const videoUrl = aiResponse.result.video;


// Alternative option: a video of the Austin Office mobile

// const videoUrl = 'https://pub-d9fcbc1abcd244c1821f38b99017347f.r2.dev/aus-mobile.mp4';


// Upload to Stream by providing a URL

const streamVideo = await env.STREAM.upload(videoUrl);


// The streamVideo response will include the video ID, playback and manifest

// URLs, and other information, just like the REST API.


```

**Generate a signed URL without using a signing key** or an API call:

* [  JavaScript ](#tab-panel-1002)
* [  TypeScript ](#tab-panel-1003)

JavaScript

```

const video_id = "ce800be43a9772f4bb02f35b860fb516";

const token = await env.STREAM.video(video_id).generateToken();


// Use the "token" in an iframe embed code, manifest URL, or thumbnail:

const embedUrl = `https://customer-igynxd2rwhmuoxw8.cloudflarestream.com/${token}/iframe`;


```

TypeScript

```

const video_id = 'ce800be43a9772f4bb02f35b860fb516';

const token = await env.STREAM.video(video_id).generateToken();


// Use the "token" in an iframe embed code, manifest URL, or thumbnail:

const embedUrl = `https://customer-igynxd2rwhmuoxw8.cloudflarestream.com/${token}/iframe`;


```

**Get and set video properties** easily:

* [  JavaScript ](#tab-panel-1004)
* [  TypeScript ](#tab-panel-1005)

JavaScript

```

const video_id = "46c8b7f480d410840758c1cb14a72e47";

const result = await env.STREAM.video(video_id).details();


await env.STREAM.video(video_id).update({

  meta: { name: "sample video" },

});


```

TypeScript

```

const video_id = '46c8b7f480d410840758c1cb14a72e47';

const result = await env.STREAM.video(video_id).details();


await env.STREAM.video(video_id).update({

  meta: { name: 'sample video' }

});


```

For setup instructions and the full API reference, refer to [Bind to Workers API](https://developers.cloudflare.com/stream/manage-video-library/bindings/).

#### Get started with your Agent

> Add a binding for Cloudflare Stream (env.STREAM). On the watch page, use the Stream binding to get info based on the ID, and leverage video.meta.name as the page title.