DEV Community

Yanis KETO
Yanis KETO

Posted on

How I shot a full product ad campaign from inside Claude Code (no studio, no photographer)

A commercial product shoot runs $500 to $2,000 a day, plus a stylist, a retoucher, and weeks of lead time. I was about to launch a side project, needed product creative, and had none of that. The usual fallback is a stock photo, or a tab-out to Midjourney or Figma. Instead I shot the whole campaign from inside Claude Code: one hero product shot, a model holding the identical product, every social aspect ratio, and a finished ad with an on-image headline. About 35 tokens, under a dollar.

The tool is AgentBrush, an MCP server that gives an AI coding agent (Claude Code, Cursor, Codex, Gemini CLI) the ability to generate images and write them straight into your repo. Here's the exact workflow, with the real prompts and what each step costs. (Building a game instead of a brand? The same flow makes a sprite set. Swap in the game prompts.)

The math that kills most small-brand shoots

A studio day is $500 to $2,000 before the stylist and the retoucher, and you wait weeks for the slot. For a pre-launch product that stops most shoots before they start, so you ship with a stock photo that looks like everyone else's, or a flat-lay you shot on your desk.

The campaign in this post (a hero shot, a lifestyle ad, two more aspect ratios, and a finished poster with text) came to about 20 tokens. At Starter pricing that's well under a dollar. There's a real tradeoff and I'll be honest about it at the end, but for marketing and fast iteration it removes a genuine bottleneck.

Wiring the image tool into your agent (two minutes)

AgentBrush runs as an MCP server your agent talks to over stdio. After you create an account on the billing page, it's three terminal commands:

# 1. install the server
npm install -g @agentbrush/mcp-server

# 2. authenticate (opens a browser, click Approve)
agentbrush-mcp init

# 3. connect your agent (Claude Code)
claude mcp add agentbrush --scope user -- agentbrush-mcp
Enter fullscreen mode Exit fullscreen mode

For Cursor and other MCP clients, add it to your mcp.json:

{
  "mcpServers": {
    "agentbrush": { "command": "agentbrush-mcp" }
  }
}
Enter fullscreen mode Exit fullscreen mode

That's it. From here you talk to your agent in plain language and it calls agentbrush_generate with the right preset.

The hero shot: one prompt, the realistic preset

Start with a clean hero. Describe the product, the light, and what's not in the frame. The realistic preset is tuned for photographic material and lighting:

A premium crème brûlée bubble tea in a wide-bottomed tulip glass with a straw:
dark tapioca pearls at the base, iced milk tea, a pale custard layer, and a
torched caramel crust on top. Studio product photo, cool grey tones, soft
daylight, smooth concrete backdrop, shallow depth of field. No text, no labels.
preset: realistic · quality: medium · 2:3 portrait
Enter fullscreen mode Exit fullscreen mode

A premium crème brûlée bubble tea, the hero product shot

That's about 5 tokens at medium quality and 1 at low. Swap the subject for your own product. One caveat up front: glass and other reflective surfaces are the hard case, which is exactly why the next step matters.

Lock the product into a scene with a reference image

A hero shot sells the product. A person holding it sells the brand. The trick is keeping the product identical when it moves into a new scene, and the tool for that is the reference image. Pass the hero shot back in and the model anchors to it instead of inventing a new product:

A premium social ad in cool grey tones: a stylish person in a beige trench coat
holding the exact drink from the reference image, soft smile, concrete minimalist
setting, soft daylight. Keep the drink identical to the reference.
preset: realistic · quality: medium · 2:3 portrait · reference: the hero shot
Enter fullscreen mode Exit fullscreen mode

The same drink carried unchanged into a lifestyle ad

The pearls, the caramel top, the glass all carry over, because the model is holding the actual product rather than a description of it. If you want the detail on how references behave, I wrote it up in the reference-images guide.

One shoot, every aspect ratio

Social wants the same creative in different shapes: a vertical story, a wide banner. Re-run the approved ad at each size and pass the first ad as the reference so the person and the product don't drift:

Re-run the approved ad at 9:16 for stories and 16:9 for a wide banner with open
space on one side for a headline. Pass the previous ad as the reference so the
person and the drink stay identical.
preset: realistic · quality: medium · reference: the approved ad
Enter fullscreen mode Exit fullscreen mode

The campaign re-cut to a 16:9 wide banner

Add the headline: legible on-image text, even bilingual

To ship it as a real ad, add the copy. Two things matter. First, switch to the custom preset, because the photographic presets render a clean photo and skip overlaid type. Second, keep the prompt short: a reference image is a strong influence, so name the reference, state the pose and the text, and stop.

A premium bubble-tea ad poster, cool grey tones, clean text. The person from the
reference holds up and shows the drink, smiling. Headline: "Crème Brûlée Bubble
Tea", with "焦糖珍珠奶茶" below it.
preset: custom · quality: high · reference: the approved ad
Enter fullscreen mode Exit fullscreen mode

The finished ad with a bilingual headline

That short prompt held the model, the product, and the palette from the reference, and rendered both the English and the Chinese headline cleanly. gpt-image-2 is reliable on short display text like this, including non-Latin scripts. It's dense paragraphs where text rendering falls apart. The high-quality render is about 20 tokens.

One hero, one model, four ready-to-post assets. Call it 35 tokens for the campaign, under a dollar, versus an $800-plus studio day.

Where it breaks (so you can plan for it)

I'd rather you hit these knowing they're coming:

  • Glass and reflective finishes. Glass, chrome, and polished steel are the hard case. The drink above is glass, which is why the reference image does the heavy lifting: it holds the shape and the layers steady across scenes. Matte, ceramic, fabric, and wood read more reliably.
  • Fine label text. The model invents convincing label copy that won't match your real packaging. Fine for hero and lifestyle shots; for compliance or detail shots, use a camera.
  • Exact product fidelity. For warranty, documentation, or anything that must depict the physical item precisely, shoot a photo. This is for marketing, scene variety, and fast iteration.

For transparent cut-outs (a product on a clean alpha background for a marketplace listing), generate on white, then remove the background locally at zero tokens. The transparent-PNG guide has the full method.

Try it

If you build with an AI coding agent and keep shipping products without launch creative, the full tool list and the brand-identity setup are at agentbrush.dev, and the full version of this campaign (every prompt, the cost math) is in the product-photography writeup. It's a paid MCP server (Starter is $6.99/mo, and the README is honest about why it costs money: every generation is a real GPU call). It's v1 and there are two of us on it, so the question I actually care about: what would you want your agent to generate that it can't yet?

Top comments (0)