MpegFlowBlogBack to home
← Alternatives·vs Cloudflare Stream·Cloudflare Stream API

Cloudflare Stream API: REST + Workers integration

Cloudflare Stream's API surface — REST endpoints, integration with Cloudflare Workers for custom logic, and how the API fits the broader Cloudflare developer experience.

Feature deep-dive · Cloudflare Stream·api·Cloudflare Stream ↗

Cloudflare Stream's API is functional but less developer-ergonomic than Mux's. The integration with Cloudflare Workers adds significant programmability — you can run custom logic (auth, geo-restriction, A/B tests) at the edge without managing separate infrastructure. For Cloudflare-platform-resident workflows, the Workers integration is more valuable than the API itself.

What Cloudflare Stream actually has

REST API for video uploads, asset management, signed-URL generation, live stream creation. Webhooks for video lifecycle events (upload, processing, ready, errored). Direct Creator Uploads (resumable uploads via tus protocol) for client-side upload flows. Cloudflare Workers integration: custom logic running at every edge POP, with access to the Stream API for signed-URL issuance, viewer auth verification, geo-restriction enforcement. Cloudflare KV for storing asset metadata, viewer-state tracking. Cloudflare D1 (SQLite at edge) for relational queries close to Stream content. The API documentation is technically complete but less polished than Mux's.

Where it's the right fit

Cloudflare-platform-resident workflows where Stream + Workers + KV + D1 + R2 form a coherent stack with shared auth and edge proximity. Custom auth/geo-restriction logic that runs naturally at the edge via Workers. Client-side upload flows where Direct Creator Uploads + signed-URL pattern fits the architecture.

Where the gaps show up

Less polished documentation than Mux — examples are present but pedagogical guides are weaker. SDK coverage is narrower (no first-party Python SDK, for instance — REST + curl is the documented path). The API surface has accumulated some inconsistencies as features added (live, encrypted access, watermarking) over years.

Pricing implications

API access is included in Cloudflare Stream's standard pricing. Cloudflare Workers compute is metered separately ($0.50 per 1M invocations + $0.0125 per GB-second of CPU time) — at video-pipeline volumes, typically rounds to under $50/month for moderate Workers usage.

The MpegFlow angle

MpegFlow's API takes a different approach: declarative DAG manifests (workflow as JSON/YAML) rather than the asset-centric model. We expose REST + gRPC + WebSocket + CLI. For Cloudflare-platform users, MpegFlow can integrate with Workers via webhook events the same way Stream does — the architectures are different, but cohabitation works.

Topics
  • api
  • cloudflare-stream
  • workers
  • developer-ergonomics
More on Cloudflare Stream
  • Cloudflare Stream Live
    Cloudflare Stream Live: managed live streaming on the global edge
  • Pricing model
    Cloudflare Stream pricing: simple per-minute model, edge delivery included
  • Global edge delivery
    Cloudflare Stream global delivery: edge proximity for every viewer
Evaluating Cloudflare Stream?

See the full side-by-side comparison.

The cloudflare stream api deep-dive above is one slice of the Cloudflare Stream comparison. The full page covers pricing shape, when each platform wins, migration patterns, and the honest 30-second answer for which to pick.

MpegFlow vs Cloudflare Stream Join the beta
© 2026 MpegFlow, Inc. · Trust & complianceAll systems nominal·StatusPrivacy