Let your agent make the video

Copy these instructions into your coding agent. It asks what you want, 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. It will ask for your source and settings, then use the editor to make and save your video.

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

  1. Your agent asks for a public website URL or local screenshot, appearance, motion, video format, and output folder.
  2. It opens Open in Fold in a browser on your machine. It can use headless Chromium if WebGL and video encoding work there.
  3. It loads your source and applies settings through window.openinfold. The same renderer powers the interactive editor.
  4. It starts an export, catches the browser download, and saves the file locally before closing the browser.

Your computer renders and encodes the video. Cloudflare hosts the app and takes website screenshots only. There is no server video queue, saved video gallery, API key, or video upload. An agent using a local screenshot does not need to call the capture endpoint.

Browser API

Wait until window.openinfold exists. Then call these methods inside the editor page, for example with Playwright's page.evaluate().

schema()
Returns defaults, valid settings, numeric bounds, and available background IDs. Settings cover all the editor's appearance, motion, framing, and export controls.
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 mp4 or webm.
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. Resolves with the filename, byte count, and MIME type. It skips the social dialog. The agent must save the download before closing its browser context.
await page.waitForFunction(() => Boolean(window.openinfold));
await page.evaluate(() => openinfold.configure({
  ratio: "portrait", resolution: 1440, fps: 30,
  format: "webm", duration: 6,
  foldZoom: true, zoomAmount: 10
}));

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 output folder, and a Chromium installation with WebGL and WebCodecs. Headless environments vary. If a codec is unavailable, ask before switching format; 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. Read the retry time and offer a local screenshot rather than looping requests. 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 asks for your choices before rendering and does not post to social media.