Skip to main content
A motion graphic here is a web page that can draw any moment you ask for. You (or your agent) write a scene in HTML, CSS and JavaScript with one function, window.render(t), that draws time t. VidJutsu opens the page on cloud machines, calls render(t) for every frame, and joins the frames into a video in your library. Then you place that video on a timeline like any other clip. Nothing is generated: the picture is exactly what your page draws. Any web library that can draw a moment on request works, including GSAP, HyperFrames, Three.js and Lottie.

How it works

  1. Send the files. POST /graphics/files lists every file of your scenes by hash. Small text files go inline; anything else gets an upload link. Files you sent before are never sent again.
  2. Render. POST /graphics with a film: the frame size, frame rate, finishing effects and the scenes in order. It answers with a job right away.
  3. Wait. Poll GET /graphics/{job_id} until state is succeeded. output.media is the new video, output.watch_url plays it in a browser.
  4. Place it. Add output.media to a project with an add_media edit and put it on a track with insert_clip. Nothing is placed for you.
A scene that didn’t change since an earlier job is reused, not drawn again, so change one title card and only that card is drawn.

The scene contract

A scene is a folder with an entry page (default index.html). The page must define a global function, window.render(t) by default, where t is seconds from the scene’s start. It can return a promise; the frame is taken once it settles. render(t) must draw time t from t alone:
  • Same t, same picture. Frames are drawn in pieces on many machines and in any order, so render(t) can’t depend on the frame drawn before it. Set every animated property from t on every call, and keep no state between frames.
  • No network. The page can load its own files and nothing else. Ship libraries, images and fonts in the scene folder; links to a CDN or any other site fail.
  • Clocks are frozen to t. Date, performance.now() and requestAnimationFrame callbacks all see time t (callbacks run once a frame, after render(t)), and Math.random() is seeded, so it returns the same numbers on every machine. CSS animations and transitions don’t follow t: drive motion from render(t) instead.
To check repeatability, each machine draws the first frame of its piece again after its last one. If the two differ, the job stops with the scene is not repeatable and names the time, because two pieces that disagree would flicker where they meet. The usual causes: a value that adds to itself each frame (x += 2), a CSS animation or transition, or an image that hasn’t loaded when the frame is taken (make render(t) async and wait for it). A subtler one: once an element is fully in, set the property to its plain resting value, such as clip-path: none rather than an inset of 0%. Some effects at their end value draw their edge a shade differently depending on the frame before.

Starter scene: a title card and a lower third

Two scenes, played one after the other. Copy the folder, change the words at the top of each page, and render it.
film.json
title/index.html
lower-third/index.html
Make one scene per title card or segment. A change to one card then draws only that card again, and every other scene comes from the cache.

The film

Each scene:

Effects

Effects run on every frame after it is drawn. Pick them by name:

Libraries

Put the library’s file in the scene folder and load it with a relative path. A frozen window.vidjutsu helper is defined before your scripts run; each adapter sets render(t) for you. GSAP (and HyperFrames):
Keep everything on the one timeline you pass in. A tween started outside it (or with repeat: -1 on its own) doesn’t follow t. Three.js:
Set positions from t (t * 0.9), never by adding to them each frame (rotation.y += 0.01). Physics or particles that step forward need to be stepped from zero up to t on every call, or baked ahead of time. Lottie:
Pass the animation as animationData from a script file rather than path: a path loads after the page does, so the first frames can be drawn before the animation is there, and the job stops as not repeatable.

Fonts

Inter, Inter Display, DejaVu Sans and Sans Mono, Liberation (as Arial), JetBrains Mono, Satoshi and Noto Color Emoji are installed. Any other font goes in the scene folder and loads with @font-face:
Wait for it before the first frame, so frame 0 isn’t drawn in a fallback font. render(t) can be async: await document.fonts.ready at the top works.

Footage in a scene

