---
title: Manage creators
description: Set and use creator IDs to associate Cloudflare Stream videos with internal user accounts.
image: https://developers.cloudflare.com/dev-products-preview.png
---

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

[Skip to content](#%5Ftop) 

# Manage creators

You can set the creator field with an internal user ID at the time a tokenized upload URL is requested. When the video is uploaded, the creator property is automatically set to the internal user ID which can be used for analytics data or when searching for videos by a specific creator.

For basic uploads, you will need to add the Creator ID after you upload the video.

## Upload from URL

* [ REST API ](#tab-panel-8439)
* [ Workers Binding API ](#tab-panel-8440)

* [ cURL ](#tab-panel-8421)
* [ TypeScript ](#tab-panel-8422)

Terminal window

```

curl "https://api.cloudflare.com/client/v4/accounts/{account_id}/stream/copy" \

--header "Authorization: Bearer <API_TOKEN>" \

--header "Content-Type: application/json" \

--data '{"url":"https://example.com/myvideo.mp4","creator": "<CREATOR_ID>","thumbnailTimestampPct":0.529241,"allowedOrigins":["example.com"],"requireSignedURLs":true,"watermark":{"uid":"ea95132c15732412d22c1476fa83f27a"}}'


```

TypeScript

```

const client = new Cloudflare({

  apiEmail: process.env['CLOUDFLARE_EMAIL'],

  apiKey: process.env['CLOUDFLARE_API_KEY'],

});


const video = await client.stream.copy.create({

  account_id: '<ACCOUNT_ID>',

  url: 'https://example.com/myvideo.mp4',

  creator: '<CREATOR_ID>',

  thumbnailTimestampPct: 0.529241,

  allowedOrigins: ['example.com'],

  requireSignedURLs: true,

  watermark: { uid: 'ea95132c15732412d22c1476fa83f27a' },

});


```

**Response**

```

{

  "success": true,

  "errors": [],

  "messages": [],

  "result": {

    "allowedOrigins": ["example.com"],

    "created": "2014-01-02T02:20:00Z",

    "duration": 300,

    "input": {

      "height": 1080,

      "width": 1920

    },

    "maxDurationSeconds": 300,

    "meta": {},

    "modified": "2014-01-02T02:20:00Z",

    "uploadExpiry": "2014-01-02T02:20:00Z",

    "playback": {

      "hls": "https://customer-f33zs165nr7gyfy4.cloudflarestream.com/6b9e68b07dfee8cc2d116e4c51d6a957/manifest/video.m3u8",

      "dash": "https://customer-f33zs165nr7gyfy4.cloudflarestream.com/6b9e68b07dfee8cc2d116e4c51d6a957/manifest/video.mpd"

    },

    "preview": "https://customer-f33zs165nr7gyfy4.cloudflarestream.com/6b9e68b07dfee8cc2d116e4c51d6a957/watch",

    "readyToStream": true,

    "requireSignedURLs": true,

    "size": 4190963,

    "status": {

      "state": "ready",

      "pctComplete": "100.000000",

      "errorReasonCode": "",

      "errorReasonText": ""

    },

    "thumbnail": "https://customer-f33zs165nr7gyfy4.cloudflarestream.com/6b9e68b07dfee8cc2d116e4c51d6a957/thumbnails/thumbnail.jpg",

    "thumbnailTimestampPct": 0.529241,

    "creator": "<CREATOR_ID>",

    "uid": "6b9e68b07dfee8cc2d116e4c51d6a957",

    "liveInput": "fc0a8dc887b16759bfd9ad922230a014",

    "uploaded": "2014-01-02T02:20:00Z",

    "watermark": {

      "uid": "6b9e68b07dfee8cc2d116e4c51d6a957",

      "size": 29472,

      "height": 600,

      "width": 400,

      "created": "2014-01-02T02:20:00Z",

      "downloadedFrom": "https://company.com/logo.png",

      "name": "Marketing Videos",

      "opacity": 0.75,

      "padding": 0.1,

      "scale": 0.1,

      "position": "center"

    }

  }

}


```

See the full Stream [REST API and SDK reference](https://developers.cloudflare.com/api/resources/stream/) for details on using REST API from external applications, with pre-generated SDK's for external TypeScript, Python, or Go applications.

* [ index.ts ](#tab-panel-8423)
* [ wrangler.jsonc ](#tab-panel-8424)

TypeScript

```

export default {

  async fetch(request, env) {

    const video = await env.STREAM.upload("https://example.com/myvideo.mp4", {

      creator: "<CREATOR_ID>",

      thumbnailTimestampPct: 0.529241,

      allowedOrigins: ["example.com"],

      requireSignedURLs: true,

      watermarkId: "ea95132c15732412d22c1476fa83f27a",

    });

    return Response.json(video);

  },

};


```

```

{

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

  "name": "<ENTER_WORKER_NAME>",

  "main": "src/index.ts",

  "compatibility_date": "$today",

  "observability": {

    "enabled": true

  },

  "stream": {

    "binding": "STREAM"

  }

}


```

See the full [Workers Stream binding API reference](https://developers.cloudflare.com/stream/manage-video-library/bindings/).

## Set default creators for videos

You can associate videos with a single creator by setting a default creator ID value, which you can later use for searching for videos by creator ID or for analytics data.

* [ REST API ](#tab-panel-8437)

* [ cURL ](#tab-panel-8425)
* [ TypeScript ](#tab-panel-8426)

Terminal window

```

curl "https://api.cloudflare.com/client/v4/accounts/{account_id}/stream/live_inputs" \

--header "Authorization: Bearer <API_TOKEN>" \

--header "Content-Type: application/json" \

--data '{"defaultCreator":"1234"}'


```

TypeScript

```

const client = new Cloudflare({

  apiEmail: process.env['CLOUDFLARE_EMAIL'],

  apiKey: process.env['CLOUDFLARE_API_KEY'],

});


const liveInput = await client.stream.liveInputs.create({

  account_id: '<ACCOUNT_ID>',

  defaultCreator: '1234',

});


```

See the full Stream [REST API and SDK reference](https://developers.cloudflare.com/api/resources/stream/) for details on using REST API from external applications, with pre-generated SDK's for external TypeScript, Python, or Go applications.

If you have multiple creators who start live streams, [create a live input](https://developers.cloudflare.com/stream/get-started/#step-1-create-a-live-input) for each creator who will live stream and then set a `DefaultCreator` value per input. Setting the default creator ID for each input ensures that any recorded videos streamed from the creator's input will inherit the `DefaultCreator` value.

At this time, you can only manage the default creator ID values via the API.

Note

Setting default creator IDs for live inputs is only available via the API. The Stream binding does not currently support live input operations.

## Update creator in existing videos

To update the creator property in existing videos, make a `POST` request to the video object endpoint with a JSON payload specifying the creator property as show in the example below.

* [ REST API ](#tab-panel-8441)
* [ Workers Binding API ](#tab-panel-8442)

* [ cURL ](#tab-panel-8427)
* [ TypeScript ](#tab-panel-8428)

Terminal window

```

curl "https://api.cloudflare.com/client/v4/accounts/{account_id}/stream/<VIDEO_UID>" \

--header "Authorization: Bearer <AUTH_TOKEN>" \

--header "Content-Type: application/json" \

--data '{"creator":"test123"}'


```

TypeScript

```

const client = new Cloudflare({

  apiEmail: process.env['CLOUDFLARE_EMAIL'],

  apiKey: process.env['CLOUDFLARE_API_KEY'],

});


const video = await client.stream.edit({

  account_id: '<ACCOUNT_ID>',

  identifier: '<VIDEO_UID>',

  creator: 'test123',

});


```

See the full Stream [REST API and SDK reference](https://developers.cloudflare.com/api/resources/stream/) for details on using REST API from external applications, with pre-generated SDK's for external TypeScript, Python, or Go applications.

* [ index.ts ](#tab-panel-8429)
* [ wrangler.jsonc ](#tab-panel-8430)

TypeScript

```

export default {

  async fetch(request, env) {

    const video = await env.STREAM.video("<VIDEO_UID>").update({

      creator: "test123",

    });

    return Response.json(video);

  },

};


```

```

{

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

  "name": "<ENTER_WORKER_NAME>",

  "main": "src/index.ts",

  "compatibility_date": "$today",

  "observability": {

    "enabled": true

  },

  "stream": {

    "binding": "STREAM"

  }

}


```

See the full [Workers Stream binding API reference](https://developers.cloudflare.com/stream/manage-video-library/bindings/).

## Direct creator upload

* [ REST API ](#tab-panel-8443)
* [ Workers Binding API ](#tab-panel-8444)

* [ cURL ](#tab-panel-8431)
* [ TypeScript ](#tab-panel-8432)

Terminal window

```

curl "https://api.cloudflare.com/client/v4/accounts/{account_id}/stream/direct_upload" \

--header "Authorization: Bearer <AUTH_TOKEN>" \

--header "Content-Type: application/json" \

--data '{"maxDurationSeconds":300,"expiry":"2021-01-02T02:20:00Z","creator": "<CREATOR_ID>", "thumbnailTimestampPct":0.529241,"allowedOrigins":["example.com"],"requireSignedURLs":true,"watermark":{"uid":"ea95132c15732412d22c1476fa83f27a"}}'


```

TypeScript

```

const client = new Cloudflare({

  apiEmail: process.env['CLOUDFLARE_EMAIL'],

  apiKey: process.env['CLOUDFLARE_API_KEY'],

});


const directUpload = await client.stream.directUpload.create({

  account_id: '<ACCOUNT_ID>',

  maxDurationSeconds: 300,

  expiry: '2021-01-02T02:20:00Z',

  creator: '<CREATOR_ID>',

  thumbnailTimestampPct: 0.529241,

  allowedOrigins: ['example.com'],

  requireSignedURLs: true,

  watermark: { uid: 'ea95132c15732412d22c1476fa83f27a' },

});


```

**Response**

```

{

  "success": true,

  "errors": [],

  "messages": [],

  "result": {

    "uploadURL": "www.example.com/samplepath",

    "uid": "ea95132c15732412d22c1476fa83f27a",

    "creator": "<CREATOR_ID>",

    "watermark": {

      "uid": "ea95132c15732412d22c1476fa83f27a",

      "size": 29472,

      "height": 600,

      "width": 400,

      "created": "2014-01-02T02:20:00Z",

      "downloadedFrom": "https://company.com/logo.png",

      "name": "Marketing Videos",

      "opacity": 0.75,

      "padding": 0.1,

      "scale": 0.1,

      "position": "center"

    }

  }

}


```

See the full Stream [REST API and SDK reference](https://developers.cloudflare.com/api/resources/stream/) for details on using REST API from external applications, with pre-generated SDK's for external TypeScript, Python, or Go applications.

* [ index.ts ](#tab-panel-8433)
* [ wrangler.jsonc ](#tab-panel-8434)

TypeScript

```

export default {

  async fetch(request, env) {

    const directUpload = await env.STREAM.createDirectUpload({

      maxDurationSeconds: 300,

      expiry: "2021-01-02T02:20:00Z",

      creator: "<CREATOR_ID>",

      thumbnailTimestampPct: 0.529241,

      allowedOrigins: ["example.com"],

      requireSignedURLs: true,

      watermark: {

        id: "ea95132c15732412d22c1476fa83f27a",

      },

    });

    return Response.json(directUpload);

  },

};


```

```

{

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

  "name": "<ENTER_WORKER_NAME>",

  "main": "src/index.ts",

  "compatibility_date": "$today",

  "observability": {

    "enabled": true

  },

  "stream": {

    "binding": "STREAM"

  }

}


```

See the full [Workers Stream binding API reference](https://developers.cloudflare.com/stream/manage-video-library/bindings/).

## Get videos by Creator ID

* [ REST API ](#tab-panel-8438)

* [ cURL ](#tab-panel-8435)
* [ TypeScript ](#tab-panel-8436)

Terminal window

```

curl "https://api.cloudflare.com/client/v4/accounts/{account_id}/stream?after=2014-01-02T02:20:00Z&before=2014-01-02T02:20:00Z&include_counts=false&creator=<CREATOR_ID>&limit=undefined&asc=false&status=downloading,queued,inprogress,ready,error" \

--header "Authorization: Bearer <API_TOKEN>"


```

TypeScript

```

const client = new Cloudflare({

  apiEmail: process.env['CLOUDFLARE_EMAIL'],

  apiKey: process.env['CLOUDFLARE_API_KEY'],

});


const videos = await client.stream.list({

  account_id: '<ACCOUNT_ID>',

  creator: '<CREATOR_ID>',

});


```

**Response**

```

{

  "success": true,

  "errors": [],

  "messages": [],

  "result": [

    {

      "allowedOrigins": ["example.com"],

      "created": "2014-01-02T02:20:00Z",

      "duration": 300,

      "input": {

        "height": 1080,

        "width": 1920

      },

      "maxDurationSeconds": 300,

      "meta": {},

      "modified": "2014-01-02T02:20:00Z",

      "uploadExpiry": "2014-01-02T02:20:00Z",

      "playback": {

        "hls": "https://customer-<CODE>.cloudflarestream.com/ea95132c15732412d22c1476fa83f27a/manifest/video.m3u8",

        "dash": "https://customer-<CODE>.cloudflarestream.com/ea95132c15732412d22c1476fa83f27a/manifest/video.mpd"

      },

      "preview": "https://customer-<CODE>.cloudflarestream.com/ea95132c15732412d22c1476fa83f27a/watch",

      "readyToStream": true,

      "requireSignedURLs": true,

      "size": 4190963,

      "status": {

        "state": "ready",

        "pctComplete": "100.000000",

        "errorReasonCode": "",

        "errorReasonText": ""

      },

      "thumbnail": "https://customer-<CODE>.cloudflarestream.com/ea95132c15732412d22c1476fa83f27a/thumbnails/thumbnail.jpg",

      "thumbnailTimestampPct": 0.529241,

      "creator": "some-creator-id",

      "uid": "ea95132c15732412d22c1476fa83f27a",

      "liveInput": "fc0a8dc887b16759bfd9ad922230a014",

      "uploaded": "2014-01-02T02:20:00Z",

      "watermark": {

        "uid": "ea95132c15732412d22c1476fa83f27a",

        "size": 29472,

        "height": 600,

        "width": 400,

        "created": "2014-01-02T02:20:00Z",

        "downloadedFrom": "https://company.com/logo.png",

        "name": "Marketing Videos",

        "opacity": 0.75,

        "padding": 0.1,

        "scale": 0.1,

        "position": "center"

      }

    }

  ],

  "total": "35586",

  "range": "1000"

}


```

See the full Stream [REST API and SDK reference](https://developers.cloudflare.com/api/resources/stream/) for details on using REST API from external applications, with pre-generated SDK's for external TypeScript, Python, or Go applications.

Note

Filtering videos by creator ID is only available via the API. The Stream binding's `videos.list()` method does not currently support filtering by creator.

## tus

Add the Creator ID via the `Upload-Creator` header. For more information, refer to [Resumable and large files (tus)](https://developers.cloudflare.com/stream/uploading-videos/resumable-uploads/#set-creator-property).

## Query by Creator ID with GraphQL

After you set the creator property, you can use the [GraphQL API](https://developers.cloudflare.com/analytics/graphql-api/) to filter by a specific creator. Refer to [Fetching bulk analytics](https://developers.cloudflare.com/stream/getting-analytics/fetching-bulk-analytics) for more information about available metrics and filters.

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/stream/","name":"Stream"}},{"@type":"ListItem","position":3,"item":{"@id":"/stream/manage-video-library/","name":"Manage videos"}},{"@type":"ListItem","position":4,"item":{"@id":"/stream/manage-video-library/creator-id/","name":"Manage creators"}}]}
```
