Ad Creative Variants from One Template

Ad creative testing dies when every headline is a new file in Figma. An ad creative generator API removes that step. Keep the frame in jsontoimg. Enumerate headline × product crop × CTA as JSON rows, render a batch of 50, and let the ad account pick a winner.

Variation matrix, not 50 templates

If you have 5 headlines and 4 products, that is 20 jobs — one batch. 8 headlines × 10 products is 80 jobs: two batches. Name layers headline, price, cta, product. Do not fork templates per campaign unless the layout actually changes.

{
  "jobs": [
    {"template":"<id>","format":"jpg","layers":{"headline":{"text":"Free shipping"},"cta":{"text":"Shop now"}}},
    {"template":"<id>","format":"jpg","layers":{"headline":{"text":"Members save 15%"},"cta":{"text":"Join"}}}
  ]
}

Code for building the matrix: automate ad variations.

Platform specs are not yours to choose

A matrix renders rejected ads as efficiently as good ones. Meta’s ad creative reference documents the fields and image constraints a creative has to satisfy before it will run, and the limits differ by placement — a square feed asset is not a story asset. Encode the constraint in the template and render per placement, rather than scaling one file and hoping.

Keep the text light. Heavy text-over-image historically suppressed delivery and still reads badly at feed size. The headline belongs in the ad copy fields; the image carries the product and one short line.

Enough traffic to read the result

Rendering 240 variants costs 240 credits. Measuring them costs budget, and that is the real constraint. A sample-size calculator will tell you how many impressions a detectable difference needs — split a modest budget forty ways and every cell lands in the noise.

So test in rounds. Enumerate the full matrix in JSON because it is free to generate, then ship one axis at a time: four headlines against a fixed background, winner forward, then four backgrounds against the winning headline. The variation matrix walkthrough has the script and the file-naming scheme that keeps results analysable.

Related

FAQ

How do I A/B ad images without a designer per variant?

One template, a list of headlines and CTAs in JSON, POST /api/v1/renders/batch (max 50). Upload the files to Meta/Google. The layout stays pinned; only named layers change.

What about creative fatigue?

When a winner decays, change copy in data — not in Figma. Keep the brand kit in the template. Rotate headlines weekly from a sheet via n8n HTTP.

Does jsontoimg run the A/B test?

No. It renders the set. Your ad manager scores CTR. jsontoimg is the factory, not the experiment platform.

Get 25 free images →