Image Generation vs Bannerbear: Visual Editor or Programmatic API?

7 min read Image Generation

You Wanted Code, You Got a Visual Editor

You need to generate social cards for every blog post. Or product images for every SKU. Or certificates for every event attendee. The output varies per item, but the layout is the same. This is a solved problem — until you look at the tools.

Bannerbear gives you a visual editor to design templates. Drag text boxes, position images, set fonts. Then you call their API to fill in dynamic values — swap the title, change the photo, update the date. The API is straightforward. The problem is everything that happens before the API call.

Your templates live in Bannerbear’s web editor. They’re not files you can check into Git. They’re not JSON you can generate dynamically. They’re not code you can review in a pull request. They’re drag-and-drop designs stored on someone else’s platform, and the only way to change them is to open a browser and click around.

If you’ve ever tried to version-control a Figma file, you know this feeling. The source of truth isn’t in your codebase. It’s in a third-party tool, managed by whoever has login credentials, with a changelog that amounts to “someone changed something at some point.”

Templates That Aren’t Code

Bannerbear’s template model works like this: you design a template in their visual editor, name each dynamic field, and then call the API with a JSON payload that maps field names to values. The template itself — layout, positioning, fonts, colors — is locked in the editor.

This creates a few problems.

No version control. Template changes don’t show up in Git. You can’t diff two versions of a template. You can’t revert a bad edit. You can’t trace when a layout broke or who changed the font size from 36 to 24. The template’s history is whatever Bannerbear’s platform tracks internally — if it tracks anything at all.

No code review. When a designer tweaks a template, there’s no pull request. No review process. No CI check that validates the layout still works with your longest product title or your widest author name. The change goes live when someone clicks save.

No dynamic generation. You can’t write code that constructs a template based on runtime conditions. Want a two-column layout for short titles and a single-column layout for long ones? You need two separate templates in the editor. Want to add a QR code only for certain post types? Another template. The number of templates grows with every conditional, and each one is a manual design task.

No HTML or CSS. Bannerbear’s editor is the only way to define layouts. You can’t use the web technologies your team already knows. You can’t reuse your design system’s typography or color tokens. Every template is a standalone design inside their platform.

Layers, Not Templates

The Iteration Layer Image Generation API takes a different approach. There’s no visual editor. There’s no template builder. You define images as a stack of layers in JSON, and the API renders them into pixels.

Eight layer types cover what you need for programmatic image generation:

  • solid-color-background — a full-canvas fill
  • gradient — linear gradients with configurable angle and color stops
  • rectangle — positioned shapes with optional angled edges
  • text — with font selection, markdown formatting, and auto-scaling
  • static-image — images from URLs, with optional AI background removal and smart crop
  • image-overlay — compositing images on top of each other
  • qr-code — generated from any URL or string value
  • barcode — six formats including Code 128, EAN-13, and Codabar

Every property is explicit. Position in pixels, size in pixels, font size in pixels, color in hex. No drag-and-drop approximation — you specify exactly what you want and get exactly that back.

Here’s a social media card built from four layers:

import { IterationLayer } from "iterationlayer";

const client = new IterationLayer({ apiKey: "YOUR_API_KEY" });

const result = await client.generate({
  width_in_px: 1200,
  height_in_px: 630,
  format: "png",
  layers: [
    { type: "gradient", direction: "linear", angle_in_deg: 135,
      stops: [
        { color: "#1a1a2e", position: 0 },
        { color: "#16213e", position: 100 },
      ]},
    { type: "static-image", url: "https://example.com/author.jpg",
      x_in_px: 40, y_in_px: 40, width_in_px: 120, height_in_px: 120,
      remove_background: true },
    { type: "text", text: "**Building APIs That Compose**",
      x_in_px: 180, y_in_px: 50, width_in_px: 960, height_in_px: 100,
      font_family: "Inter", font_size_in_px: 36, color: "#ffffff" },
    { type: "qr-code", value: "https://iterationlayer.com/blog/post-slug",
      x_in_px: 1040, y_in_px: 490, width_in_px: 100, height_in_px: 100,
      fg_hex_color: "#ffffff", bg_hex_color: "#1a1a2e" },
  ],
});

A gradient background, an author photo with the background removed, a bold title, and a QR code linking to the post. Four layers, one API call, no editor required. This entire definition lives in your codebase — you can commit it, review it, test it, and generate it dynamically from your blog’s metadata.

Version Control Changes Everything

When templates are JSON, your existing development workflow applies without modification.

A designer wants to change the card’s background gradient. They update two hex values in a layer definition, open a pull request, and the team reviews the diff. The change is scoped, visible, and reversible. If the new gradient looks wrong in production, git revert fixes it in seconds.

Compare that to the Bannerbear workflow: log into the editor, find the template, click the background, change the color, save, hope nobody else was editing the same template, and trust that the change is correct because there’s no preview with real data in the editor.

