API DOCS OPEN APP
← API OVERVIEW

Micro Sprites

Exact-size sprites at 16 to 64px, drawn on a true pixel grid. Icons, inventory items, tiny characters: the PNG you get back is exactly NxN native pixels with a closed 1px outline.

Open to every key. In the web app this mode is subscriber-only; over the API it just spends top-up credits, no plan needed.

POST /micro

POST /api/v1/micro 3 CR EPIC · 10 CR MYTHIC
FieldTypeNotes
promptstring, requiredMax 400 chars. Keep it to a subject plus 2-3 bold features; a 16-32px sprite can't hold fine detail
sizeint16 to 64, default 32. The EXACT output size. 16 suits icons and items, characters want 32+, 64 has room for real detail
qualitystringepic (default) or mythic
detailstringclean (default, bold flat shapes) or detailed (shading, richer materials). Detailed needs size 24+ and suits characters and objects with distinct materials; organic textures can come out muddy

Python:

import base64, requests

r = requests.post(
    "https://spritelab.dev/api/v1/micro",
    headers={"Authorization": "Bearer sl_live_YOUR_KEY"},
    json={"prompt": "treasure chest with gold trim", "size": 24},
)
r.raise_for_status()
out = r.json()
open("chest_24.png", "wb").write(base64.b64decode(out["image_b64"]))

Response envelope:

{
  "id": "b41c…",
  "mode": "micro",
  "image_b64": "…",          # exactly 24x24 native pixels
  "size": 24, "width": 24, "height": 24,
  "detail": "clean",
  "outline_gaps": 0,          # quality signal: 0 = fully closed outline
  "cost": 3,
  "credits_remaining": 374
}

Notes