S
spritesynthDOCS

Style Reference

Use a reference image to guide the style of generated pixel art.

Style Reference

Generate pixel art that matches the style of a reference image. Provide a style image alongside your text prompt to guide the aesthetic direction of the output.

Endpoint

POST /api/generations/style

Parameters

NameTypeRequiredDescription
descriptionstringYesText prompt describing the content to generate
style_imagestringYesReference image URL or base64-encoded image
image_sizestringNoOutput dimensions as WxH. Default: 128x128
seedintegerNoRandom seed for reproducible results. 0 = random

Example

curl -X POST https://api.spritesynth.com/api/generations/style \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "a forest background with trees and bushes",
    "style_image": "https://example.com/reference-style.png",
    "image_size": "256x256"
  }'

Response

{
  "id": "gen_style_012",
  "status": "completed",
  "asset": {
    "url": "https://cdn.spritesynth.com/assets/gen_style_012.png",
    "width": 256,
    "height": 256
  },
  "credits_cost": 2,
  "duration_ms": 2800
}

Tips

  • Use images with clear, distinct pixel art styles for best results.
  • The style image should match your target resolution range.
  • Works best when the style reference has a limited color palette.

Need help?

Join our Discord community for support and tips.
Was this page helpful?

On this page