---
title: "Photo Collage API: Fixed Slots, Any Photos"
description: "A photo collage API fills fixed slots from a list of image URLs. Before-and-after pairs, listing grids, and why a fixed canvas is the feature. Start free."
url: "https://www.imejis.io/blogs/use-cases/photo-collage-api"
published: "2026-09-22"
---

# Photo Collage API: Fixed Slots, Any Photos

A photo collage API takes a list of image URLs and returns one composed picture. You lay out the slots once, mark them dynamic, and every render after that drops new photos into the same geometry.

That last part is the whole value, and it's the part a drag-and-drop collage tool can't give you. When a design's dimensions are fixed and its slots don't move, 400 property listings come out with the photos in identical positions. Nobody nudges anything.

The [photo collage maker](/tools/photo-collage-maker) covers the one-off case free in the browser. This is about the batch.

## A fixed canvas is the feature here

Width and height are set at design time and can't be overridden per render. For collages, that constraint is doing real work.

A collage is a spatial promise: the main shot is large and top-left, the details run along the bottom, the label sits in the corner. Break that promise between one listing and the next and a gallery of them looks like it was assembled by different people. Fixed slots keep the promise mechanically.

It also means the design _is_ the layout decision. A 2-up before-and-after, a 3-up detail strip and a 6-up grid are three designs, not one design with a photo count parameter. That sounds like more work than it is: each takes minutes, and after that they never drift.

## Each slot fits its own photo

Photos arrive in whatever shape the camera or the seller gave you. The image layer handles that per slot with `imageSize`, which maps to CSS object-fit:

| Slot job                    | `imageSize`                | Why                                                              |
| --------------------------- | -------------------------- | ---------------------------------------------------------------- |
| Hero shot in a listing grid | `cover`                    | Fill the slot; a crop is fine and edge-to-edge looks intentional |
| Product on white            | `contain`                  | Cropping a product is worse than letterboxing it                 |
| Mixed user uploads          | `cover` with a focal point | Predictable framing across photos you don't control              |
| A logo or badge slot        | `none`                     | Native size, no scaling, no softness                             |

`imagePosition` sets the focal point for a crop, following the same rules as CSS [object-position](ref:developer.mozilla.org/en-US/docs/Web/CSS/object-position), so a room photo can favour `center` while a portrait favours `top`. [Release note images](/blogs/use-cases/screenshot-generator-api) goes deeper on those fit rules if you want the full table.

## Before and after, which is the easiest win

Two slots, a divider, two labels. It's the smallest useful collage and the one people rebuild by hand most often:

```bash
curl -X POST 'https://render.imejis.io/v1/YOUR_DESIGN_ID' \
  -H 'dma-api-key: YOUR_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "left":       { "image": "https://cdn.example.com/jobs/812/before.jpg" },
    "right":      { "image": "https://cdn.example.com/jobs/812/after.jpg" },
    "left_label": { "text": "March" },
    "right_label":{ "text": "August" }
  }' \
  --output job-812.png
```

The alignment is identical on every job because it's baked into the design. Renovation work, fitness progress, restoration, cleaning services: same shape of problem, same three-minute setup.

## Where a collage API stops being the right tool

Worth saying plainly, because it saves you a wasted afternoon.

**If the layout should change per photo set, this isn't it.** A design has fixed slots. Software that reflows a grid to suit 3 photos or 11 is a different product, and building that on fixed designs means one design per count.

**If you need the photos edited, not placed.** Background removal, colour correction, retouching: none of that happens here. Do it upstream and pass the finished URLs.

**If it's one collage.** Use the [free maker](/tools/photo-collage-maker). We'd rather you did that than wire up an API for something you do once, because automating a one-off is a hobby, not a saving.

## What a photo collage API costs

One render per collage, regardless of how many photos are in it. That's the detail worth knowing, because it makes the arithmetic simple: a 6-photo grid costs exactly what a 2-photo pair costs.

As of September 2026, 100 free renders a month, no card. An agency producing before-and-after images for 40 jobs a month stays free. An estate agency generating a listing collage for 900 properties a month is 900 renders, which is Basic at $14.99. The [pricing page](/pricing) has the rest, and [render quota](/help/pricing-and-quota) explains the counters.

## Getting started

Build the grid in the [collage maker](/tools/photo-collage-maker) until the proportions feel right, then rebuild it as a design with one [image layer](/components/image) per slot and mark each one dynamic. The [API docs](/apis) have tested calls, and [dynamic fields](/help/dynamic-fields) covers which properties to open per slot.
