Motion To Code API

Turn a prompt, image or reference video into a looping GLSL shader

motion-to-code/glsl
UtilitiesPredictions

About this model

Motion To Code produces a seamlessly looping GLSL shader from a prompt, an image or a reference video. From a prompt or image it first makes a reference animation, then studies it, writes shader code, renders it and refines it over several rounds.

The result includes the Shadertoy-style code, a standalone WebGL2 player page and an MP4 render. Choose it when you want code you can embed rather than a video file alone.

A request is limited to 15 seconds of duration and 45 units of output.

Use cases

  • Create looping shader backgrounds for websites
  • Convert a motion reference into reusable code
  • Prototype generative visuals for real-time graphics

Input and output

Input
Text prompt, optionally an image, video or audio
Output
GLSL code, a web page that plays it, and an MP4 render

Developer

GLSL utility (OpenGL Shading Language, Khronos Group)

Official site of GLSL utility (OpenGL Shading Language, Khronos Group)
Developer
Utilities
Type
Predictions

Motion To Code request example

This model type has a request format of its own; see the API documentation for details.