Turn any website URL into a studio-quality video — programmatically. One POST creates and renders the video; poll one endpoint for the result. Perfect for automations, bulk generation, and video Open Graph previews.
Create an API key in your account, then send it as a Bearer token. Keep it secret — it spends your credits.
httpAuthorization: Bearer cp_live_xxxxxxxxxxxxxxxx
Base URL: https://pagetovid.com · 1 credit = 1 rendered video.
POST /api/v1/videos — returns immediately with an id; rendering runs async.
curlcurl -X POST https://pagetovid.com/api/v1/videos \ -H "Authorization: Bearer $PAGETOVID_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://stripe.com", "goal": "ad", // explainer | ad | demo | tutorial "aspect": "16:9", // 16:9 | 9:16 | 1:1 "language": "en", "targetSeconds": 35, "subtitles": true }'
Response (202):
json{ "id": "cmq…", "status": "analyzing", "statusUrl": "https://pagetovid.com/api/v1/videos/cmq…" }
GET /api/v1/videos/:id — poll until status: "done".
json{ "id": "cmq…", "status": "done", // analyzing | scripting | recording | voicing | rendering | done | error "progress": 100, "videoUrl": "https://pagetovid.com/media/cmq…/video.mp4", "posterUrl": "https://pagetovid.com/media/cmq…/scene-2.png", "subtitleUrl": "https://pagetovid.com/media/cmq…/subtitles.vtt", "durationMs": 41000, "width": 1920, "height": 1080, "og": { "og:video": "…", "og:image": "…", "og:video:type": "video/mp4", … } }
A finished video doubles as a rich og:video preview — so links to your page unfurl as a playable video on social and search. The status response hands you the exact tags in og. Drop them in your page's <head>:
html<meta property="og:image" content="POSTER_URL" /> <meta property="og:video" content="VIDEO_URL" /> <meta property="og:video:secure_url" content="VIDEO_URL" /> <meta property="og:video:type" content="video/mp4" /> <meta property="og:video:width" content="1920" /> <meta property="og:video:height" content="1080" /> <meta name="twitter:card" content="player" />
Generate + wait, in any language.
javascriptconst KEY = process.env.PAGETOVID_API_KEY; const create = await fetch("https://pagetovid.com/api/v1/videos", { method: "POST", headers: { Authorization: `Bearer ${KEY}`, "Content-Type": "application/json" }, body: JSON.stringify({ url: "https://your-site.com", goal: "ad" }), }).then((r) => r.json()); let v; do { await new Promise((r) => setTimeout(r, 5000)); v = await fetch(create.statusUrl, { headers: { Authorization: `Bearer ${KEY}` } }).then((r) => r.json()); } while (v.status !== "done" && v.status !== "error"); console.log(v.videoUrl, v.posterUrl, v.og);
pythonimport os, time, requests KEY = os.environ["PAGETOVID_API_KEY"] H = {"Authorization": f"Bearer {KEY}"} r = requests.post("https://pagetovid.com/api/v1/videos", headers=H, json={"url": "https://your-site.com", "goal": "ad"}).json() while True: time.sleep(5) v = requests.get(r["statusUrl"], headers=H).json() if v["status"] in ("done", "error"): break print(v["videoUrl"], v["posterUrl"], v["og"])
401 — invalid or missing API key.402 — out of credits. Top up on pricing.400 — invalid input (a url is required).Free credits to start — generate your first video by API in minutes.
Create an API key →