create_ui_asset
Generate a saved pixel-art UI panel from a text description. Returns a job ID for tracking and supports custom shapes or predefined UI elements.
Instructions
Generate a shape-based pixel-art UI panel (Pro) from a text description — a persistent, saved UI asset (distinct from generate_ui, which is a one-shot generator). Returns a job_id and a ui_asset_id immediately; poll get_job_status or get_ui_asset until ready. Optionally scaffold the panel from named UI elements or a custom shape template.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Friendly name for the saved asset | |
| seed | No | Seed for deterministic generation (default 0) | |
| pieces | No | Optional custom shape template. Each piece needs a unique id, a kind, and an optional label. Coords are on a virtual canvas where the longer side spans 0–512 and the shorter side scales to the output aspect ratio. kinds: rounded_rect {x,y,w,h,radius}, circle {x,y,r}, polygon {x,y,r,sides,phase}. | |
| elements | No | Optional named UI element types to scaffold the panel from (auto-positioned, no coords needed). Combine with pieces for custom shapes; omit both for a default full-canvas panel. | |
| image_size | No | Output size in pixels, 192–688 per axis (max per axis depends on aspect; default 256×256) | |
| project_id | No | If set, assign the finished asset to this project | |
| description | Yes | Style description for the UI panel (e.g. 'wooden RPG panel with gold trim') | |
| style_image | No | Optional style reference image (PNG/JPEG) | |
| color_palette | No | Optional palette specification (e.g. 'brown and gold') | |
| no_background | No | Generate with transparent background |