Cloudflare Stream

Cloudflare Stream is the video streaming, hosting, and live-video product from Cloudflare - a single REST API for uploading, storing, encoding, and delivering on-demand and live video across Cloudflare's global network. It handles direct and TUS resumable uploads, copy-from-URL ingest, live inputs over RTMPS and SRT (with simulcast outputs and WebRTC/WHIP/WHEP beta), a built-in adaptive-bitrate player and HLS/DASH manifests, AI-generated and uploaded captions, signed-URL access control, per-account webhooks, and viewing analytics. This entry documents the Cloudflare Stream product specifically, not the broader Cloudflare platform. The API is served under https://api.cloudflare.com/client/v4/accounts/{account_id}/stream and authenticates with a Bearer API token. Billed at $5 per 1,000 minutes of video stored and $1 per 1,000 minutes delivered.

6 APIs 0 Features
VideoStreamingLive StreamingMediaVideo HostingCloudflare

APIs

Cloudflare Stream Videos API

Upload, store, encode, list, edit, and delete on-demand video. Supports direct uploads, TUS resumable uploads, copy-from-URL ingest, one-time direct creator uploads, video clipp...

Cloudflare Stream Live Inputs API

Create and manage live inputs that receive broadcasts over RTMPS or SRT and deliver them live and as recordings. Manage simulcast outputs that restream one input to other RTMP o...

Cloudflare Stream Captions API

List, upload, AI-generate, retrieve (including WebVTT), and delete per-language captions and subtitles for a video, keyed by BCP 47 language tag, under /accounts/{account_id}/st...

Cloudflare Stream Signed URLs API

Restrict playback with signed URLs. Create and revoke RSA signing keys (up to 1,000 per account) under /accounts/{account_id}/stream/keys, and mint per-video signed tokens via P...

Cloudflare Stream Webhooks API

Subscribe, view, and delete the single per-account webhook that Stream calls when a video finishes processing or enters an error state. Notifications are signed with a secret an...

Cloudflare Stream Analytics API

