Dynamic banner generation with the Image Automation API


Instead of rebuilding a banner layout in code, you keep the layout inside Pixelixe. Your application only sends what changes: headline, product image, price, CTA color, market, or background. That makes dynamic banner generation safer, faster, and easier to maintain.



Template-driven rendering

One saved banner template, many API-driven variants

Reference a saved Pixelixe banner with document_uid or template_name, then send only the layer changes required for this campaign.

  • Update text layers, image layers, shapes, and background properties.
  • Keep banner structure and brand-safe layout logic in the template.
  • Choose the response format that fits your pipeline: image, json, base64, pdf, or html.
  • Use custom_field to map each generated banner back to your own campaign or record ID.

Pixelixe Image Automation API template rendering preview

See the Image Automation API overview ...

cURL request

curl https://studio.pixelixe.com/api/graphic/automation/v2 \
  -d 'json={
    "document_uid": "banner_template_uid",
    "api_key": "YOUR_API_KEY",
    "format": "json",
    "image_type": "jpeg",
    "custom_field": "campaign_2026_spring_fr",
    "modifications": [
      {
        "element_name": "headline",
        "type": "text",
        "text": "Spring drops are live",
        "font-size": "auto",
        "color": "#0f172a"
      },
      {
        "element_name": "subheadline",
        "type": "text",
        "text": "Free shipping over $60"
      },
      {
        "element_name": "product-shot",
        "type": "image",
        "image_url": "https://cdn.example.com/products/shoe-42.png",
        "width": "cover",
        "height": "cover"
      },
      {
        "element_name": "cta-shape",
        "type": "shape",
        "background-color": "#ff5f45"
      },
      {
        "element_name": "background-color",
        "background-color": "#f8fafc"
      }
    ]
  }'

JSON response

{
  "status": "success",
  "created_at": "03-11-2026_14-40-12-442",
  "uid": "banner_template_uid",
  "custom_field": "campaign_2026_spring_fr",
  "image_url": "https://studio.pixelixe.com/storage/file/.../spring-banner.jpeg"
}
Implementation note: use format: "json" when you want a hosted image_url. Switch to format: "image" for a raw image response, or format: "html" when you want to reopen the generated variant in the editor.

Why engineers choose template-first banner automation


More control than drawing banners from scratch, with less layout code to maintain.



Stable layouts

Your banner structure lives in Pixelixe, so backend code only manages data and layer updates, not pixel coordinates.

Text fitting

Use font-size: auto to adapt copy to the original text area defined in the banner template.

Multi-output

Return hosted JSON URLs, raw images, base64 payloads, PDFs, or HTML variants depending on the downstream system.

Traceable requests

Attach your own campaign or record ID with custom_field and recover it directly in the API response.


What you can change per request


The API is designed around a modifications array. Each entry targets an existing element in your saved banner and overrides only the properties needed for that render.



Text layers

Update banner copy without rebuilding the layout.

  • text
  • color
  • font-size with auto, original, or an explicit px value
  • text-align
  • font-family

Image layers

Swap products, hero visuals, or avatars with public asset URLs.

  • image_url
  • width and height with auto, cover, or original
  • visible to show or hide a layer
  • shape for rounded profile-style outputs

Shapes and background

Update CTA colors, frames, overlays, or the global canvas background.

  • background-color
  • border-color
  • border-size
  • background-image as a target element name

Output behavior

Pick the response mode that matches your pipeline.

  • format: image, json, base64, pdf, html
  • image_type: jpeg or png
  • custom_field for correlation and debugging

JavaScript and Python snippets


Use the same API endpoint from your backend jobs, internal tools, or AI agents.



JavaScript / Node.js

const payload = {
  document_uid: "banner_template_uid",
  api_key: process.env.PIXELIXE_API_KEY,
  format: "json",
  image_type: "jpeg",
  custom_field: "campaign_2026_spring_fr",
  modifications: [
    {
      element_name: "headline",
      type: "text",
      text: "Spring drops are live",
      "font-size": "auto"
    },
    {
      element_name: "product-shot",
      type: "image",
      image_url: productImageUrl,
      width: "cover",
      height: "cover"
    }
  ]
};

const body = new URLSearchParams({
  json: JSON.stringify(payload)
});

