aispritemaker is a command-line tool for the REST API. One command creates a job, waits for it, and writes the sheet into your project, with frame data your engine can read. It’s handy in build scripts, for batch-generating a cast of characters, and for converting sheets you already have into Godot SpriteFrames. Node 18 or newer, no dependencies.
Not on npm yet
The CLI is built and tested, but the aispritemaker package hasn’t been published to npm. Until it is, npx aispritemaker won’t find it. We’ll announce the release in the changelog, and every command on this page will work as written from then on.
In the meantime, the Claude Code plugin download contains a zero-dependency helper, skills/aispritemaker/scripts/asm.mjs, that covers the core flow from a terminal: motions, balance, generate, job and wait. See Using the helper script today.
Quick start
npx aispritemaker login
npx aispritemaker generate "a knight with a blue cape" --motion walk --directions 4 --size 64 --out ./sprites
That writes a-knight-with-a-blue-cape_walk.png and .json to ./sprites. A 4-direction walk costs 4 × 10 credits.
To keep it installed instead of using npx:
npm install -g aispritemaker
Authentication
Every plan includes API access. Create a key at Dashboard → API keys. The CLI looks for a key in this order:
--api-key asm_live_...on the command line;- the
ASM_API_KEYenvironment variable; ~/.config/aispritemaker/config.json, written byloginwith file mode 0600 ($XDG_CONFIG_HOMEis respected).
npx aispritemaker login # paste the key (hidden); it's checked against /api/v1/me
echo "$ASM_API_KEY" | npx aispritemaker login # non-interactive, e.g. in CI
npx aispritemaker logout
Commands
| Command | What it does |
|---|---|
generate "<prompt>" [options] | Create a job, wait for it, download the files |
motions [--category movement] | List library motions (no key needed) |
balance | Plan, credits and concurrency (aliases me, whoami) |
jobs [--limit 20] [--cursor c] | Recent jobs |
job <id> | One job’s status and outputs |
wait <id> [--out dir] | Wait for an existing job and download it, e.g. after --no-wait |
cancel <id> | Cancel a queued or running job |
convert <sheet.json|sheet.png> --to godot|json | Turn a local sheet into Godot SpriteFrames or normalized sheet JSON |
mcp [--client claude|cursor|codex|vscode|all] | Print MCP server config for coding agents |
Every command accepts --json (machine-readable output on stdout and nothing else), --quiet, --api-key and --base-url.
generate
# still sprite, 4 variations
npx aispritemaker generate "health potion, round flask, red liquid" --size 32 --style 8-bit --count 4
# library animation in 4 directions, plus a Godot .tres
npx aispritemaker generate "fox knight" --motion walk --directions 4 --view topdown --format png,json,godot --out ./game/sprites
# reuse a character from an earlier job, or start from a reference image
npx aispritemaker generate "fox knight" --motion attack-slash --character as_01JC...
npx aispritemaker generate "same character, holding a torch" --reference ./hero.png
# 8-direction turnaround and a tileset
npx aispritemaker generate "wizard in purple robes" --type directions --directions 8
npx aispritemaker generate "mossy dungeon floor" --type tileset --size 32
| Option | Meaning |
|---|---|
-t, --type | sprite (default), animation (default when --motion is set), directions, tileset, edit, custom_motion, video_to_sprite |
-m, --motion | Motion id from motions |
-s, --style | 16-bit, 8-bit, gba, snes, game-boy, hd-pixel, chibi, isometric, 1-bit, pico-8 (aliases like 16bit and nes also work) |
--size | Frame size: 32, 48, 64, 96, 128, 256, 512 (capped by plan) |
--palette | Maximum colours |
--view | side, topdown, isometric |
-d, --directions | 1, 4 or 8 |
--count | 1 or 4 variations (still sprites) |
-r, --reference | Reference image file (uploaded for you) |
--character | Asset id of a character from an earlier job |
--motion-prompt | For custom_motion |
--video | For video_to_sprite |
-o, --out | Output folder (default ./sprites) |
-n, --name | File name stem (default: the prompt, slugified) |
-f, --format | png,json,godot,gif,zip or all (default png,json) |
--no-wait | Print the job id and exit; fetch it later with wait <id> |
--timeout | Seconds to wait (default 900) |
Files it writes
For generate "fox knight" --motion walk:
fox-knight_walk.png: the sheet. One row per direction, one column per frame, transparent background.fox-knight_walk.json: Aseprite-compatible JSON:frames[]with rectangles andduration,meta.frameTagswith one tag per animation (walk_down,walk_left, …), andmeta.aispritemakerwith the job id, fps, frame size and directions. Phaser loads it withthis.load.aseprite, Aseprite reads it, and our Godot addon and Unity package convert it.fox-knight_walk.tres(with--format godot): a Godot 4SpriteFrames. If--outis inside a Godot project (there’s aproject.godotabove it), the texture path is the correctres://path.
If you press Ctrl+C while waiting, the job keeps running on our side. Resume with aispritemaker wait <id>.
convert
Convert sheets you already have, with no API key and no credits:
npx aispritemaker convert sprites/hero.json --to godot # PNG + JSON -> hero.tres
npx aispritemaker convert sprites/coin.png --frame-size 16 --fps 8 # plain PNG grid -> coin.tres
npx aispritemaker convert sheet.json --to json # normalize any sheet JSON
It reads our exports, Aseprite JSON (array or hash; frame tags with forward, reverse and pingpong) and TexturePacker JSON (hash or array, with an animations map).
mcp
Prints ready-to-paste MCP config for Claude Code, Cursor, Codex, VS Code and stdio-only clients:
npx aispritemaker mcp --client claude
# claude mcp add --transport http aispritemaker https://aispritemaker.com/mcp --header "Authorization: Bearer $ASM_API_KEY"
Full setup per client is in the MCP docs.
Scripting and CI
With --json, output is a single JSON document on stdout, and errors print { "error": { "code", "message" } }. Exit codes:
| Code | Meaning |
|---|---|
0 | OK |
1 | Error |
2 | Usage error |
3 | Missing or invalid API key |
4 | Not enough credits |
5 | Job failed or was cancelled |
Example: regenerate a set of enemies in a build step and fail the build if anything goes wrong:
set -e
for enemy in "green slime" "skeleton warrior" "cave bat"; do
npx aispritemaker generate "$enemy" --motion idle --size 32 --format png,json,godot --out ./game/enemies --json > /dev/null
done
The package can also be used as a library:
import { Client } from "aispritemaker";
const api = new Client({ baseUrl: "https://aispritemaker.com", apiKey: process.env.ASM_API_KEY });
const { id } = await api.createJob({ type: "animation", prompt: "slime", motion_id: "idle" });
const job = await api.waitForJob(id);
Using the helper script today
Until the npm release, the helper in the Claude Code plugin zip gives you the same generate-and-save flow. Unzip it, then:
export ASM_API_KEY="asm_live_…"
H=aispritemaker/skills/aispritemaker/scripts/asm.mjs
node $H motions
node $H balance
node $H generate --prompt "green slime" --type animation --motion idle --size 32 --directions 1 --out ./sprites --name slime
node $H job <id>
node $H wait <id> --out ./sprites --name slime
It prints JSON and writes <name>.png plus <name>.json (Aseprite-style frames and one tag per direction), the same files generate writes by default. It doesn’t do convert or Godot .tres output; the Godot addon converts the JSON for you.