Hyperframes ships two official deployment templates that wrap a composition in a small web app: an in-browser preview and aDocumentation Index
Fetch the complete documentation index at: https://hyperframes.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
/api/render endpoint that produces an MP4 server-side. Both are open source, Apache-2.0, and deploy from a single button.
| Template | Compute | Storage | Deploy |
|---|---|---|---|
| Vercel | Vercel Sandbox (Firecracker microVM) | Vercel Blob | vercel.com/templates/ai/hyperframes-on-vercel |
| Cloudflare | Cloudflare Containers (Workers + Durable Object) | R2 | One-click button in the repo README |
- Preview the bundled
ui-3d-revealcomposition in the browser via the<hyperframes-player>web component. - Render to MP4 by POSTing to
/api/render. The handler ships the composition to a sandboxed runtime that has Chromium, FFmpeg, andhyperframespre-installed, then streams the MP4 back to object storage and returns a public URL. - Author locally, deploy the preview + render API. Compositions are still built on your machine with
npx hyperframes init, then dropped into the template’spublic/compositions/directory.
Choosing a template
- Vercel
- Cloudflare
Pick this if you already deploy on Vercel, want zero-config Blob storage, or want to reuse Vercel’s CI/preview environments.
What you get
- A Next.js app with
<hyperframes-player>preview and aPOST /api/renderroute. - A pre-baked Vercel Sandbox snapshot built during
next build— cold renders skip the Chromium/FFmpeg install and restore from snapshot in ~100 ms. - A Vercel Blob store provisioned automatically on deploy.
BLOB_READ_WRITE_TOKENis injected for you.
standard-4 (4 vCPU). With --workers auto, three parallel Chrome workers cut render time meaningfully vs. single-worker. Concrete render time depends on composition length, complexity, and asset size.PricingVercel Pro plans include Sandbox credit each month. See Vercel Sandbox pricing for current per-vCPU and per-GB rates and the up-to-date credit allowance.Vercel Functions cap at 300s and a 50 MB compressed bundle, which can’t fit Chromium + FFmpeg. The template uses Vercel Sandbox specifically because it’s the purpose-built primitive for this workload — up to 5 hours of runtime and up to 8 vCPUs per render.
Architecture
Both templates follow the same flow: the browser plays a preview locally, then POSTs to a render endpoint that delegates to a sandboxed runtime with Chromium + FFmpeg.chrome-headless-shell takes 30–60s, which would dominate every cold render. Vercel’s template snapshots the sandbox at build time; Cloudflare’s template bakes everything into the container image. Both restore in milliseconds and let you spend the entire request budget on actual rendering.
Swapping the composition
Both templates ship with one bundled composition (ui-3d-reveal). To use your own:
Author locally
Compositions are HTML — author them on your machine with the CLI:
Terminal
Point the template at it
- Vercel: edit
PREVIEW_COMPOSITION_DIRat the top oflib/preview.tsand the dimensions inapp/page.tsxif it isn’t 1920×1080. - Cloudflare: set
PREVIEW_COMPOSITION_DIR=compositions/<your-name>when runningnpm run deploy, or edit the default inscripts/build.mjs. Update player dimensions inpublic/index.htmlif needed.
When to use a template vs. roll your own
Templates are optimized for a single render endpoint behind a preview UI. They’re the fastest way to get a hosted Hyperframes render API running. If you need:- A render queue with retries, deduplication, or priorities — start from a template, then add your own queue (e.g. Vercel Queues, Cloudflare Queues, SQS).
- Multi-tenant rendering with per-user composition uploads — start from a template, replace the bundled composition with a runtime-fetched one.
- Self-hosted rendering — see the Rendering guide and run
hyperframes render --dockeron your own infrastructure.
Next Steps
Rendering
Render compositions locally or in Docker
Player package
Embed
<hyperframes-player> in any HTML pageVercel template
Source on GitHub
Cloudflare template
Source on GitHub