Pixel art, HD sprites, tilesets, and UI elements. Send a prompt, get production-ready assets back in seconds.
All requests use Bearer token authentication. Create a key in your SpriteCook dashboard and include it in the Authorization header.
Authorization: Bearer sc_live_xxxxxxxxxxxxxxxxxxxx...
All parameters for POST /v1/api/generate and POST /v1/api/generate-sync. Only prompt is required.
| Parameter | Type | Description |
|---|---|---|
promptrequired | string | What to generate, e.g. "a medieval iron sword, side view" |
width | int | Image width in pixels (16-512) |
height | int | Image height in pixels (16-512) |
variations | int | Number of variations (1-4) |
pixel | bool | Pixel art (true) or detailed HD art (false) |
pixel_perfect | bool | Grid-aligned pixel post-processing |
bg_mode | string | "transparent", "white", or "include" |
theme | string | Art theme context, e.g. "dark fantasy medieval" |
style | string | Style direction, e.g. "16-bit SNES style" |
aspect_ratio | string | "1:1", "16:9", or "9:16" |
smart_crop | bool | Auto-crop to content bounds |
mode | string | "assets", "texture", or "ui" |
model | string | AI model to use |
resolution | string | "1K", "2K", or "4K" |
colors | string[] | Color palette, hex codes (max 8) |
reference_asset_id | string | Asset ID for style reference (consistent art) |
edit_asset_id | string | Asset ID to edit/modify |
project_id | string | Assign output to a project (UUID) |
curl -X POST 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" }'
If you're connecting SpriteCook to Cursor, VS Code, Claude, or another MCP-compatible editor, use the one-command installer. It configures everything automatically.
curl -fsSL https://spritecook.ai/install.sh | bashEvery response includes credits_used and credits_remaining.
insufficient_creditsrate_limitedscope_deniedinvalid_requestCreate an account, grab an API key, and generate your first sprite in under a minute.