hyperframes render.
Authenticate
Cloud rendering needs a HeyGen credential. Sign in once — the CLI stores it in~/.heygen/credentials (mode 0600), and the same credential drives every cloud subcommand.
Sign in
The default flow opens your browser for OAuth 2.0 + PKCE and captures the token on a loopback port:For CI or headless machines, use a long-lived API key instead:
heygen CLI — sign in with one and the other picks up the session. Credentials resolve in this order (first match wins):
HEYGEN_API_KEYenvironment variableHYPERFRAMES_API_KEYenvironment variable (hyperframes alias)~/.heygen/credentials
Point the CLI at a different backend with
HEYGEN_API_URL (default https://api.heygen.com). Use hyperframes auth refresh to force-refresh an OAuth token before a long job; hyperframes auth logout clears the stored credential.How a cloud render flows
hyperframes cloud render runs the whole pipeline end-to-end:
- Resolve the project — a local directory (default
.), or skip the upload with--asset-id/--url. - Auto-detect the aspect ratio from the entry HTML’s
data-width/data-heightso you rarely set it by hand. - Zip the project (same ignore set as
hyperframes publish). - Upload the zip to
POST /v3/assets, yielding anasset_id. - Submit the render to
POST /v3/hyperframes/renders. - Poll
GET /v3/hyperframes/renders/{id}until it completes or fails (skip with--no-wait). - Download the signed video URL to disk.
Render options
The most-used flags — see the CLI reference for the full list.| Flag | Default | Meaning |
|---|---|---|
--fps | 30 | Frames per second, 1–240. |
--quality | standard | draft, standard, or high. |
--format | mp4 | mp4, webm, or mov (webm/mov carry alpha). |
--resolution | 1080p | 1080p or 4k. 4k is billed at 1.5×. |
--aspect-ratio | auto | 16:9, 9:16, or 1:1. Auto-detected from a local project’s data-width/data-height; for --asset-id/--url it defaults to 16:9 unless set. |
--composition / -c | index.html | Entry HTML file inside the zip. |
--output / -o | renders/<render_id>.<ext> | Local destination for the download. |
Templates and variables
Cloud rendering supports variables — the same mechanism that powers templates everywhere else in HyperFrames. Declaredata-composition-variables on your composition, then fill them at render time:
--variables against the composition’s declared schema before uploading. For --asset-id / --url the schema lives server-side, so mismatches surface as a hyperframes_project_invalid API error.
The idiomatic template workflow is upload once, re-render many: render a local project to get its asset_id, then submit new renders against that same asset with different variables — no re-zip, no re-upload.
Fire-and-forget and webhooks
By default the CLI blocks, polls, and downloads. Pass--no-wait to submit and exit with just the render_id, and --callback-url to get an HTTPS webhook when the render terminates. The webhook fires whether or not the CLI is still polling, so combine them for true fire-and-forget:
| Flag | Meaning |
|---|---|
--no-wait | Submit and exit immediately; print the render_id. |
--callback-url | HTTPS webhook fired when the render terminates. |
--callback-id | Opaque tracking ID echoed in webhook payloads. |
--poll-interval | Poll cadence in seconds (default 10). |
--max-wait | Max poll duration in minutes (default 60). |
Managing renders
video_url and thumbnail_url are short-lived presigned URLs — re-fetch with cloud get rather than caching them.
Safe retries
The CLI transparently retries on a401 Unauthorized by force-refreshing the OAuth token and replaying the request. That’s harmless for reads, but the zip upload (POST /v3/assets) is not idempotent on its own — a blind retry would create a duplicate asset and bill the workspace twice. Pass --idempotency-key so retries are safe:
[A-Za-z0-9_:.-] (1–255 chars).
Cloud vs. Lambda vs. local
hyperframes render(local) — fastest iteration loop; use while authoring. See Rendering.hyperframes cloud render— zero-infra; HeyGen runs the render and you pay per credit. Use when you don’t want to manage Chrome/FFmpeg/AWS.hyperframes lambda render— bring-your-own-AWS distributed rendering with chunked parallelism. Use when you’ve already invested in AWS. See AWS Lambda.
Next steps
Variables
Declare and fill template slots in a composition
Templates on Lambda
High-volume personalized renders on your own AWS
Local rendering
Render locally or in Docker during authoring
CLI reference
Every
cloud and auth flag in detail