A practical guide to AI image generation, from diffusion to agents
TL;DR Highlight
Testing image APIs showed you pay per canvas, and camera-style prompts beat describing the view
Who Should Read
Backend developers adding image generation APIs or agents to a product who are unsure how to pick models, control cost, and write prompts
Core Mechanics
- You pay for the canvas, not the content
- A plain wooden table costs the same as a detailed oil painting at the same size.
- For a 32x32 sprite, generate a large image and shrink it yourself.
- Gemini 2.5 Flash Image returned 1024x1024 at the same flat price when 512x512 was requested.
- Two families: diffusion and multimodal
- Diffusion models, which clean up noise step by step, are cheap, fast, and repeatable with seeds.
- Multimodal models, which generate images inside a language model, are better at instructions, text, and edits.
- They often lack seed control and have a fixed output size.
- Prices vary by over 100x
- Costs range from under a cent to 15 cents or more per image.
- In October 2026, Flux Schnell on Replicate or fal.ai was about $0.003, while Nano Banana Pro was about $0.134 and up.
- Newer flagship models cost more, not less.
- Cheapest model isn't always cheapest
- Cost per usable image is (price per image x attempts) + your time.
- In the author's experiments, a model costing a tenth of a cent more saved several retries.
- Describe the camera, not the view
- A top-down table worked once the prompt said orthographic flat lay, camera straight down, no perspective or horizon.
- Prop positions were spelled out: spread around all four edges, cropped by the frame.
- Flux pushed whole props into corners, while Muse, which plans before drawing, put one cropped item on each edge and left the middle clear.
- The AI tell is now taste
- Fingers and short text are mostly fixed, while long text still slips: Nano Banana Pro turned Lived experience into Liver experience in December 2025.
- The tell is too much glow, drama, and nothing allowed to be plain.
- Describing a print process and asking for competent and slightly bland made posters look less AI.
- APIs move under you
- Models retire with weeks of notice and some providers quietly ignore parameters.
- OpenAI removed DALL-E 2 and 3 from its API on 12 May 2026.
- Keep the model in config and log what you actually got back.
Community Reactions
- Procedural graphics for pixel art
- One commenter had an LLM write simple drawing instructions for EGA-style scenes and said it worked well.
- They say this avoids grid alignment, palette, and high-frequency noise problems.
- Code beat gen AI for logos
- A commenter asked Opus to write Python that draws logos.
- They found it more consistent and easier to control than generative models.
- Video model for sprite sheets
- A commenter generated a video of a character action and split it into frames for a 2D game.
- They noted grid generation is cheap but inconsistency creeps in fast.
- Local generation gap
- One commenter said local Flux or Qwen gives results 1-2 years behind ChatGPT and takes up to 5 minutes per image.
- Another said a 16GB VRAM card handles most of this for free.
- Commercial use needs more
- A commenter said commercial pixel art needs PSD layers, real font text, strict brand palettes, and edits months later.
- Others suggested sketching yourself or using low-res 3D geometry as a reference image for restyling.
How to Apply
- Rewrite a prompt in camera terms
- Take one current image prompt and replace adjectives with camera, lens, print process, and placement.
- Run 5 images of each version on the same model and count the usable ones.
- Wrap providers in a thin interface
- Hide OpenAI, Gemini, and OpenRouter behind one generate(prompt, size) function.
- Move the model name to config and log request parameters and actual response size.
- Pick models by cost per usable image
- Run the same prompt 20 times on 3 candidate models and count usable results.
- Compare price x attempts and pick the cheapest.
- Do exact work in code
- Handle resizing, transparency, palettes, and layout with ordinary code like PIL or rembg.
- Build a hybrid pipeline where AI only does the creative part.
Try It
# Paste into Claude or ChatGPT (prompt version of the article's 'describe the camera' method)
You are an image-generation prompt engineer. Rewrite the scene below as a prompt that describes the camera and how it was made, not the view.
Scene: {{image you want}}
Use: {{game background / poster / product shot, etc.}}
Rules:
1. Start with camera position, perspective, and how the frame is filled. (e.g. orthographic flat lay, camera points straight down, no horizon)
2. State exactly where objects sit. (e.g. spread around all four edges, cropped by the frame)
3. List what must not be visible. (e.g. no walls, windows, or floor)
4. Do not use words like 'stunning' or 'hyper-detailed'.
5. Name a real print process or film stock if relevant.
Give me one English prompt and 3 lines on why you changed it.
Next step: run the old and new prompts 5 times each on the same image model and compare how many results are usable.Terminology
Related Papers
Cerebras Deploys Trillion-Parameter AI Models
Cerebras fits Kimi K3 (3T) across 59 wafers in a pipeline, serving 1000-2000+ tokens per second
DeepInfer: High-performance inference framework for DeepSeek models
DeepSeek open-sourced DeepInfer, its production inference engine, under Apache-2.0.
Mercury 3: Diffusion at scale
Scaling diffusion LLM 40x gives Mercury 3: 4–8x faster than speed-tier models, similar quality
DeepSeek banned from U.S. federal civilian agencies under new DHS order
DHS order bans DeepSeek from U.S. federal civilian agency IT systems
Timestral: Mistral's time-series foundation models
A 209M time-series model ranks first on three benchmarks and runs on CPU.
DeepSeek V4.1 Flash 1017 (Max)
DeepSeek V4.1 Flash 1017 Max scores 45 on the Intelligence Index at 211 tok/s and $0.30 input.
If you don't run your own LLM proxy, how do you know whats going on?
Running your own LLM proxy shows which keys, models, and cache misses drive your usage.
DeepSeek: DeepSeek v4.1 Flash 1017
DeepSeek V4.1 Flash 1017: $0.05/M input, 1M context, built for agents