Quickstart
- Buy a Render plan at autotoast.com/render. Your server builds in a few minutes and you get an email when it's ready.
- Open Render → API keys, create a key, tick the servers it may use. The key (rk_…) is shown once.
- Press Copy prompt and paste it into Lovable, ChatGPT, Claude or Cursor. The agent asks for the key in its secure secret box.
- Your server code calls GET /v1/health to confirm, then POST /v1/render-jobs and polls until the MP4 is ready.
Authentication
Every request needs Authorization: Bearer <RENDER_SERVER_SECRET>. Keys only work on servers you ticked, can expire, are rate-limited (default 60 requests/minute) and can be revoked instantly; revocation takes effect within about 10 seconds. Call the API from server code only — never ship the key to a browser. Base URL is your server address, e.g. https://render-ab12cd34.toastsrv.com.
GET /v1/health
Checks the key and the server.
curl -H "Authorization: Bearer $RENDER_SERVER_SECRET" $RENDER_SERVER_URL/v1/health
→ 200 { "ok": true, "authenticated": true, "serverId": "…", "version": "0.2.0", "hyperframes": "0.8.139",
"sizes": ["1080x1920","1920x1080","1080x1080","1080x1350","1000x1000"], "concurrency": 2, "queue": 0, "running": 0 }POST /v1/render-jobs
Submit a HyperFrames project. Send an Idempotency-Key header so retries never create duplicates.
POST $RENDER_SERVER_URL/v1/render-jobs
Authorization: Bearer $RENDER_SERVER_SECRET
Idempotency-Key: ad-1234-v1
Content-Type: application/json
{
"width": 1080, "height": 1920, // required: 1080x1920, 1920x1080, 1080x1080, 1080x1350 or 1000x1000
"project": { // required: HyperFrames project, index.html required
"files": {
"index.html": "<!doctype html>…", // text files as strings
"assets/logo.png": { "base64": "iVBOR…" } // binary files as base64
}
},
"audio": { "url": "https://…/voice.mp3" }, // { "url" } (public https) or { "base64" } …
// …or let the server make the narration: "voiceover": { "text": "…", "voice": "bf_emma", "speed": 1 }
"durationSeconds": 30, // optional (1–600): exact length; last frame holds, audio padded, never trimmed
"fps": 30, // optional: 24, 30 (default) or 60
"webhookUrl": "https://yourapp.com/api/render-done" // optional, public https
}
→ 202 { "id": "8f1c…", "status": "preparing", "width": 1080, "height": 1920, "downloadUrl": null, … }
→ 200 same body if the Idempotency-Key was already usedGET /v1/render-jobs/{id}
→ 200 {
"id": "8f1c…",
"status": "queued|preparing|voice|rendering|encoding|checking|uploading|ready|failed",
"width": 1080, "height": 1920,
"submittedAt": "…", "startedAt": "…", "finishedAt": "…",
"durationSeconds": 30.0, "sizeBytes": 8123456,
"downloadUrl": "https://… (signed, valid 1 hour; null until ready)",
"error": null
}GET /v1/render-jobs?limit=20
Lists the most recent jobs created with this key (max 100).
→ 200 { "jobs": [ { …job… } ] }POST /v1/tts — voiceovers (Kokoro)
Every render server includes Kokoro text-to-speech (Apache 2.0) running on the server itself, so you don't need ElevenLabs for standard narration. English only. Voices: bf_emma, bf_isabella, bf_alice, bf_lily, bm_george, bm_lewis, bm_daniel, bm_fable (British); af_heart, af_bella, af_nicole, af_sarah, am_adam, am_michael, am_fenrir, am_puck (American). Max 5,000 characters per request; long text is split on sentences automatically. Fair-use monthly limit per server: Starter 200,000, Pro 1,000,000, Scale 3,000,000 characters (402 when reached, resets on the 1st). No voice cloning or emotion control. GET /v1/voices lists the voices.
POST {RENDER_SERVER_URL}/v1/tts
Authorization: Bearer $RENDER_SERVER_SECRET
{ "text": "Your script…", "voice": "bf_emma", "speed": 1, "format": "mp3" } // format mp3 (default) or wav, speed 0.5–2
→ 200 { "id": "…", "status": "ready", "durationSeconds": 12.4, "downloadUrl": "https://… (signed, 1 hour)" }
Or skip the separate call: send "voiceover": { "text", "voice" } instead of "audio" in POST /v1/render-jobs.HyperFrames project format
A HyperFrames project is an HTML page with a root composition element and a paused GSAP timeline registered on window.__timelines. Renders run with no internet access, so don't load anything from a CDN: use the built-in libraries and fonts (relative paths _lib/... and _fonts/...) and send your own images and brand fonts as project files. Send durationSeconds for an exact length; without it the length follows the composition and is trimmed to the audio. Audio is optional when durationSeconds is set (a silent track is added); otherwise it is required and must not be silent. Minimal example (files map):
{
"index.html": "<!doctype html><html><head><meta charset="UTF-8"><script src="gsap.min.js"></script>
<style>html,body{margin:0;width:1080px;height:1920px;overflow:hidden;background:#241E1A}
#root{width:100%;height:100%;display:flex;align-items:center;justify-content:center}
#title{color:#E7A84B;font:700 120px sans-serif}</style></head><body>
<div id="root" data-composition-id="main" data-start="0" data-duration="6" data-width="1080" data-height="1920">
<h1 id="title" class="clip" data-start="0" data-duration="6" data-track-index="0">Hello</h1>
</div>
<script>const tl = gsap.timeline({ paused: true });
tl.fromTo("#title", { opacity: 0, y: 40 }, { opacity: 1, y: 0, duration: 0.8 }, 0);
window.__timelines["main"] = tl; tl.seek(0);</script></body></html>",
"gsap.min.js": "<contents of https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js>"
}
Rules: root has data-composition-id, data-width and data-height matching the job size; every timed element has data-start/data-duration; register window.__timelines[compositionId]. Full reference: https://hyperframes.heygen.comPOST /v1/previews — check frames before rendering
Send the same project (and width/height, optional durationSeconds) plus timestamps or everySeconds. You get PNG frames back in seconds, straight from the HTML, without making a video or using voice characters. Use them to let an AI agent check the layout (overlapping or clipped text, off-brand colours) and fix it before the real render. Up to 30 frames; scale 1, 0.5 or 0.25; links last 1 hour and frames are deleted after 24 hours; 20 previews a minute per key.
POST $RENDER_SERVER_URL/v1/previews
{ "width": 1080, "height": 1920, "project": { "files": { … } }, "durationSeconds": 30, "everySeconds": 2, "scale": 0.5 }
// or "timestamps": [0, 1.5, 4, 9.2]
→ 200 { "id": "…", "width": 540, "height": 960, "durationSeconds": 30,
"frames": [ { "t": 0, "url": "https://… (PNG, 1 hour)" }, { "t": 2, "url": "…" }, … ] }
// Stills from a finished video:
GET $RENDER_SERVER_URL/v1/render-jobs/{id}/frames?t=1,5,9&scale=0.5
→ 200 { "id": "…", "jobId": "…", "frames": [ { "t": 1, "url": "…" }, … ] }
// Suggested agent loop: preview → look at the frames → fix the HTML → (up to 2 retries) → POST /v1/render-jobsBuilt-in libraries and fonts
Every server has these built in, so you don't need to send them with each job. Link them with relative paths. GET /v1/capabilities returns the same list, plus sizes, frame rates and limits.
- GSAP (gsap@3.13.0): _lib/gsap/gsap.min.js — All plugins incl. SplitText, MorphSVG, DrawSVG, CustomEase, MotionPath, Flip, ScrambleText (_lib/gsap/<Plugin>.min.js)
- Lottie (lottie-web@5.12.2): _lib/lottie/lottie.min.js — Send the animation JSON as a project file
- three.js (three@0.169.0): _lib/three/three.module.min.js — ES module build; addons under _lib/three/
- anime.js (animejs@3.2.2): _lib/anime/anime.min.js
- Fonts (60 Google Fonts): <link rel="stylesheet" href="_fonts/<family>/index.css"> for regular, _fonts/<family>/700.css for bold. Families: inter, roboto, open-sans, montserrat, poppins, lato, oswald, raleway, nunito, playfair-display, merriweather, bebas-neue, anton, archivo-black, dm-sans, dm-serif-display, space-grotesk, sora, manrope, outfit, figtree, plus-jakarta-sans, work-sans, rubik, karla, barlow, barlow-condensed, fira-sans, ibm-plex-sans, ibm-plex-mono, jetbrains-mono, space-mono, source-sans-3, pt-sans, noto-sans, ubuntu, quicksand, josefin-sans, archivo, syne, urbanist, epilogue, lora, libre-baskerville, cormorant-garamond, abril-fatface, righteous, permanent-marker, pacifico, lobster, caveat, dancing-script, lexend, bangers, fredoka, comfortaa, kanit, prompt, teko, league-spartan.
- Your own brand fonts: send the .woff2 as a project file and use @font-face.
Polling (recommended)
async function waitForVideo(id: string) {
for (;;) {
const r = await fetch(`${process.env.RENDER_SERVER_URL}/v1/render-jobs/${id}`, {
headers: { Authorization: `Bearer ${process.env.RENDER_SERVER_SECRET}` },
});
if (r.status === 429) { await new Promise((s) => setTimeout(s, 30_000)); continue; }
const job = await r.json();
if (job.status === "ready") return job.downloadUrl;
if (job.status === "failed") throw new Error(job.error);
await new Promise((s) => setTimeout(s, 5_000));
}
}Media storage — use the server for storage only, rendering, or both
Every render server is also a media store. Your app can keep large video and audio (brand videos, 10+ minute YouTube videos, long podcasts, finished renders) on AutoToast instead of its own storage, and keep only a small record (id, name, size, duration, links, transcript) in its database. Files go to private object storage in Germany and are kept until you delete them. Types: mp4, mov, webm, mkv, m4v, mp3, wav, m4a, aac, ogg, flac, up to 10 GB each. Included: Starter 100 GB + 300 transcript minutes/month, Pro 500 GB + 1,500, Scale 1 TB + 5,000. Uploads over the storage allowance return 402.
// 1. Your server asks for an upload (API key never reaches the browser)
POST $RENDER_SERVER_URL/v1/uploads
Authorization: Bearer $RENDER_SERVER_SECRET
{ "workspace_id": "your-client-id", "filename": "podcast-ep12.mp3", "content_type": "audio/mpeg",
"size_bytes": 812345678, "transcribe": true, "webhook_url": "https://yourapp.com/api/media-done" }
→ 201 { "id": "<upload id>", "media_id": "<uuid>", "upload_url": "$RENDER_SERVER_URL/v1/uploads/<id>",
"upload_token": "ut_…", "chunk_size": 8388608, "total_parts": 97, "expires_at": "…(24h)" }
// 2. The browser uploads 8 MB parts with the one-upload token (CORS allowed for your site)
PUT {upload_url}/parts/{n} Authorization: Bearer <upload_token> body = raw bytes of part n (1-based)
→ 200 { "part": 3, "etag": "…" } // every part is exactly chunk_size bytes except the last
GET {upload_url} → { "received_parts": [1,2,3], "total_parts": 97, … } // resume after a drop or refresh
// 3. Finish
POST {upload_url}/complete → 202 { "media_id": "…", "status": "processing" }
// 4. Read it back
GET $RENDER_SERVER_URL/v1/media/{media_id}
→ { "id", "workspace_id", "status": "processing|ready|failed", "filename", "content_type", "size_bytes",
"duration_s", "width", "height",
"playback_url": "…(signed, 6 h, supports range requests — use in <video src>)",
"download_url": "…(signed, 1 h)", "thumbnail_url": "…",
"transcript_status": "none|pending|ready|failed|skipped",
"transcript": { "text": "…", "segments": [{ "start": 0.0, "end": 4.2, "text": "…" }] } }
GET $RENDER_SERVER_URL/v1/media?workspace_id=…&cursor=…&limit=50 → { "media": [...], "next_cursor": "…" }
DELETE $RENDER_SERVER_URL/v1/media/{media_id} → permanently deletes file, thumbnail and transcript
GET $RENDER_SERVER_URL/v1/usage?workspace_id=… → { "total_bytes_stored", "files", "minutes_transcribed_this_month", "server": {…} }
// Use stored media in a render (files up to 2 GB):
"audio": { "media_id": "…" } "project": { "files": { "assets/clip.mp4": { "media_id": "…" } } }
// Finished renders are stored as media too: the job returns "media_id".Media storage notes
- Links are signed and expire (playback 6 hours, download 1 hour). Fetch GET /v1/media/{id} again for fresh links; don't store the links, store the media_id.
- Transcripts use Whisper on your server with timestamps; language is detected automatically. Set "transcribe": false to skip. Long files take a while: roughly real-time ÷ 4 on Render Pro.
- Files are checked after upload; anything that isn't real video or audio is deleted and marked failed.
- Webhook: we POST { "type": "media.ready" | "media.failed", "data": {…media…} } signed the same way as render webhooks.
- Upload tokens work for one upload only and expire after 24 hours; unfinished uploads are cleaned up automatically.
- Browser uploads are allowed from autosocials.com and *.lovable.app sites. To allow another site, email info@autotoast.com.
Webhooks
If you pass webhookUrl we POST the job JSON when it finishes. Verify x-autotoast-signature = hex HMAC-SHA256(your API key, x-autotoast-timestamp + "." + raw body) and reject timestamps older than 5 minutes.
// Node
import { createHmac, timingSafeEqual } from "node:crypto";
const expected = createHmac("sha256", process.env.RENDER_SERVER_SECRET!).update(`${ts}.${rawBody}`).digest("hex");
const ok = timingSafeEqual(Buffer.from(expected), Buffer.from(signature));
# Python
import hmac, hashlib
expected = hmac.new(secret.encode(), f"{ts}.{raw_body}".encode(), hashlib.sha256).hexdigest()
ok = hmac.compare_digest(expected, signature)Errors
- 400 — invalid body (size, missing index.html or audio, bad URL, unknown voice). The message says what to fix.
- 402 — monthly voice limit reached (resets on the 1st), or media storage allowance full.
- 410 — upload token expired; start a new upload.
- 401 — missing, malformed, expired or revoked key, or key not allowed on this server.
- 404 — job not found on this server.
- 413 — request over 60 MB. Send audio by URL instead of base64.
- 429 — rate limit reached. Respect Retry-After (seconds) then retry.
- 502/503 — temporary problem reaching the control plane or storage. Retry with backoff; your Idempotency-Key prevents duplicates.
Limits
- Sizes: 1080x1920, 1920x1080, 1080x1080, 1080x1350, 1000x1000.
- Request 60 MB, audio 40 MB, up to 500 files, 20 minutes per render.
- Concurrent renders follow your plan (Starter 1, Pro 2, Scale 3); extra jobs queue automatically.
- Download links last 60 minutes; fetch a fresh one with GET /v1/render-jobs/{id}.
- Renders run in isolated containers with no network access.
- Frame rate 24, 30, 60 fps (default 30); Render Starter allows 60 fps for videos up to 60 seconds. Length up to 600 seconds with durationSeconds.
- Larger assets: upload them to media storage and reference { "media_id" } in project.files (up to 2 GB each) instead of base64.
Guide: Lovable (TanStack Start)
// src/lib/render.functions.ts — server function; the key never reaches the browser
import { createServerFn } from "@tanstack/react-start";
export const startRender = createServerFn({ method: "POST" })
.inputValidator((d: { html: string; audioUrl: string }) => d)
.handler(async ({ data }) => {
const r = await fetch(`${process.env.RENDER_SERVER_URL}/v1/render-jobs`, {
method: "POST",
headers: { Authorization: `Bearer ${process.env.RENDER_SERVER_SECRET}`, "Content-Type": "application/json", "Idempotency-Key": crypto.randomUUID() },
body: JSON.stringify({ width: 1080, height: 1920, project: { files: { "index.html": data.html } }, audio: { url: data.audioUrl } }),
});
if (!r.ok) throw new Error((await r.json()).error);
return r.json();
});Guide: Next.js route handler
// app/api/render/route.ts
export async function POST(req: Request) {
const body = await req.json();
const r = await fetch(`${process.env.RENDER_SERVER_URL}/v1/render-jobs`, {
method: "POST",
headers: { Authorization: `Bearer ${process.env.RENDER_SERVER_SECRET}`, "Content-Type": "application/json" },
body: JSON.stringify(body),
});
return new Response(await r.text(), { status: r.status });
}Guide: Python
import os, requests, time
H = {"Authorization": f"Bearer {os.environ['RENDER_SERVER_SECRET']}"}
URL = os.environ["RENDER_SERVER_URL"]
job = requests.post(f"{URL}/v1/render-jobs", headers=H, json={"width": 1080, "height": 1920,
"project": {"files": {"index.html": open("index.html").read()}}, "audio": {"url": "https://…/voice.mp3"}}).json()
while (j := requests.get(f"{URL}/v1/render-jobs/{job['id']}", headers=H).json())["status"] not in ("ready", "failed"):
time.sleep(5)
print(j["downloadUrl"] or j["error"])Changelog
- 2026-10-24 — v0.5.0: frame previews (POST /v1/previews, GET /v1/render-jobs/{id}/frames), durationSeconds, fps, built-in GSAP plugins/Lottie/three.js/anime.js and 60 fonts, GET /v1/capabilities.
- 2026-10-07 — v0.2.0: /v1/health, list jobs, rate limits (429 + Retry-After), key expiry, faster revocation.
- 2026-10-07 — v0.1.0: first release.
Ready to start? See Render plans or open Render → API keys. Spec: openapi.json.