UI panels: one endpoint, schema documented, cost unverified
POST /create-ui-asset (+ GET/DELETE /ui-assets/{id}, GET /ui-assets)
is wrapped by pixelkiln's uiAsset generator (docs/GENERATORS.md). A broad
search of the live OpenAPI document for "ui-asset", "element", "split", and
"template" paths found only these three callable endpoints — no separate
batch-icon endpoint, no states endpoint, no nine-slice endpoint, contrary to
tutorial-based descriptions elsewhere. (True in September 2026; no longer.)
Request fields: description, image_size ({width, height}, 192-688px per
axis, aspect-gated rather than a free rectangle — square tops out at
512x512, 16:9 at 688x384, 9:16 at 384x688, 4:3 at 600x448, 3:4 at 448x600; a
combination outside these five tiers is rejected or silently resolved to a
different tier's ceiling), pieces (an array of rounded_rect/circle/
polygon shapes, each with a unique id and optional label, positioned on
a virtual 0-512 coordinate canvas independent of image_size), elements
(named auto-positioned scaffolds — button, icon_button, toolbar, tab,
panel, window, health_bar, avatar, triangle, pentagon, hexagon,
octagon), style_image (a single Base64Image, unlike most generators'
plural style_images), color_palette (a free-text prompt-level hint, e.g.
"brown and gold" — pixelkiln's own hex-array palette field is a different,
local-quantization concept and is deliberately not sent here), no_background,
seed.
POST /create-ui-asset responds {ui_asset_id, background_job_id, status, usage}. GET /ui-assets/{id} responds {id, prompt, size, image_url (nullable), status ("processing"|"completed"|"failed"), progress_percent, eta_seconds} — one flat composited image, confirmed by the schema to
carry no per-piece sub-images, no bounding-box data, and no nine-slice
metadata at all, regardless of how many pieces/elements the request
listed.
That was the whole surface when this section was written (September 2026).
PixelLab has since added split, states and 9-slice endpoints, and GET /ui-assets/{id} now reports kind, elements, states, nine_slice and
split_preview; see UI split, states and 9-slice.
The paragraph above describes the response as it was then.
Cost: confirmed live at one data point, and it overturned the borrowed
formula. A real 256x192 (49152px²) call against a Tier 2 subscription
account billed exactly 20 generations (balance 4979.8 → 4959.8), matching
the low end of the create_ui_asset MCP tool description's "20-40
generations" claim. pixelkiln's generationCost() has no dedicated branch
for uiAsset and falls through to the same canvas-tier formula as
1dir/tiles, which — given uiAsset's 192px-per-side floor (already
36864px², past that formula's own 2048px² top tier) — always predicts the
40-generation ceiling. The measured call proves that formula wrong for this
generator: 49152px² sits well above the borrowed top tier yet billed the
floor price, not the ceiling, so uiAsset pricing does not follow
1dir/tiles' area-based tiers at all. Left unchanged rather than patched
from one data point — over-reading stays the safe direction for --budget,
the same policy tiles/terrain estimates use elsewhere in this file — but
budget a real call at roughly half the number pixelkiln plan prints until a
second size is measured.
