AI featured images for blog posts: one house style across the archive
The hard part is not generating an image, it is generating the two hundredth one so that it still looks like it came from the same publication as the first. That is a technique rather than a tool: a fixed style prefix you never edit, a subject line you always change, and one approved image passed as a reference on every call.
Stock libraries are a shared wardrobe. Everyone shops in the same aisle, so every article about productivity gets the same sunlit desk and the same anonymous hands on the same keyboard. It is not that the photos are bad — it is that they say nothing, and readers have learned to skip them. Generated imagery does not automatically fix that. Generated imagery with a house style does, because after ten posts the picture starts doing the job a masthead does.
Write the style once. Vary only the subject.
This is the whole technique. A fixed prefix that never changes, a variable subject that always does, and one approved image passed in referenceImages on every call.
“Flat vector editorial illustration, cream background, two-tone palette of warm yellow and near-black ink, thick uniform strokes, generous negative space, no text, no gradients, no photorealism”
…of a padlock dissolving into a flock of birds
…of a paper plane overtaking a queue of parcels
…of a bridge being built from both ends at once
…of a filing cabinet with one drawer full of light
The subject line is a metaphor, not a summary
“An article about API rate limiting” produces a picture of a computer. “A queue of paper planes waiting at a narrow gate” produces something a reader remembers. Ask for the image, not the topic — the style prefix is already doing the visual work, so this half only has to supply an idea worth drawing.
Subject lines, by category
Starting points for the half of the prompt that changes. Each is deliberately an object doing something rather than an abstraction — a model can draw a bridge being built, it cannot draw “interoperability”.
| Post is about… | Subject line |
|---|---|
| Security and privacy | …of a padlock dissolving into a flock of birds |
| Performance | …of a paper plane overtaking a queue of parcels |
| Integrations and APIs | …of a bridge being built from both ends at once |
| Data and storage | …of a filing cabinet with one drawer full of light |
| Debugging | …of a hand pulling a single thread from a tangle |
| Migration | …of a house carried by many small figures |
| Rate limiting | …of paper planes queueing at a narrow gate |
| Automation | …of a row of identical keys cut from one blank |
Where it fits in a publishing flow
Drafting, in the editor
The agent writing the post generates the featured image from the metaphor you gave it, drops it into the frontmatter and compresses it. The post is complete when the draft is.
Cursor setup →At build time
A build script checks each post for a missing image, generates one from the style string and subject line, and commits it. Nothing ships without a header.
Image generation API →Backfilling an archive
Two hundred old posts, a few dozen per multicall batch, all sharing the same reference image. The archive stops looking like five different eras of the same blog.
Batch endpoint →Unattended runs need a check step
Automation is where silent failures hurt, because nobody is looking at the output. Batches have no size cap and dispatch every item at once, so keep them in the tens. Check each item’s success flag rather than the batch’s, and if you are generating vector marks, read the warning in the next section before you run it over an archive.
The images inside the post matter more than the one on top
A featured image gets a glance on the way past. An illustration halfway down is what a reader stops at — and it is the thing that gets screenshotted and shared with a link back to you.
- Section dividers — A small vector mark per section, generated as SVG rather than a raster file.
- Concept illustrations — One per major idea, on the same style prefix, so the post holds together visually.
- Screenshot frames — Put a real screenshot into a generated device or environment with edit_image, at 8–30 credits depending on the model.
Before you automate vector marks
A failed SVG does not look like a failure
When vector generation cannot produce usable output, the endpoint does not error. It returns a fixed decorative placeholder — a card with a circle, a star and your prompt text printed across the bottom — with HTTP 200, success: true, and the full 5 credits deducted.
One of those in a draft is obvious. Two hundred of them committed by an overnight backfill is a bad morning. The placeholder is byte-identical every time, so it is easy to detect: check the returned SVG for its fixed signature before you write the file.
const isPlaceholder =
svgCode.includes('viewBox="0 0 500 500"') &&
svgCode.includes('#FBF9F1');
if (isPlaceholder) {
// treat as a failure: retry or skip the post
}What a post costs
At the standard model rate of 15 credits a generation, 5 for a vector mark and 1 per compression. A faster model brings the generation rate down to 8; a premium one takes it to 30.
| What you generate | Calls | Credits |
|---|---|---|
| Featured image only | 1 × generate_image, 1 × compress_image | 16 |
| Featured plus two inline illustrations | 3 × generate_image, 3 × compress_image | 48 |
| The above plus a vector section mark | + 1 × text_to_svg | 53 |
A weekly cadence at the full treatment is roughly 230 credits a month — comfortably inside the Starter plan’s 1,000. See plans →
Blog imagery questions
How do I keep two hundred posts looking like one publication?
Two things, and the second matters more than people expect. Write the style once as a fixed prefix stored in your repo or CMS, and append only the subject per post. Then pass one approved image in referenceImages on every call. The prefix handles medium and palette; the reference handles everything a sentence cannot describe, and it is a real image input to the model rather than a description folded into the prompt.
Should the post title be in the image?
No. Baked-in text cannot be translated, selected, restyled or read aloud, and a headline edit means regenerating the asset. The title is already on the page in real markup. Generate a text-free image and render the words over it in HTML or at build time — which also gives you a usable Open Graph image from the same asset.
What size should a featured image be?
16:9 covers the article header and the social preview in one asset, so ask for that ratio explicitly — omit aspectRatio and the request defaults to 1:1 and you get a square. Whatever pixel dimensions come back are the model’s decision. Only upscale if your theme genuinely renders the image full-bleed on large screens, and bear in mind there is no scale factor to request: the upscaler returns what it returns, so read the dimensions off the result.
Can I generate diagrams this way?
For decorative or conceptual illustration, yes. For a diagram that has to be technically correct — an architecture graph, a sequence of steps, anything a reader will act on — no. A generated flowchart looks convincing and says nothing, because the model is drawing the shape of a diagram rather than reasoning about your system. Author the structure yourself with a diagramming tool and keep generation for the atmosphere around it.
What does one post cost?
Sixteen credits for a featured image and its compression pass. Add two inline illustrations and it is 48; add a vector section mark and it is 53. At a weekly cadence with the full treatment that is roughly 230 credits a month, which sits comfortably inside the Starter plan’s 1,000 rather than needing anything larger.
Can I backfill an archive automatically?
Yes, and it is the best use of a batch endpoint here — but check the results rather than trusting them. Group posts into multicall requests of a few dozen; there is no cap on batch size and every item in a request is dispatched at once, so a two-hundred-item call would fire two hundred generations simultaneously. Impose your own limit and drive it from a queue that writes each URL back against its post.
Is a generated illustration better than a stock photo for SEO?
Neither is inherently better — search guidance evaluates the page rather than the provenance of the pixels. What helps is relevance and weight: an image that illustrates the specific argument, compressed properly, with alt text describing what is actually shown. The practical advantage of generating is that you can get an image about your exact point instead of the nearest stock approximation, and originality is worth something when the same desk photo appears on every competing article.