SpriteSheetGen

v0.3.0
io.github.terror668/spritesheetgen Checked 4 days ago Published 13 days ago

AI sprite sheets for 2D games: generate a character, animate it, export PNG, JSON and Godot files.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

estimate_sprite Estimate a character or an action

Free. Validates a request and returns its price in credits, the balance and the key's remaining budget. Call before any paid tool and show the price to the user.

ParameterTypeDescription
operation *string
actionstringFor operation=action.
descriptionstringFor operation=character: the character, e.g. 'a small knight with a red cape'.
notesstringFor operation=action: optional motion notes.
referencestringFor operation=action: the character's reference (generation:… or media:…).

create_character Create a character image (paid)

Spends credits. Starts one character image from a description and returns its generation right away (usually PENDING); poll get_generation. Only after the user approved the estimated price.

ParameterTypeDescription
client_key *stringIdempotency key for THIS purchase, 8-64 of A-Z a-z 0-9 _ -. Make a new one per intended purchase; reuse the SAME one when retrying after an error or timeout, so it is never charged twice.
description *string
max_credits *integerMost credits the user approved for this call (from estimate_sprite). The call is refused if the price is higher.

animate_character Animate a character (paid)

Spends credits. Starts one animation (one action) of a character, generated or uploaded, and returns its generation right away; poll get_generation. One action per call; only after the user approved the estimated price.

ParameterTypeDescription
action *string
client_key *stringIdempotency key for THIS purchase, 8-64 of A-Z a-z 0-9 _ -. Make a new one per intended purchase; reuse the SAME one when retrying after an error or timeout, so it is never charged twice.
max_credits *integerMost credits the user approved for this call (from estimate_sprite). The call is refused if the price is higher.
reference *stringThe character: generation:<id> of a SUCCEEDED character image, or media:<id> of an upload.
notesstring

get_generation Check a generation

Free. The generation's status, images or animation, credits charged and whether a failure was refunded. With wait_seconds (at most 120) it waits until it is done or the time is up; then call again.

ParameterTypeDescription
id *string
wait_secondsinteger

list_characters List the user's characters

Free. Characters the user generated or uploaded (one source per call), newest first, each with the reference animate_character takes.

ParameterTypeDescription
source *string
cursorstringnext_cursor from the previous page.
limitinteger

list_actions List a character's animations

Free. All GIF and web video animations from one character reference, newest first. Check here before paying for an action the character may already have. kind distinguishes image/video; cli_exportable is true for GIF. Videos cannot be packed by this CLI: download the MP4 or use the website.

ParameterTypeDescription
reference *string
cursorstringnext_cursor from the previous page.
limitinteger

improve_prompt Improve a character description

No credits (a small free daily quota shared with the website). Turns a rough idea into a description that generates well; returns the reply and, when ready, a prompt to use with create_character.

ParameterTypeDescription
text *stringThe idea or the user's answer.
historyarrayEarlier turns of this conversation, oldest first.
langstringLanguage of the reply; default en.

upload_character Upload the user's own character image

Free. Uploads a local PNG, JPEG or WebP (under 10 MB, one whole character on a plain background, made by the user or licensed to them) and returns its media reference for animate_character.

ParameterTypeDescription
file_path *stringPath to the image on this machine.

export_sprite_sheet Export a sprite sheet into a folder

No credits. Downloads a SUCCEEDED animation (or reads a local GIF) and packs it on this machine: sheet.png, sheet.json (TexturePacker, for Phaser and others), a Godot SpriteFrames .tres, and optionally single frames and a preview GIF. Never generates again. output_dir must not exist yet: it is created, and an existing folder is refused, so nothing of the user's is ever overwritten.

ParameterTypeDescription
output_dir *stringA new folder, e.g. assets/sprites/knight_walk; it must not exist yet.
backgroundstringBackground removal; auto by default.
columnsinteger
filestringOr a local GIF to pack (no key needed).
fpsinteger
framesintegerFrames to keep (default: the action's own).
idstringThe animation's generation id.
individual_framesboolean
namestringName of the animation and its frames (knight_walk -> knight_walk_00, …); the files keep their fixed names.
pixel_heightintegerPixelate to this height (pixel art).
previewboolean