MiaReel
Back to blog

The MiaReel Cloudflare stack

How Workers, D1, R2, and Turnstile fit together for AI image and video generation.

Jun 23, 2026MiaReel TeamMiaReel Team

MiaReel separates records from files. D1 stores structured data such as users, subscriptions, credits, prompts, provider task IDs, and status. R2 stores the actual media files.

That separation matters because generated videos can be large, while task records need to stay fast to query and cheap to update.

The request flow

  1. The user submits a prompt and optional reference images.
  2. MiaReel creates a task record and consumes credits.
  3. The provider runs the image or video job asynchronously.
  4. Finished media is copied to R2.
  5. The user sees a permanent result URL in their history.

This keeps the first launch simple while leaving room for queues, workflows, and Postgres later.