GUIDES API OPEN APP

SpriteLab MCP

Every SpriteLab generation mode as tools for Claude Code, Cursor, Claude Desktop, Windsurf and any MCP client. One config line, your API key, and the same billing as the REST API.

Live for everyone. Runs on your sl_live_… API key — create one in the app under Account → API keys. Questions? Join the Discord.
ON THIS PAGE

Overview

The SpriteLab MCP server exposes every generation mode as tools for Claude Code, Cursor, Claude Desktop, Windsurf and any other MCP client — generate pixel art without leaving your editor or agent.

Same key, same billing

The MCP server sits on top of the REST API: your sl_live_… key, the same credits (purchased, plus plan credits on Knight and up), automatic refunds on failure, and every mode open to any key.

Setup

Endpoint: https://spritelab.dev/mcp (streamable HTTP).

Claude Code

terminal
claude mcp add --transport http spritelab https://spritelab.dev/mcp \
  --header "Authorization: Bearer sl_live_YOUR_KEY"

Cursor / Windsurf / generic

mcp.json
{
  "mcpServers": {
    "spritelab": {
      "url": "https://spritelab.dev/mcp",
      "headers": { "Authorization": "Bearer sl_live_YOUR_KEY" }
    }
  }
}

claude.ai web connectors need OAuth, which we don't support yet; use the key-header clients above.

Tools

Fifteen tools, one per generation mode plus the free iteration and probe calls. Costs are identical to the REST API, and every mode is open to any key.

ToolCostWhat it does
generate_sprite1 / 6 CRText to sprite: transparent bg, clean palette, 1px outline. isometric=true for iso props on the tileset grid (with iso_footprint / iso_height); style_reference_id to match an earlier sprite's style
generate_sprite_pack2 / 9 CRA whole grid of sprites in one call, split into individual PNGs. Cheapest per sprite. isometric=true + items 4/6 for a matching iso prop set
generate_rotation4 / 12 · 8-dir 6 / 16 CRRotation sheet for characters & mobs: frames + spritesheet + GIF. directions=4 (front/right/back/left) or 8 (adds diagonals). isometric=true for the four iso facings with a shared floor point. Pass sprite_id or image_b64 to turn around a sprite you already have, in its own colours
resize_spriteFreeRe-render any generated sprite at a new size or tuning. The iteration loop. size_mode="native" gives the model's own pixel size
convert_image3 CRAny image to faithful pixel art
micro_sprite3 / 10 CRExact-size 16-64px sprites on a true pixel grid
exact_size_sprite8 CRA sprite drawn at exactly the width and height you ask for, any size from 16 to 128 px a side (20×60, 128×48, ...). Paid plans
reskin_sprite2 / 6 CR / variantThemed variants of an existing sprite, identical dimensions
merge_sprites2 / 6 CR / variantAdd a donor item onto a base sprite — armor, gear, anything
edit_sprite2 / 6 CR / variantEDIT from a prompt and optional painted region. Failed and unchanged variants are refunded
generate_background4 / 15 CRFull-frame scene art up to 8K
generate_tileset10 / 30 CRAutotiling tileset + drop-in Godot 4 & Tiled files. projection="iso" for 2:1 isometric, optional raised side faces
animate_sprite20 / 30 CRSubmit an animation job (async): Standard / Pro
check_animation_jobFreePoll an animation job; returns spritesheet + GIF URLs when done
generate_ui_kit3 + 8 / sheet CRGame UI kit from a mockup or a description (async, early access): sliced, named, 9-slice pieces plus a zip with an atlas, Godot theme and Unity package. A mockup skips the concept charge; unused sheets are refunded
check_ui_kitFreePoll a UI kit; returns every piece and the zip download URL when done
get_creditsFreeBalance + tier
enhance_promptFreeRewrite a rough subject into a stronger sprite prompt
list_palettes / save_paletteFreeYour saved palettes (shared with the app). Use one on any sprite tool with palette_lock: "palette:<id>". Saving colours you already have returns that palette
rename_palette / delete_paletteFreeManage saved palettes
match_palettesFreeOne shared palette across a set of sprites so they look like one artist made them. Preview first, apply=true to save; undo_palette_match reverses it

edit_sprite accepts image (PNG base64, data URL or a SpriteLab sprite download URL), prompt (1 to 500 characters), optional region (PNG base64 mask), variants (1 to 4, default 1), quality (epic or mythic) and keep_silhouette (default true). Results are inline only, under 96KB of base64 per image. EDIT has no saved sprite id or download URL, so larger images are omitted; use POST /api/v1/edit for those. Chained edits are coming.

Saving results to disk

Tool results are deliberately compact: a small JSON summary, a preview image when it's tiny, and a download_url. Your agent saves the real asset with the same key:

terminal
curl -H "Authorization: Bearer sl_live_YOUR_KEY" \
  "https://spritelab.dev/api/v1/sprites/SPRITE_ID/download" \
  --output assets/sprites/knight.png

So prompts like this just work in Claude Code:

> generate a 64px armoured knight sprite and save it to
  assets/sprites/knight.png, then make ice and lava variants
  of it in the same folder

Notes for agents

  • For a coherent set, generate the hero first and pass its sprite_id as style_reference_id on later generate_sprite calls: palette and proportions match automatically.
  • Prefer epic quality unless the user asks for better; it's a sixth of the cost and usually enough.
  • Iterate with resize_sprite (free), not by regenerating.
  • For the crispest sprite pass size_mode: "native" on generate_sprite, convert_image or resize_sprite: it comes back at the model's own pixel size. Results report native_height; any whole multiple of it via size_mode: "crisp" stays crisp. cleanup: "classic" switches to the previous cleanup if you need older sprites to match.
  • generate_ui_kit returns a kit_id straight away; poll check_ui_kit every 5 seconds (45-90s total). Up to max_sheets sheets are reserved upfront and refunded if unused. The finished kit also opens in the app's UI Kit mode for hand edits.
  • animate_sprite accepts engine: "standard" (default, 20 CR, up to 256px, even frames 2–16) or "pro" (30 CR, up to 320px, any integer frames 3–16). Inputs over 256 on either axis that fit 320x320 automatically use Pro at 30 CR; above 320 returns 400. Explicit Pro stays Pro for smaller inputs. Both engines require aspect 1:2 to 2:1. steady_frames (default true, free) holds still the parts that don't move and keeps every frame on your sprite's colours, which reduces flicker. It returns immediately; poll check_animation_job every 4-5 seconds, typical total 60-120s.
  • Every result reports credits_remaining; failed generations refund automatically.
  • Rate limit: 60 requests per minute per key, shared with the REST API.

Billing

Same as the REST API. Calls are paid from purchased (top-up) credits, and on Knight and up they can also spend your monthly plan credits, at a small markup that shrinks as your plan grows: Knight +50% per call, Paladin +25%, Dragonlord no markup. Plan credits are spent first; when they can't cover a call, it's paid from purchased credits at face value, and refunds go back to whichever balance paid. Squire and Ranger use purchased credits only.

Every mode is available without a plan, and get_credits shows what you can spend right now. The full cost table is in the API billing section. Keys are created in the app under Account → API keys.