Measure minutes viewed and stored. Read account video storage usage via GET /accounts/{account_id}/stream/storage-usage, and query rich viewing analytics (minutes viewed, by vid...

Collections

Pricing Plans

Rate Limits

Cloudflare Stream Rate Limits

4 limits

RATE LIMITS

FinOps

Resources

🔗
VulnerabilityDisclosure
VulnerabilityDisclosure
🔗
DomainSecurity
DomainSecurity
🔑
Authentication
Authentication
🔗
LinkedIn
LinkedIn
🔗
Website
Website
🔗
Documentation
Documentation
🔗
Plans
Plans
🔗
RateLimits
RateLimits
🔗
FinOps
FinOps
👥
GitHubOrganization
GitHubOrganization
💰
Pricing
Pricing
📰
Blog
Blog

Sources

Raw ↑
opencollection: 1.0.0
info:
  name: Cloudflare Stream API
  version: '1.0'
request:
  auth:
    type: bearer
    token: '{{apiToken}}'
items:
- info:
    name: Videos
    type: folder
  items:
  - info:
      name: List videos.
      type: http
    http:
      method: GET
      url: https://api.cloudflare.com/client/v4/accounts/{{accountId}}/stream
    docs: Lists up to 1,000 videos from a single request.
  - info:
      name: Retrieve video details.
      type: http
    http:
      method: GET
      url: https://api.cloudflare.com/client/v4/accounts/{{accountId}}/stream/:identifier
      params:
      - name: identifier
        value: ''
        type: path
        description: The video uid.
    docs: Fetches details for a single video by its uid.
  - info:
      name: Edit video details.
      type: http
    http:
      method: POST
      url: https://api.cloudflare.com/client/v4/accounts/{{accountId}}/stream/:identifier
      params:
      - name: identifier
        value: ''
        type: path
        description: The video uid.
      body:
        type: json
        data: '{"meta":{"name":"my video"},"requireSignedURLs":true}'
    docs: Edits video metadata such as name, requireSignedURLs, and allowedOrigins.
  - info:
      name: Delete a video.
      type: http
    http:
      method: DELETE
      url: https://api.cloudflare.com/client/v4/accounts/{{accountId}}/stream/:identifier
      params:
      - name: identifier
        value: ''
        type: path
        description: The video uid.
    docs: Deletes a video and removes it from storage and delivery.
  - info:
      name: Create a direct creator upload.
      type: http
    http:
      method: POST
      url: https://api.cloudflare.com/client/v4/accounts/{{accountId}}/stream/direct_upload
      body:
        type: json
        data: '{"maxDurationSeconds":3600}'
    docs: Creates a one-time upload URL a client can upload to directly.
  - info:
      name: Upload a video from a URL.
      type: http
    http:
      method: POST
      url: https://api.cloudflare.com/client/v4/accounts/{{accountId}}/stream/copy
      body:
        type: json
        data: '{"url":"https://example.com/video.mp4"}'
    docs: Fetches and ingests a video from a publicly accessible URL.
  - info:
      name: Clip a video.
      type: http
    http:
      method: POST
      url: https://api.cloudflare.com/client/v4/accounts/{{accountId}}/stream/clip
      body:
        type: json
        data: '{"clippedFromVideoUID":"","startTimeSeconds":0,"endTimeSeconds":30}'
    docs: Creates a new clipped video from a start and end time of an existing video.
  - info:
      name: Get account storage usage.
      type: http
    http:
      method: GET
      url: https://api.cloudflare.com/client/v4/accounts/{{accountId}}/stream/storage-usage
    docs: Returns the total minutes of video stored and the storage limit.
- info:
    name: Live Inputs
    type: folder
  items:
  - info:
      name: List live inputs.
      type: http
    http:
      method: GET
      url: https://api.cloudflare.com/client/v4/accounts/{{accountId}}/stream/live_inputs
    docs: Lists all live inputs on the account.
  - info:
      name: Create a live input.
      type: http
    http:
      method: POST
      url: https://api.cloudflare.com/client/v4/accounts/{{accountId}}/stream/live_inputs
      body:
        type: json
        data: '{"meta":{"name":"my live input"},"recording":{"mode":"automatic"}}'
    docs: Creates a live input that receives a broadcast over RTMPS or SRT.
  - info:
      name: Retrieve a live input.
      type: http
    http:
      method: GET
      url: https://api.cloudflare.com/client/v4/accounts/{{accountId}}/stream/live_inputs/:live_input_identifier
      params:
      - name: live_input_identifier
        value: ''
        type: path
        description: The live input identifier.
    docs: Fetches details, connection status, and RTMPS/SRT credentials for a live input.
  - info:
      name: Update a live input.
      type: http
    http:
      method: PUT
      url: https://api.cloudflare.com/client/v4/accounts/{{accountId}}/stream/live_inputs/:live_input_identifier
      params:
      - name: live_input_identifier
        value: ''
        type: path
        description: The live input identifier.
      body:
        type: json
        data: '{"recording":{"mode":"off"}}'
    docs: Updates the configuration of an existing live input.
  - info:
      name: Delete a live input.
      type: http
    http:
      method: DELETE
      url: https://api.cloudflare.com/client/v4/accounts/{{accountId}}/stream/live_inputs/:live_input_identifier
      params:
      - name: live_input_identifier
        value: ''
        type: path
        description: The live input identifier.
    docs: Deletes a live input.
  - info:
      name: List simulcast outputs.
      type: http
    http:
      method: GET
      url: https://api.cloudflare.com/client/v4/accounts/{{accountId}}/stream/live_inputs/:live_input_identifier/outputs
      params:
      - name: live_input_identifier
        value: ''
        type: path
        description: The live input identifier.
    docs: Lists the simulcast (restreaming) outputs configured on a live input.
  - info:
      name: Create a simulcast output.
      type: http
    http:
      method: POST
      url: https://api.cloudflare.com/client/v4/accounts/{{accountId}}/stream/live_inputs/:live_input_identifier/outputs
      params:
      - name: live_input_identifier
        value: ''
        type: path
        description: The live input identifier.
      body:
        type: json
        data: '{"url":"rtmps://live.example.com/live","streamKey":""}'
    docs: Creates a simulcast output that restreams to another RTMP or SRT destination.
  - info:
      name: Delete a simulcast output.
      type: http
    http:
      method: DELETE
      url: https://api.cloudflare.com/client/v4/accounts/{{accountId}}/stream/live_inputs/:live_input_identifier/outputs/:output_identifier
      params:
      - name: live_input_identifier
        value: ''
        type: path
        description: The live input identifier.
      - name: output_identifier
        value: ''
        type: path
        description: The simulcast output identifier.
    docs: Deletes a simulcast output from a live input.
- info:
    name: Captions
    type: folder
  items:
  - info:
      name: List captions.
      type: http
    http:
      method: GET
      url: https://api.cloudflare.com/client/v4/accounts/{{accountId}}/stream/:identifier/captions
      params:
      - name: identifier
        value: ''
        type: path
        description: The video uid.
    docs: Lists the available caption and subtitle languages for a video.
  - info:
      name: Generate captions with AI.
      type: http
    http:
      method: POST
      url: https://api.cloudflare.com/client/v4/accounts/{{accountId}}/stream/:identifier/captions/:language/generate
      params:
      - name: identifier
        value: ''
        type: path
        description: The video uid.
      - name: language
        value: en
        type: path
        description: The BCP 47 language tag.
    docs: Automatically generates captions for a language using AI transcription.
  - info:
      name: Get captions as WebVTT.
      type: http
    http:
      method: GET
      url: https://api.cloudflare.com/client/v4/accounts/{{accountId}}/stream/:identifier/captions/:language/vtt
      params:
      - name: identifier
        value: ''
        type: path
        description: The video uid.
      - name: language
        value: en
        type: path
        description: The BCP 47 language tag.
    docs: Returns the captions for a language in WebVTT format.
  - info:
      name: Delete captions for a language.
      type: http
    http:
      method: DELETE
      url: https://api.cloudflare.com/client/v4/accounts/{{accountId}}/stream/:identifier/captions/:language
      params:
      - name: identifier
        value: ''
        type: path
        description: The video uid.
      - name: language
        value: en
        type: path
        description: The BCP 47 language tag.
    docs: Deletes the captions for a language from a video.
- info:
    name: Signed URLs
    type: folder
  items:
  - info:
      name: Create a signing key.
      type: http
    http:
      method: POST
      url: https://api.cloudflare.com/client/v4/accounts/{{accountId}}/stream/keys
    docs: Creates an RSA signing key, returning base64-encoded pem and jwk values.
  - info:
      name: List signing keys.
      type: http
    http:
      method: GET
      url: https://api.cloudflare.com/client/v4/accounts/{{accountId}}/stream/keys
    docs: Lists the signing key IDs available on the account.
  - info:
      name: Delete a signing key.
      type: http
    http:
      method: DELETE
      url: https://api.cloudflare.com/client/v4/accounts/{{accountId}}/stream/keys/:key_id
      params:
      - name: key_id
        value: ''
        type: path
        description: The signing key ID.
    docs: Revokes a signing key, invalidating all tokens created with it.
  - info:
      name: Create a signed URL token.
      type: http
    http:
      method: POST
      url: https://api.cloudflare.com/client/v4/accounts/{{accountId}}/stream/:identifier/token
      params:
      - name: identifier
        value: ''
        type: path
        description: The video uid.
      body:
        type: json
        data: '{"exp":1735689600,"downloadable":false}'
    docs: Mints a signed URL token for a video, expiring in one hour by default.
- info:
    name: Webhooks
    type: folder
  items:
  - info:
      name: View webhook.
      type: http
    http:
      method: GET
      url: https://api.cloudflare.com/client/v4/accounts/{{accountId}}/stream/webhook
    docs: Retrieves the current per-account webhook subscription.
  - info:
      name: Create or update the webhook.
      type: http
    http:
      method: PUT
      url: https://api.cloudflare.com/client/v4/accounts/{{accountId}}/stream/webhook
      body:
        type: json
        data: '{"notificationUrl":"https://example.com/webhook"}'
    docs: Subscribes the single per-account webhook for video ready/error notifications.
  - info:
      name: Delete the webhook.
      type: http
    http:
      method: DELETE
      url: https://api.cloudflare.com/client/v4/accounts/{{accountId}}/stream/webhook
    docs: Deletes the per-account webhook subscription.