**FFmpeg for agents:** a video editor you drive from the command line, with a generative-AI and vision toolchain built in.
Diffusion Studio is a canvas-based video editor. What makes it different is `dapi`, its CLI: every part of the editor (projects, the scene graph, the asset library, AI generation, rendering) is scriptable over a local socket, with JSON on stdout and deterministic exit codes. A human uses the canvas; an agent uses `dapi`. Both edit the same document.
```sh
dapi open # use -b to run the editor headless
dapi mount hero.tsx # render a composition into it
Compositions are [SolidJS](https://www.solidjs.com) modules. `dapi mount` compiles them and renders each element into an editable node in the document; re-mounting rebuilds in place, like reloading a webpage. Solid's control flow (`<For>`, `<Show>`, …) and any npm package are available to compose the tree, and generative assets are declared as values and produced on mount:
Conventions throughout: single results are one JSON value, collections are JSON Lines, errors go to stderr with exit code `1`. Everything is built to be piped, grepped, and driven by a program.
## Documentation
- [Getting started](docs/getting-started.md): install the CLI, open a project, first mount, first export
- [CLI reference](docs/cli.md): every command, its options, and its output
- [Writing compositions](docs/composition.md): the JSX API with elements, timing, paints, generative assets, and captions
- [Working with media](docs/assets.md): the asset library and the vision/audio toolchain