For developers

Pixel Art API

Generate pixel art sprites, animations, characters and tilesets from your own code, and remove backgrounds in bulk. Plain HTTP with an API key, priced in credits.

Bearer key authOpenAPI 3.1 specSync or asyncMCP server for agents
request
curl https://api.spritecook.ai/v1/api/generate-sync \
-H "Authorization: Bearer sc_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "a medieval iron sword, side view",
"width": 64,
"height": 64,
"pixel": true,
"bg_mode": "transparent"
}'
response
{
"job_id": "4a2b4ed3-...",
"status": "succeeded",
"assets": [{
"id": "0b54b631-...",
"url": "https://api.spritecook.ai/v1/assets/0b54b631-.../content/pixel",
"width": 64,
"height": 64
}],
"credits_used": 12,
"credits_remaining": 488
}

The sync endpoint waits for the job and returns the finished sprite. The same request works for detailed art with "pixel": false.

What the API does

These are the main endpoints, each shown with the kind of output it returns. The API docs list every parameter.

Pixel art sword icon

Sprites

Pixel art or detailed sprites, items, icons and UI pieces from a prompt, with a transparent background, palette limits and reference images.

  • POST/v1/api/generate-sync
  • POST/v1/api/generate
Pixel art alchemist walk animation

Animations

Animate any sprite you made or imported from a motion prompt. Get an animated WebP, a GIF or a sprite sheet.

  • POST/v1/api/animate-sync
  • POST/v1/api/animate
Top-down pixel art ninja walking

Characters

A character and its full move set in one workflow, for side view, top-down or isometric games.

  • POST/v1/api/characters
  • POST/v1/api/characters/{id}/animations
Pixel art grass and water tileset in a 4x4 layout

Tilesets

Autotiling terrain at your tile size: 15-piece dual grid, 17-piece, platformer and isometric sets.

  • POST/v1/api/tilesets-sync
  • GET/v1/api/tilesets/options
Pixel art treasure chest on a transparent background

Background removal

Transparent PNGs or animated WebPs from any image, with hard pixel edges. Outline repair runs on pixel art already in your SpriteCook account.

  • POST/v1/api/remove-background

Assets, jobs and credits

Import your own images, read asset metadata, poll or cancel jobs, list models and check your balance.

  • POST/v1/api/assets/import
  • GET/v1/api/jobs/{id}
  • GET/v1/api/credits

Pricing

API calls use the same credits as the app. Top-up credits cost $0.01 each, from $5 for 500 to $200 for 20,000. They never expire and work on any plan, including Free.

CallCreditsAt top-up price
Sprite or tileset, default model12$0.12
Animationfrom 20from $0.20
Background removal, image1$0.01
Background removal, animation2$0.02

Plans add monthly credits and run more jobs at the same time: 1 on Free, 4 on Starter, 5 on Adventurer and 10 on Archmage. Running a lot of images every month? Get in touch about volume pricing and higher limits. See plans.

For AI coding agents

Building with Claude Code, Codex, Cursor or ChatGPT? The SpriteCook MCP server gives your agent the same tools without writing HTTP calls, and the plugins add skills for picking models, animating and wiring art into your engine.

Set up an agent

Machine-readable docs

The full spec lives at /openapi.json, so client generators and API tools can read it directly. The API docs page can also copy the whole reference as Markdown for your agent.

Open the OpenAPI spec

Related

Frequently asked questions

How do I get an API key?+
Sign in to SpriteCook and create a key on the API keys page. Free accounts can create keys once Google, GitHub or Discord is connected. Each key has its own scopes, so you can give a key only what it needs.
How much does the pixel art API cost?+
Every call costs credits, the same as in the app. A sprite with the default model is 12 credits, an animation starts at 20, and background removal is 1 credit per image. Top-up credits cost $0.01 each, never expire and work on any plan.
Can I try it for free?+
Yes. New accounts get free credits with no card needed, which is enough to test a few calls before you pay for anything.
Should I use the sync or the async endpoints?+
The -sync endpoints wait up to 90 seconds and return the finished assets, which is easiest for scripts and agents. If a job takes longer, you get its job ID back and poll it like an async job. The plain endpoints return a job ID right away, and you poll GET /v1/api/jobs/{job_id} until it is done. There are no webhooks.
How many requests can run at once?+
It depends on your plan: 1 job at a time on Free, 4 on Starter, 5 on Adventurer and 10 on Archmage. Paid plans also hold a few extra jobs in a queue. Past that, the API answers with a 429 and you can retry a moment later. Get in touch if you need higher limits or volume pricing.
Are the generated assets private?+
On paid plans, yes. On the Free plan, generated assets are public. Background removal on an uploaded image never creates an asset, and its result file stops being available after 24 hours.
Can I use the output in a commercial game or product?+
Yes, including games you sell. Usage rights also depend on the terms of the AI providers behind the models, so read those alongside the SpriteCook Terms of Service.
Is there an SDK?+
There is no official SDK. The OpenAPI 3.1 spec at spritecook.ai/openapi.json works with OpenAPI client generators, and AI coding agents can use the SpriteCook MCP server instead of raw HTTP.