open_editor
Open a sprite in the SpriteForge editor
Opens pixel art in SpriteForge's compact pixel editor - pencil, eraser, fill, colour picker, palette, undo and animation frames - as an interactive card where the app shows them, and returns an edit link (the same editor in a browser) and a session_id. No account needed. One source at most: png_base64 (an existing PNG), art (palette + index grid), or neither for a blank width x height canvas. Max 128x128 pixels and 256 colours. The user's edits save to the edit session automatically.
Parametersartnamewidthheightpalettepng_base64
get_sprite
Get a sprite from a SpriteForge edit session
Returns the current state of a SpriteForge edit session: a preview image, its size and palette, how many edits were saved, and a PNG URL with the exact pixels at 1x (add &frame=N for another frame). With include_pixels it also returns the palette-index grid. Read-only.
Parameterssession_idrequiredinclude_pixels
open_full_editor
Open the full SpriteForge editor
Opens a sprite in SpriteForge's full pixel editor - layers, selection and move, line/rectangle/ellipse, mirror painting, brush sizes, animation frames with onion skin and playback, palette tools - as an interactive card where the app shows them, and returns an edit link that opens the same editor in a browser. One source at most: session_id (an edit session that's already open, or an edit link), png_base64 (an existing PNG), art (palette + index grid), or none for a blank width x height canvas. Max 128x128 pixels and 256 colours. The user's edits save to the edit session.
Parametersartnamewidthheightpalettepng_base64session_id
open_tileset_editor
Open the SpriteForge tileset editor
Opens a tileset in SpriteForge's tileset editor as an interactive card where the app shows them, and returns an edit link that opens the same editor in a browser. For a Wang autotile set (16 tiles; tile i is drawn where the map cells at its corners are painted, NW=1 NE=2 SW=4 SE=8, so tile 15 is the solid base) the user paints a small map to see the tiles chain, draws on the map or on single tiles, and edits the base texture, which re-derives the edge tiles (tiles drawn by hand stay); a platformer set (49 tiles) is edited tile by tile. With session_id it opens a tileset that's already in an edit session, and kind (wang = flat floor terrain, wall, iso) switches that Wang set's preview, keeping its tiles and the user's edits. Otherwise it makes a new set from kind (wang, wall, iso or platformer; default wang) plus palette + tiles (16 or 49 grids in mask order), palette + base (a seamless square texture; the 16 Wang tiles are derived from it as SpriteForge does), png_base64 (a tileset sheet or a texture), or size alone for a blank set. With png_base64 and no layout, a 16x1 image is a strip, and a square one is a 4x4 sheet when its tiles look like a Wang set in mask order (tile 0 empty, or nearly every tile's corners matching tile 15 where its mask has that corner and tile 0 where it doesn't), else a texture. The result says which view it opened and how it read the PNG. The user's edits save to the edit session.
Parametersbasekindnamesizetileslayoutpalettepng_base64session_id
load_art
Load an edit session into the editor card
Loads an edit session's sprite into the SpriteForge editor card. Only the card calls it.
Parameterssession_idrequired
save_art
Save the editor card's sprite
Saves the user's edits from the SpriteForge editor card to its edit session. Only the card calls it.
Parametersartrequiredsession_idrequired