The gap widens with scale. A publishing company generating covers for 500 books doesn’t want 500 templates in a visual editor. They want a function that takes a book’s metadata — title, author, genre, cover image — and constructs a layer stack dynamically. The “template” is code. The variations are infinite. The editor is a bottleneck that doesn’t need to exist.

Typography That Works

Text in generated images is deceptively hard. Fonts need to be available at render time, sizing needs to account for variable-length content, and formatting beyond plain text requires real effort.

Iteration Layer ships 98 bundled Google Fonts — Inter, Roboto, Open Sans, Montserrat, Playfair Display, and the rest of the catalog’s most-used families. If your brand uses a custom typeface, upload TTF, OTF, WOFF, or WOFF2 files and reference them by name.

Text layers support markdown formatting. Wrap a word in **double asterisks** and it renders bold. Wrap it in *single asterisks* and it renders italic. This means your dynamic text — blog titles, product names, user-generated content — can include inline formatting without building a separate text layer for each styled segment.

Auto-scaling text solves the variable-length problem. Define a bounding box and a maximum font size, and the renderer shrinks the text to fit. A 10-character title and a 60-character title both render cleanly in the same layout. No manual adjustment, no overflow, no truncation.

Bannerbear supports custom fonts through uploads, but the formatting and scaling capabilities are tied to what the visual editor exposes. You can’t apply markdown-style formatting or define auto-scaling behavior through code — you configure what the editor lets you configure.

AI on Every Image Layer

Image layers in the API include two AI-powered features that run at render time.

Background removal uses AI segmentation to isolate the foreground subject from the background. The social card example above uses remove_background: true on the author photo — the API strips the background and composites the cutout directly onto the gradient. No pre-processing step, no separate API call, no manual masking.

Smart crop uses AI object detection to identify subjects and crop around them. When your source images vary in composition — some centered, some off-center, some with lots of negative space — smart crop finds the subject and frames it consistently.

Both features are properties on image layers. Add remove_background: true or smart_crop: true and the AI processing happens as part of the render pipeline. No separate service, no add-on pricing, no premium tier.

Beyond Flat Rectangles

Every layer supports opacity and rotation, which means compositing and angled layouts are part of the base API. Overlay a semi-transparent logo at 30% opacity. Rotate a text label 45 degrees for a diagonal watermark. These are per-layer properties, not special effects.

Rectangle layers support angled edges — non-rectangular shapes where individual corners can be cut at angles. Combined with gradients and opacity, this lets you build layouts with geometric design elements that would otherwise require pre-rendered assets.

Output formats cover the full range: PNG, JPEG, WebP, TIFF, GIF, and AVIF. Generate a PNG for high-fidelity social cards, a WebP for web-optimized thumbnails, or an AVIF for maximum compression. The format is a parameter on the request, not a post-processing step.

Side-by-Side

Capability Bannerbear Iteration Layer
Template authoring Visual editor (browser) JSON layers (code)
Version control Not possible Standard Git workflow
Code review Not possible Standard PR workflow
Dynamic template generation No — one template per variation Yes — construct layers programmatically
HTML/CSS support No No — layer-based API instead
Bundled fonts Limited set 98 Google Fonts
Custom font upload Yes Yes (TTF, OTF, WOFF, WOFF2)
Markdown in text No Yes
Auto-scaling text Limited Built-in per text layer
AI background removal No Yes, per image layer
AI smart crop No Yes, per image layer
QR codes No native support Built-in layer type
Barcodes No 6 formats
Per-layer opacity Limited Yes, all layers
Per-layer rotation Limited Yes, all layers
Output formats PNG, JPEG PNG, JPEG, WebP, TIFF, GIF, AVIF
Pricing $49/mo for 1,000 credits
Data residency US-hosted EU-hosted (Frankfurt)

When Bannerbear Makes Sense

Bannerbear works well for teams where non-developers own the template design process. If your marketing team needs to create and iterate on visual templates without writing code, the visual editor is the point — not the limitation. The drag-and-drop workflow is faster for one-off designs than writing JSON by hand.

But if your templates are generated from data. If your layouts need to adapt to variable content. If you want your image generation logic in the same codebase as the rest of your application — reviewed, tested, and deployed through the same pipeline. Then you don’t need an editor. You need an API that speaks the same language as your code.

Get Started

Check the docs for the full layer reference, font catalog, and SDK guides. The TypeScript and Python SDKs handle authentication and response parsing — define your layers, call the API, and get pixels back.

Image Generation is one API in a composable suite — chain it with Document Extraction to turn parsed data into visual assets, or with Image Transformation to post-process the output. Same auth, same credit pool.

Sign up for a free account at iterationlayer.com/image-generation — no credit card required.

Start building in minutes

Free trial included. No credit card required.