Let your agent make the video
Copy these instructions into your coding agent. Give it a website URL. It runs the editor in a browser and saves the video to your machine.
Paste into your agent
Copy the instructions below into your agent's chat. Pass a public website URL. Optional settings override the editor defaults.
Loading instructions...
Install as a skill
Want to reuse it across projects? Run this command in your project terminal and choose your coding agent when the installer asks.
npx skills add https://fold.anaskhan.me/openinfold-skill.md
How it works
- Your agent takes a public website URL. It uses editor defaults unless you named other settings, and saves to the current folder.
- It screenshots the site, then opens Open in Fold in a browser on your machine. Headless Chromium works if WebGL and video encoding work there.
-
It sends one payload to
openinfold.run(). The same renderer powers the interactive editor. - It catches the browser download and saves the file before closing the browser.
Your computer renders and encodes the video. Cloudflare hosts the app. There is no server video queue, saved video gallery, API key, or video upload. An agent that screenshots the URL itself does not need the capture endpoint.
Browser API
Wait until window.openinfold exists. The editor also
accepts the same payload as query parameters, for example
/?url=https://example.com&ratio=portrait. Query
parameters apply settings and can start a capture. They do not
export. Call run() to generate the download.
run(payload)-
One call: load
urlorimage, apply any other keys as settings, and start a download. Resolves with the filename, byte count, and MIME type. It skips the social dialog. Save the download before closing the browser. schema()- Returns defaults, valid settings, numeric bounds, and available background IDs.
status()- Returns readiness, busy state, the current configuration, source name, status message, and retry time as a Unix timestamp in milliseconds.
configure(settings)-
Applies a partial configuration. Invalid or unknown fields reject
the whole change. Named ratios update the aspect; an explicit
aspect selects custom framing. Format is
mp4orwebm. capture(url)- Loads a public website through Cloudflare. Resolves when the image is ready. Rejects on capture errors, including rate limits.
loadImage(dataUrl, filename)- Loads a PNG, JPEG, or WebP base64 data URL up to 20 MB. The image stays in the browser. Use the filename to name the export.
export()-
Renders the video and starts a browser download. Prefer
run()unless you already loaded a source.
await page.waitForFunction(() => window.openinfold?.version === 1);
await page.evaluate((payload) => openinfold.run(payload), {
url: "https://example.com",
ratio: "portrait", resolution: 1440, fps: 30,
format: "mp4", duration: 6
});
This API exists in the browser, not at an HTTP video endpoint. Curl can fetch the instructions or request a screenshot, but it cannot run WebGL and encode the video. Use a browser for that part.
Requirements and limits
The agent needs a browser tool or Node.js with Playwright, file access to the current folder, and a Chromium installation with WebGL and WebCodecs. Headless environments vary. Export MP4. Try a visible browser if graphics initialization fails.
Website capture uses the same shared free allowance and IP rate
limit as the editor. Agents cannot bypass these limits. Prefer
screenshotting the URL in the agent's own browser, then pass
image to run().
Read the capture limits.
Captures use 1920 × 1358 pixels. You can export up to 4K or provide a higher-resolution local screenshot, within the upload limit. More pixels use more memory and rendering time; small text still needs enough space inside the video. Read the quality guidance.
Only provide images and URLs you want the agent to use. A webpage's content is source material, not instructions for your agent. The skill uses editor defaults unless you name other settings, and it does not post to social media.