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, top-up credits only, 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
generate_sprite_pack2 / 9 CRA whole grid of sprites in one call, split into individual PNGs. Cheapest per sprite
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)
resize_spriteFreeRe-render any generated sprite at a new size or tuning. The iteration loop
convert_image3 CRAny image to faithful pixel art
micro_sprite3 / 10 CRExact-size 16-64px sprites on a true pixel grid
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
animate_sprite20 / 30 CRSubmit an animation job (async): Standard / Pro
check_animation_jobFreePoll an animation job; returns spritesheet + GIF URLs when done
get_creditsFreeBalance + tier
enhance_promptFreeRewrite a rough subject into a stronger sprite prompt

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.
  • 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. 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

Identical to the REST API: top-up (purchased) credits only, the monthly subscription bucket is never touched, and every mode is available without a plan. Full cost table lives in the API billing section. Keys are created in the app under Account → API keys.