Introduction

What the Sprite AI API does, what you can build with it, and how to generate your first game-ready pixel art sprite in three quick steps.

The Sprite AI API turns text prompts into game-ready sprites and sprite-sheet animations. Use it from a script, a build step, an MCP server, or an editor plugin.

Requests are JSON, authenticated with a Bearer key. Generated images come back inline as base64, so there's no file to download separately.

What you can do

ActionEndpoint
Generate a still spritePOST /api/sprites
Add a sprite you already havePOST /api/sprites/import
Animate a sprite into a sheetPOST /api/animations
Check your balance and limitsGET /api/balance, /api/limits

Generate or import once and you get a sprite id. Animating a sprite (source_generation_id) and style-matching a new one to it (reference_asset_id) both take that id, so you never resend image bytes. To use a local file, import it first.

1. Create a key

Open the API keys tab and generate one. It starts with sai_sk_ and is shown once, so copy it now.

2. Send a request

POST a prompt and an asset type with your key as a Bearer token.

curl https://www.sprite-ai.art/api/sprites \
-H "Authorization: Bearer sai_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{ "prompt": "a knight with a blue cape", "asset_type": "character" }'

3. Save the image

The PNG is in image.pngBase64. Decode it and write it to a file.

echo "iVBORw0KGgoAAAANS..." | base64 -d > knight.png

Sync vs async

Still sprites are synchronous: one request, the finished image in the response. Animations take about 90 seconds, so they run as a job you start and then poll until it's done.

You don't pick a model. Describe what you want, and the request is routed for you based on the asset type and size.

Generating from your AI editor instead? The MCP server handles all of this for you. For the full HTTP surface, see the API reference; for key details and rate limits, see Authentication.

We use cookies to enhance your experience. Essential cookies are required for the site to function. You can choose to accept all cookies or only essential ones.

Cookie policy