S
spritesynthDOCS

Prompt Engineering for Pixel Art

Write effective prompts — structure, keywords, style modifiers, and negative prompts with examples.

Overview

The quality of your generated pixel art depends heavily on the prompt you write. A well-structured prompt produces usable results in one or two attempts. A vague or poorly structured prompt leads to repeated iterations and inconsistent outputs. This guide covers prompt anatomy, style modifiers, and common pitfalls.

Prompt Structure

The ideal prompt follows a consistent pattern:

pixel art sprite, [subject description], [style details], game asset, transparent background

Breaking this down: start with pixel art sprite to activate the pixel art LoRA, describe the subject clearly, add style modifiers, and end with structural requirements.

Step 1: Write a Good Prompt (Annotated)

Good: pixel art sprite, knight with silver armor and red cape, holding a longsword, 16-bit style, game asset, transparent background

Bad: knight — Too vague, no style or format guidance.

Worse: a cool looking knight guy for my game pls — No structure, no pixel art trigger, no style cues.

Step 2: Use Style Modifiers

ModifierEffect
16-bit styleRicher color palette, more detail
chibiCute proportions, large head
top-down viewFor RPG characters seen from above
isometric view2.5D perspective
side viewPlatformer character profile

Step 3: Use Style Reference Generation

For consistent character styling across multiple prompts, use the style reference endpoint:

curl -X POST https://api.spritesynth.com/v1/generations/style \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "style_image": "base64_encoded_reference_image",
    "prompt": "pixel art sprite, rogue with black hood, dual daggers",
    "width": 64,
    "height": 64
  }'

The style_image provides visual context — the AI matches the palette, line weight, and shading style of your reference while generating the new subject.

Step 4: Convert Real Images to Pixel Art

Transform any image into pixel art with a single endpoint:

curl -X POST https://api.spritesynth.com/v1/image-ops/to-pixel \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "base64_encoded_source_image",
    "palette_size": 16,
    "width": 64,
    "height": 64
  }'

This endpoint uses a different prompt model — the prompt is the source image itself, and the output parameters control the pixel art style. Use palette_size to limit colors and width/height for resolution.

Step 5: Add Negative Prompts

Exclude unwanted elements:

curl -X POST https://api.spritesynth.com/v1/generations/image \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
"prompt": "pixel art sprite, wizard with blue robe, pointed hat",
    "negative_prompt": "mixels, blurry, photograph, realistic, extra limbs, distorted",
    "width": 64,
    "height": 64
  }'

Tips

  • Lead with the subject — The AI prioritizes the beginning of your prompt. Put the most important description first.
  • Be specific about equipment — "knight with silver armor" beats "knight with armor". Specificity reduces randomness.
  • Avoid negative language in the prompt — Don't write "no background" in the prompt; use negative_prompt or the transparent background phrase instead.

Need help?

Join our Discord community for support and tips.

Was this page helpful?

On this page