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| Layer | Purpose | Example |
|---|---|---|
| Subject + Action | What is in the image, what are they doing | "A female software engineer reviewing code" |
| Setting | Environment, context | "modern open-plan office with floor-to-ceiling windows" |
| Style/Lighting | Visual mood, atmosphere | "cinematic lighting, golden hour, shallow depth of field" |
| Technical | Quality 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.
| Avoid | Use 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 proportions3. Control composition with aspect ratio
Match your output dimensions to where the image will be used:
| Use case | Width × Height | Ratio |
|---|---|---|
| Social media square | 1024 × 1024 | 1:1 |
| Website hero / banner | 1344 × 768 | 16:9 |
| Mobile / Stories / Reels | 768 × 1344 | 9:16 |
| Product card | 1024 × 768 | 4:3 |
| Wide panoramic | 1920 × 640 | 3: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-saturatedRule of thumb: Start at guidance_scale: 7.5. If the image drifts too far from your prompt, increase to 8–9. If it looks over-processed or too literal, decrease to 6–7.
5. Quality/speed tradeoff with num_inference_steps
| Steps | Use case | Quality | Speed |
|---|---|---|---|
| 4 | Live preview (truefusion-edge) | Preview | < 2s |
| 15 | Internal drafts | Good | ~5s |
| 30 | Production default | High | ~12s |
| 50 | Maximum quality | Very 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:
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 fieldArt styles:
oil painting, watercolor, digital art, concept art,
illustration, 3D render, octane render, isometric,
flat design, line art, ink drawingQuality boosters:
highly detailed, sharp focus, 4K, 8K, ultra-sharp,
professional, masterpiece, best quality, high resolutionCommon mistakes and fixes
| Problem | Cause | Fix |
|---|---|---|
| Blurry output | Low num_inference_steps | Increase to 25–30 |
| Ignoring part of the prompt | Too many conflicting elements | Simplify; put most important subject first |
| Distorted faces | Low resolution or steps | Use 1024×1024, 30 steps, add "sharp facial features" |
| Wrong color saturation | High guidance_scale | Reduce to 7–7.5 |
| Repeated textures | Prompt too generic | Be more specific about surfaces and materials |
| Bad hands/anatomy | Common model weakness | Add "perfect anatomy, correct hands" to prompt; use truefusion-2.0 |
Summary
You now have a complete prompt engineering toolkit. Use these patterns in your production app to consistently produce professional-quality outputs.
The five techniques that matter most:
- Four-layer structure — Subject + Setting + Style + Technical quality
- Specific over abstract — concrete descriptions beat adjectives
- Negative prompts — eliminate defects before they appear
- Iterate with seeds —
seed: 0..3for fast variations - Match aspect ratio — dimensions shape composition
Next: integrate image generation into a real application.
TrueFusion Models
Understand the TrueFusion family — Skytells' native image models — and choose the right variant for every use case. speed, quality, or cost.
Integrate in Your App
Build a production-ready image generation API in Python (FastAPI) and TypeScript (Next.js App Router) — with async processing, webhooks, and proper error handling.