S
spritesynthDOCS

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

VariantEndpoint
1-directionPOST /api/generations/create-object
8-directionPOST /api/generations/create-object-8-directions

Parameters

NameTypeRequiredDescription
descriptionstringYesText prompt describing the object
direction_countintegerNo1 or 8. Default: 1
image_sizestringNoOutput dimensions as WxH. Default: 64x64
seedintegerNoRandom seed. 0 = random
palettestringNoTarget 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 1 direction for static objects (chests, barrels, trees).
  • Use 8 directions 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?

On this page