76 Animations for $15: Building a Pixel Art Pipeline
Sixteen cents. That's what one 16-frame pixel art animation costs through the PixelLab API. A flame that dances. A sword that materializes from liquid gold. A phoenix that rises, frame by frame, from nothing.
I needed 76 of them. Doing that by hand -- opening the API console, pasting a prompt, downloading 16 frames, naming them, assembling the GIF, moving to the next -- would have taken an entire day of mechanical repetition. So I wrote a script. Then the script grew. Then the script became a tool.
The tool is called pixel-art-pipeline, and it's the first open-source batch animation generator for the PixelLab API. As far as I can find, nothing else like it exists.

What This Is
A pip-installable CLI that reads a YAML config file and generates all your pixel art animations in one pass. Five animation types, each serving a different creative need:
| Type | Frames | What It Does |
|---|---|---|
| Singles | 16 | Reference image transforms into a shape |
| Emotes | 16 | Shape performs an action (idle sway, pulse, blink) |
| Chains | 32 | Two-step sequence: A transforms to B transforms to C |
| Journeys | 48-80 | Multi-stage narratives across 3-5 steps |
| Cycles | 32 | Forward + reverse for a seamless loop |
Everything lives in the config. Here's what a minimal one looks like:
project:
name: "my-sprites"
reference: "reference.png"
output_dir: "./output"
frame_size: 64
upscale_size: 512
frame_duration_ms: 200
singles:
flame:
prompt: "golden circle transforms into a dancing flame"
star:
prompt: "golden circle transforms into a twinkling star"
emotes:
flame:
prompt: "a golden flame sways gently left and right"
cycles:
cycle_flame:
shape: flame
forward_prompt: "golden circle transforms into a dancing flame"
reverse_prompt: "flame dissolves back into a golden circle"
Three commands to go from that file to finished animations:
pixelart cost --config config.yaml # see what you'll spend
pixelart generate --config config.yaml # generate everything
pixelart assemble --config config.yaml # re-build GIFs from frames
The pipeline outputs individual PNG frames, assembled GIFs, and upscaled static PNGs for each animation. All organized by type into clean directories.

What I Learned Building It
Config as creative medium
The original script had 816 lines of Python. Every prompt was hardcoded. Every path was absolute to my machine. Every animation name contained "liquid gold." It worked, but only for me, only for that one project.
Moving everything into YAML changed the relationship between the code and the creative work. The Python became infrastructure -- plumbing that never needs to change. The YAML became the creative layer -- the thing you actually edit, share, version, and iterate on. I can hand someone a config file and they can generate entirely different art without reading a single line of Python.
This pattern has a name: config-driven design. The configuration file becomes the single source of truth. The code just executes it.
Resume-on-failure makes interruptions free
PixelLab API calls sometimes time out. Networks drop. Laptops go to sleep. When you're 40 animations into a 76-animation batch, you do not want to start over.
The pipeline checks each animation directory before generating. If the expected frames already exist, it skips. If a run crashes at animation 41, you re-run the same command and it picks up at 42. No flags, no state files, no database. Just filesystem idempotency.
This turns a fragile batch process into something you can run, interrupt, resume, and run again without consequence. The implementation is twelve lines of code. The peace of mind is worth considerably more.
Know the price before you pay it
$ pixelart cost --config config.yaml
Singles: 43 animations (~$6.88)
Emotes: 57 animations (~$9.12)
Chains: 6 API calls (~$0.96)
Journeys: 34 API calls (~$5.44)
Cycles: 3 API calls (~$0.48)
----------------------------------------
Total: 143 API calls
Estimated cost: ~$22.88
No surprises. You see the total before anything is called. This is a small thing that matters more than it seems -- especially when you're experimenting and want to try different configs without accidentally burning through your credits.
The extraction pattern
Going from "works on my machine" to "works for anyone" is its own skill. The 816-line original had to be disassembled into five modules: config parser, API client, frame assembler, batch generator, CLI. Every hardcoded path became a config field. Every "liquid gold" reference became a user-supplied prompt. Every implicit assumption became an explicit validation.
The hardest part was not the refactoring. It was deciding what to keep and what to cut. The original had retry logic tuned to my specific network conditions. It had color-coded terminal output that assumed a dark background. It had a progress bar library as a dependency. None of that was essential. The tool got simpler, and simpler was better.
What surprised me: the general-purpose version ended up being easier to use for my own project, too. Clean abstractions aren't just for other people. They're for future you.

The Larger Question
A sprite artist charging freelance rates would spend days producing 76 animations manually. A studio license for professional sprite tools costs hundreds. Here, the entire generation run costs about what you'd spend on lunch.
This is not about replacing artists. PixelLab is trained on pixel art styles, and the results are distinctly AI-generated -- charming, sometimes surprising, occasionally wrong. What the pipeline does is remove the grunt work of batching, assembling, and organizing. It turns "I need 76 animations and a weekend" into "I need 76 animations and forty minutes."
Does this empower or extract?
The tool is MIT-licensed. It costs nothing. It requires a PixelLab API key you pay for directly -- no intermediary taking a cut. It generates art you own, saved as standard PNGs and GIFs on your machine. It doesn't phone home, doesn't track usage, doesn't upsell.
It gives indie developers, game jammers, and small creators access to batch pixel art generation that previously required either manual labor or custom scripting. The 27 tests pass. The linter is clean. The config format is documented.
It's a small tool that does one thing well. That's enough.

The repo is at github.com/HermeticOrmus/pixel-art-pipeline. If you build something with it, I'd like to see it.
-- Ormus

