UI Elements
Generate game UI components like health bars, buttons, and icons.
UI Elements
Generate game UI components — health bars, buttons, icons, inventory slots, and other interface elements optimized for game development.
Endpoint
POST /api/generations/uiParameters
| Name | Type | Required | Description |
|---|---|---|---|
description | string | Yes | Text prompt describing the UI element to generate |
image_size | string | No | Output dimensions as WxH. Default: 128x128 |
seed | integer | No | Random seed for reproducible results. 0 = random |
style | string | No | UI style preset (e.g. fantasy, sci-fi, minimal) |
Example
curl -X POST https://api.spritesynth.com/api/generations/ui \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"description": "a red pixel art health bar with gold border",
"image_size": "256x64",
"style": "fantasy"
}'Response
{
"id": "gen_ui_345",
"status": "completed",
"asset": {
"url": "https://cdn.spritesynth.com/assets/gen_ui_345.png",
"width": 256,
"height": 64
},
"credits_cost": 1,
"duration_ms": 1500
}Tips
- Use
styleto match your game's aesthetic. - Generate at the exact pixel dimensions you need to avoid scaling artifacts.
- Generate empty and filled states separately for animation.
Need help?
Join our Discord community for support and tips.
Was this page helpful?