To draw over a take, put the video in the scene folder and let the scene turn it into numbered stills before drawing:
The page then shows still n = floor(t * 30) + 1 at time t (the starter lower third does this when FOOTAGE_FPS is set). frames must be a subfolder with no other scene files. Up to 8 extracts a scene; start_number (default 1) and jpeg_q (2 best to 31, default 2) are optional.

Run it

The answer is a bundle id and missing: a put_url for each file that isn’t stored yet and wasn’t sent inline (images, fonts, footage, large scripts). PUT each file’s bytes to its link. Then render:
The CLI does all of this from a folder with a film.json: vidjutsu graphics render ./starter. MCP: graphics_files, make_graphics, graphics_status and cancel_graphics.

Place it on a timeline

output.media is ready for an add_media edit (give it any id you like in the project). Graphics videos are opaque and silent, so put full-frame cards where they should cover the picture: on the main track between takes, or on a track above it for the stretch they play.
With ripple, the takes after it move later so sound stays in sync. A lower third over a take can go two ways:
  • Draw the take in the scene (footage in a scene), and place the result on a track above the take for the same stretch. Exact, and the panel can be any shape.
  • Render just the panel: make the film the panel’s size (say 720 x 200) and length, and place it in a layout box above the take. Cheaper, but the panel is a rectangle: rounded corners show the page’s background.

Edit scenes in a workspace

A workspace is a named folder of scene files with versions, so an agent can change scenes like code instead of resending them:
  • GET /graphics/workspaces/{workspace} (graphics_list): the current bundle, its version, every file, and earlier bundles.
  • GET /graphics/workspaces/{workspace}/file?path=title/index.html (graphics_read): one file’s text.
  • POST /graphics/workspaces/{workspace} (graphics_write): one new version made of write (whole text files), patch ({path, find, replace}, where find must occur exactly once), files (other files by hash; missing ones get a PUT link), delete, or restore (an earlier bundle). Send expected_bundle from your last read: if someone changed the workspace since, it answers 409 and nothing changes.
Then render with "workspace": "episode-4" in place of bundle. The job is pinned to the workspace’s bundle at that moment, so later writes don’t change a running job. To change scenes from an earlier job that didn’t use a workspace, GET /graphics/bundles/{bundle} (graphics_source) gives every file of the bundle in output.source. Files in a workspace are stored, never run: the only thing that runs them is the renderer, inside a job.

Upright video

For Shorts, Reels and TikTok, render at 1080 x 1920. Keep text out of the zones each app covers with its own buttons and captions: the top 328 pixels, the bottom 672 and 120 at each side.

Speed and cost

Graphics are billed by the box time they use, at $0.03 per vCPU-minute by the second, like a render ([pricing](/pricing)). A 1080p, 30 fps film takes about 16 vCPU-seconds per second of film for each subframe, about $0.48 a minute, plus about 120 vCPU-seconds to start; a re-render after a one-scene change costs far less. There is no price up front. While a job runs, your wallet holds a small amount at a time and gives back what the job didn’t use. usage.vcpu_seconds on the job is what you paid for. Almost all of that time is the browser painting your page on the CPU (there is no GPU), so a lighter page is a cheaper one:
  • Large CSS filter: blur() and backdrop-filter layers are the slowest thing to draw. Use a pre-blurred image instead.
  • subframes multiplies the work: use 2 for fast motion, 1 for slow fades and text.
  • Big WebGL scenes draw on the CPU too: keep polygon counts and resolution in check.
  • Scenes that didn’t change are free to reuse, so split long films into scenes.

Limits

Security

Your scenes are code, and they run only inside the renderer, never anywhere else. Each job gets fresh machines that are thrown away afterwards. They hold no keys (only short-lived links to your files) and can reach nothing but storage. The browser runs with its sandbox on, as a user that can read nothing of the job, and every request a page makes outside its own folder is refused. There is no tool or route that runs your code any other way.