Create Object
Generate game objects like chests, weapons, and decorations.
Create Object
Generate game objects — chests, weapons, decorations, doors, and other interactive elements. Supports single-direction and multi-directional generation.
Endpoints
| Variant | Endpoint |
|---|---|
| 1-direction | POST /api/generations/create-object |
| 8-direction | POST /api/generations/create-object-8-directions |
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
description | string | Yes | Text prompt describing the object |
direction_count | integer | No | 1 or 8. Default: 1 |
image_size | string | No | Output dimensions as WxH. Default: 64x64 |
seed | integer | No | Random seed. 0 = random |
palette | string | No | Target color palette |
Example
curl -X POST https://api.spritesynth.com/api/generations/create-object \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"description": "a wooden treasure chest with iron bands, slightly open with gold glow",
"image_size": "64x64",
"seed": 42
}'Response
{
"id": "obj_def",
"status": "completed",
"object": {
"id": "obj_789",
"asset": {
"url": "https://cdn.spritesynth.com/objects/obj_789.png",
"width": 64,
"height": 64
}
},
"credits_cost": 1,
"duration_ms": 1500
}Tips
- Use
1direction for static objects (chests, barrels, trees). - Use
8directions for objects that rotate (turrets, directional doors). - Add Object States for open/broken/active variants.
Need help?
Join our Discord community for support and tips.
Was this page helpful?