Intermediate30 minModule 2 of 3

Prompt Engineering for Images

Write prompts that reliably produce the outputs you want — anatomy, techniques, negative prompts, iteration strategies, and production prompt templates.

What you'll be able to do after this module

Write prompts that consistently produce professional outputs. Build a prompt template library for your product. Use negative prompts to eliminate common defects. Debug and iterate efficiently.


Why prompts matter more than the model

The same model with a poor prompt will produce garbage. The same model with a great prompt produces work you'd pay a designer for. Prompt engineering is the highest-leverage skill for AI image integration.


The anatomy of a great prompt

A strong prompt has four layers, building from specific to stylistic:

[Subject + Action] + [Setting/Environment] + [Style/Medium] + [Technical quality]

Real-world example

A female software engineer reviewing code on a laptop
in a modern open-plan office with floor-to-ceiling windows,
cinematic lighting, golden hour, shallow depth of field,
shot on Sony A7R V, ultra-sharp, 8K, professional photography
LayerPurposeExample
Subject + ActionWhat is in the image, what are they doing"A female software engineer reviewing code"
SettingEnvironment, context"modern open-plan office with floor-to-ceiling windows"
Style/LightingVisual mood, atmosphere"cinematic lighting, golden hour, shallow depth of field"
TechnicalQuality signals the model understands"shot on Sony A7R V, 8K, professional photography"

Core techniques

1. Be specific, not abstract

Vague words lead to inconsistent results. Replace abstract adjectives with concrete descriptions.

AvoidUse instead
"beautiful landscape""Mountain lake at sunrise, pine forest reflection, morning mist"
"a happy person""A smiling woman in her 30s, warm natural lighting, brown eyes"
"futuristic city""2080s megacity, neon signs in Japanese, rain-slicked streets, flying taxis"
"modern design""Minimalist Scandinavian interior, white walls, oak wood, concrete floors"

2. Use negative prompts

The negative_prompt field tells the model what to avoid. This is one of the highest-impact parameters — especially for photorealistic work:

curl -X POST https://api.skytells.ai/v1/predictions \
  -H "x-api-key: $SKYTELLS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "truefusion-pro",
    "input": {
      "prompt": "Professional product photo of a smartwatch on white background",
      "negative_prompt": "blurry, out of focus, noise, watermark, text, extra hands, distorted, low quality, jpeg artifacts",
      "width": 1024,
      "height": 1024
    }
  }'

Standard negative prompt for photorealistic work:

blurry, out of focus, noise, grain, jpeg artifacts, low resolution,
oversaturated, bad anatomy, extra limbs, missing fingers, watermark,
signature, text, logo, extra hands, distorted proportions

3. Control composition with aspect ratio

Match your output dimensions to where the image will be used:

Use caseWidth × HeightRatio
Social media square1024 × 10241:1
Website hero / banner1344 × 76816:9
Mobile / Stories / Reels768 × 13449:16
Product card1024 × 7684:3
Wide panoramic1920 × 6403:1

4. Use guidance_scale to control creativity vs. precision

guidance_scale: 1–5    → Very creative, loose interpretation of prompt
guidance_scale: 6–9    → Good balance (default 7.5 is usually ideal)
guidance_scale: 10–20  → Strictly literal, sometimes over-saturated

5. Quality/speed tradeoff with num_inference_steps

StepsUse caseQualitySpeed
4Live preview (truefusion-edge)Preview< 2s
15Internal draftsGood~5s
30Production defaultHigh~12s
50Maximum qualityVery high~20s

Prompt templates by use case

Copy and adapt these for your product:


Iteration strategy

Don't try to write the perfect prompt on the first attempt. Use this loop:

Wrong style Wrong subject Quality issues Composition off Yes No Write prompt v1 Generate 3-4 variationsuse seed 1 2 3 4 What's wrong? Add style modifiers Be more specific Strengthen negative_prompt Adjust aspect ratioor add composition words Generate again Good enough? Lock the seedship it
import asyncio
import skytells
import os

async def test_prompt_variations(base_prompt: str, count: int = 4):
    async with skytells.AsyncClient(api_key=os.environ["SKYTELLS_API_KEY"]) as client:
        tasks = [
            client.predictions.create(
                model="truefusion-pro",
                input={
                    "prompt": base_prompt,
                    "width": 1024,
                    "height": 1024,
                    "num_inference_steps": 20,  # faster for iteration
                    "seed": i,
                },
            )
            for i in range(count)
        ]
        results = await asyncio.gather(*tasks)
        return [p.output[0] for p in results]

# Generate 4 variations in parallel
urls = asyncio.run(test_prompt_variations(
    "A cyberpunk street vendor selling noodles, rain, neon lights"
))
for i, url in enumerate(urls):
    print(f"Variation {i+1}: {url}")

Style reference keywords

Add these to any prompt for reliable quality improvements:

Photography styles:

cinematic, documentary photography, editorial photography,
portrait photography, product photography, macro photography,
shot on [camera], f/1.8, bokeh, shallow depth of field

Art styles:

oil painting, watercolor, digital art, concept art,
illustration, 3D render, octane render, isometric,
flat design, line art, ink drawing

Quality boosters:

highly detailed, sharp focus, 4K, 8K, ultra-sharp,
professional, masterpiece, best quality, high resolution

Common mistakes and fixes

ProblemCauseFix
Blurry outputLow num_inference_stepsIncrease to 25–30
Ignoring part of the promptToo many conflicting elementsSimplify; put most important subject first
Distorted facesLow resolution or stepsUse 1024×1024, 30 steps, add "sharp facial features"
Wrong color saturationHigh guidance_scaleReduce to 7–7.5
Repeated texturesPrompt too genericBe more specific about surfaces and materials
Bad hands/anatomyCommon model weaknessAdd "perfect anatomy, correct hands" to prompt; use truefusion-2.0

Summary

The five techniques that matter most:

  1. Four-layer structure — Subject + Setting + Style + Technical quality
  2. Specific over abstract — concrete descriptions beat adjectives
  3. Negative prompts — eliminate defects before they appear
  4. Iterate with seedsseed: 0..3 for fast variations
  5. Match aspect ratio — dimensions shape composition

Next: integrate image generation into a real application.

On this page