Quick Start

1. Get your API key

Sign in to the dashboard, click + New key, and copy the value shown. You'll see the raw key once — store it somewhere safe.

2. Submit a render job

POST a self-contained HTML template plus the reel parameters. You get a job ID back immediately — the render runs frame-by-frame on a worker.

curl -X POST https://api.html2reel.com/v1/reels \
  -H "X-API-Key: h2r_..." \
  -H "Content-Type: application/json" \
  -d '{
    "html": "<!doctype html><html>...</html>",
    "duration_seconds": 15,
    "width": 1080,
    "height": 1920,
    "fps": 30
  }'
# {"job_id":"abc","status":"queued"}

3. Poll for the result

When status is done, url points at the rendered mp4 on R2. While queued or processing the response carries a Retry-After header (default 10 s) — honour it.

curl https://api.html2reel.com/v1/reels/abc -H "X-API-Key: h2r_..."
# {"status":"done","url":"https://.../result.mp4","error":null}

4. Get notified with a webhook

Pass callback_url in the request body — html2reel POSTs the final job state there when the render finishes, so you don't have to poll. Three retries with exponential backoff if your endpoint is down.

curl -X POST https://api.html2reel.com/v1/reels \
  -H "X-API-Key: h2r_..." \
  -d '{
    "html": "<...>",
    "duration_seconds": 15,
    "callback_url": "https://you.com/render-done"
  }'