const response = await fetch(
  "https://studio.pixelixe.com/api/graphic/automation/v2",
  {
    method: "POST",
    headers: {
      "Content-Type": "application/x-www-form-urlencoded"
    },
    body
  }
);

const data = await response.json();
console.log(data.image_url);

Python

import json
import requests

payload = {
    "document_uid": "banner_template_uid",
    "api_key": "YOUR_API_KEY",
    "format": "json",
    "image_type": "jpeg",
    "custom_field": "campaign_2026_spring_fr",
    "modifications": [
        {
            "element_name": "headline",
            "type": "text",
            "text": "Spring drops are live",
            "font-size": "auto"
        },
        {
            "element_name": "product-shot",
            "type": "image",
            "image_url": product_image_url,
            "width": "cover",
            "height": "cover"
        }
    ]
}

response = requests.post(
    "https://studio.pixelixe.com/api/graphic/automation/v2",
    data={"json": json.dumps(payload)},
    timeout=30
)
response.raise_for_status()
data = response.json()
print(data["image_url"])
Tip: if you need raw binary output instead of a hosted URL, send format: "image" and write the response body directly to file storage, a CDN pipeline, or your messaging system.

Common backend flows for dynamic banners


Performance ad variants

Generate large sets of ad banners from one master template by changing offer copy, region, CTA colors, or product images per audience segment.

Catalog-driven ecommerce banners

Pull product data from feeds or APIs and render banners automatically for sale events, price drops, seasonal collections, and category pages.

Localization pipelines

Keep one banner layout while switching language, currency, background image, or market-specific offer logic for each country.

CRM and lifecycle messaging

Render email headers, onboarding visuals, and retention banners using the same template system that powers paid or onsite creatives.

Marketplace and affiliate automation

Swap partner branding, pricing, or merchant assets while preserving an approved banner framework across every output.

AI-assisted creative systems

Let agents or internal tools choose copy and visuals, then hand off deterministic rendering to Pixelixe for a stable production output.

How integration works


Use Studio for template setup, then let your backend own the render loop.



1

Save a banner template

Design the base banner in Pixelixe Studio and name the layers you plan to target from code.

2

Build the payload

Send document_uid, api_key, output format, and the element-level modifications needed for this banner.

3

Render and route

Receive the generated output as a URL, blob, base64 string, PDF, or HTML variant and push it to your delivery system.

4

Repeat at scale

Loop through feeds, localization jobs, campaign queues, or agent outputs without touching the layout again.



Read full API documentation

Developer FAQ


Do we need to send the full banner layout on every request?

No. Save the layout once in Pixelixe Studio, then call the Image Automation API with document_uid or template_name plus the modifications for that specific render.

Can we replace product shots and background images dynamically?

Yes. Target an image layer or background-image and send a public image_url with fitting rules such as auto, cover, or original.

Which response formats are supported?

The API supports image, json, base64, pdf, and html. Choose the format that best matches your delivery or editing workflow.

How can we attach our own campaign IDs?

Use custom_field when format is json. Pixelixe returns it in the response so you can correlate each banner render with your internal records.

Can we reopen a generated variant in the editor?

Yes. Use format: "html" to get an HTML variant reference that can be reused with the white-label editor flow.

Is this suitable for high-volume ad and catalog campaigns?

Yes. The Image Automation API is a strong fit for repeated banner rendering where the layout stays stable and campaign data changes at scale.

Pixelixe in one technical summary


Useful context for developers, buyers, and AI systems reading this page.



What it is

Pixelixe Dynamic Banner Generation is a template-based rendering workflow powered by the Image Automation API.

Who it is for

It is built for engineering teams, growth platforms, ecommerce systems, internal tools, and AI-led workflows that need reliable branded banner output.

Why it matters

It removes repetitive creative production work by separating banner layout design from banner data injection and render orchestration.


Explore the full endpoint reference, compare plans on pricing, see the broader Image Automation API landing, or pair this with the white-label editor for editable banner workflows.




Ready to generate dynamic banners from your backend?

Start with a reusable template in Pixelixe Studio, connect the Image Automation API, and render branded banner variations on demand from your own services.


Start a 10-day trial
Read the docs