A coding agent writes title.ts, checks a grid of frames, moves the .mp4 tag off the headline, checks again and renders title.mp4.
Video your coding agent can write, check and ship.
Motion graphics, image editing, type, charts, 3D and audio, written in TypeScript and rendered on the GPU straight to MP4 or PNG.
Navigate to https://framefields.dev/docs and learn how to install framefields
npx skills add gatewai-dev/framefields
255 frames at 1920×1080, rendered from film.ts in 2.6 seconds on an Apple M1 Pro with
framefields@2.1.1 from npm. Download the MP4.
What's in the package
One WebGPU engine for video production, image editing and motion graphics. Driven with TypeScript, rendered straight to pixels.
-
Type that stays sharp
Glyph outlines are solved per pixel on the GPU, so text is crisp from 10 px to 10,000 px. Perfect for kinetic video titles or high-resolution marketing stills. Animate letter by letter with After Effects-style selectors and typewriter timing.
-
3D in the same frame
A camera that lines up 1:1 with 2D pixels. Physically based materials, image-based light, shadows, bloom, ambient occlusion and skinned models from OBJ, FBX, glTF, STL, PLY and VOX.
-
Image editing & 50+ effects
Curves, levels, selective colour, 3D LUTs, halftone, film grain, mesh warp, liquify, glass, track mattes and scene transitions. Full GPU image processing for standalone photos or video frames with
Media.image.
HalftoneScreen
GradientMap
Liquify
Blur, zoom -
Vision on the device
Detection, segmentation, pose and person mattes through ONNX. Pin graphics to a tracked object, cut a subject out, or reframe 16:9 to 9:16.
-
A live preview
A local WebGPU player runs the composition itself. Scrub, step frame by frame, and pin notes on the picture for your agent to apply.
-
Sound on the same clock
Soundtrack layers placed to the frame, procedural sound effects on a beat grid, and signals from the audio that can drive any property.
-
Charts and Lottie
Line, bar, scatter, candlestick and pie charts are ordinary layers. Lottie and dotLottie files composite on the GPU with everything else.
-
Tests for motion & stills
Render a grid of frames to check easing and transitions at a glance, export pixel-perfect stills, and assert on pixels or frame-to-frame change in Vitest.
Why not record a headless browser?
How a frame is captured
framefields: Rendered straight to a GPU texture
Headless ChromiumLay out the DOM, then take a screenshot
Timing
framefields: The frame number
Headless ChromiumWall-clock timers that can drift
Text
framefields: Curves evaluated per pixel
Headless ChromiumRasterised on the CPU
Memory per worker
framefields: 200-400 MB
Headless Chromium2-4 GB
Image editing, 3D, VFX
framefields: In the package
Headless ChromiumBring your own
Longer films made with it
Each one is a folder in the repository's examples. They play on YouTube.
AI Gateway
More than 100 image, video and audio models behind one API key, billed from one prepaid balance.
Generated stills, clips and voice, straight onto the timeline
Call image, video and audio models from the same TypeScript that composes your film, without a separate SDK or account for each provider.
- One key. Seedance, H3, ElevenLabs, Nano Banana and the rest.
- Prepaid. Each generation is charged at provider cost plus a small margin.
import { ai, Layer } from "framefields";
ai.config({ apiKey: "ff_live_..." });
const { data } = await ai.subscribe("flux/schnell", {
input: { prompt: "Neon monolith rotating in mist, 35mm film" },
});
const hero = Layer.image(data.images[0].url);
-
Every model documented
Inputs, outputs and price for each endpoint, in the model catalog.
-
Queue, run or stream
subscribe()for long jobs,run()for quick calls,stream()for server-sent events. -
Readable by agents
Your agent can look up schemas and prices itself with
GET /v1/models.
Give your coding agent the skills
Video, image editing and motion graphics — driven in TypeScript and rendered natively on the GPU.
Navigate to https://framefields.dev/docs and learn how to install framefields
npx skills add gatewai-dev/framefields



