MCP/Tools/Images/generate_image
generate_image

Generate an ad creative image

Medium cost

Generate a single (or multi-aspect-ratio batch) ad creative from a director-style prompt, with optional brand kit + logo composite.

How it works

The workhorse image tool. Pass a prompt, optionally hand it a brandId — the tool weaves your brand colors, voice, aesthetic, and saved logo into the render. Supports every Claivra-supported aspect ratio plus ad-spec presets like 1.91:1 (auto-resized to the exact 1200×628 Google Display Network spec). Pass an array via aspectRatios and the tool produces one image per ratio in a single bounded-concurrency batch.

Inputs

Name
Type
Required
Description
prompt
string
required
Director-style brief describing the image to render.
model
'claivra-v1' | 'claivra-v2'
optional
v1 = Gemini (photorealism, 1 credit). v2 = OpenAI (best for text/posters, 4 credits). Default v1.
aspectRatio
string
optional
Single ratio (1:1 default). Use aspectRatios for batch.
aspectRatios
string[]
optional
Multi-ratio batch — renders one image per ratio in parallel.
brandId
string
optional
Brand kit ID — wires colors + logo + voice into the prompt automatically.
logo
{ data: base64, mimeType: string }
optional
Override the brand's saved logo for this generation only.
referenceImages
Array<{ data, mimeType }>
optional
Style references the model anchors to.
cta
string
optional
CTA button text to overlay on the image.
tone
string
optional
Tone descriptor woven into the prompt.

Returns

{ imageId, imageUrl, mimeType } — or an array of refs when aspectRatios has 2+ entries.

Examples

Square ad with brand kit applied

Agent generates a 1:1 hero ad for a client's automotive brand. Brand colors, fonts, and logo are baked in via brandId.

{
  "prompt": "Hero shot of a green Rivian R1S parked in a sleek modern showroom with dramatic accent lighting. Bold headline overlay: 'EVs that mean business.' CTA pill bottom-center.",
  "model": "claivra-v1",
  "aspectRatio": "1:1",
  "brandId": "aBmbZETe9gUZhwXHCE02",
  "cta": "Get Your Quote"
}

Square + Google Ad in one call

Generate the same concept at both 1:1 (Instagram feed) and 1.91:1 (Google Display Network) — resized server-side to the exact 1200×628 spec.

{
  "prompt": "Minimalist studio shot of a Tesla Model S with bold typography overlay 'Drive into the future.'",
  "aspectRatios": [
    "1:1",
    "1.91:1"
  ],
  "brandId": "ectL5JsJKz55ItiFzEkB"
}