Image collage
Image collage is an API that combines several photos into one, in a grid (contact-sheet style). Each image is fitted inside its cell without cropping or distorting it.
How it works
You send an array of images (2 to 30) and get back one image with all of them arranged in a grid. The number of columns is calculated automatically (as close to square as possible) if you don't set it.
All you need
- Your API key. Create it in your dashboard with "+ Create key".
- In your automation platform, an "HTTP Request" step (n8n, Make, Zapier, Pipedream…).
How to use it in n8n
- Method:
POST· URL:https://api.cofferdock.com/image-collage - Send Headers:
x-api-key= your key,Content-Type=application/json - Send Body (JSON):
{ "images": ["<base64 1>", "<base64 2>", "<base64 3>"] } - In Options → Response → Response Format: choose File
Options
| Option | Default | What it does |
|---|---|---|
images | - | Required. Array of 2 to 30 base64 images. |
columns | automatic | How many columns. |
cell_width, cell_height | 400 | Each cell's size in pixels. |
gap | 10 | Spacing in pixels between images and at the edge. |
background | #ffffff | Background color in cells and gaps. |
API overview
- Endpoint:
POST https://api.cofferdock.com/image-collage - Auth:
x-api-key: YOUR_KEY. - Input: JSON ONLY (several binaries can't travel raw in one body).
- Engine: sharp. Each image is fitted with
fit: inside(never crops) and centered in its cell. - Limits: 30 requests/min per IP. Final canvas up to 60 megapixels. 1 call = 1 credit, no matter how many images.
Example
curl -X POST "https://api.cofferdock.com/image-collage" \
-H "x-api-key: YOUR_KEY" -H "Content-Type: application/json" \
-d '{"images":["...","...","..."],"columns":3}' \
--output collage.png
Response
{ "success": true, "image": "iVBORw0KGgo...", "mime_type": "image/png",
"meta": { "count": 3, "columns": 3, "rows": 1, "width": 1230, "height": 420,
"size_bytes": 84213, "used": 12, "remaining": 488 } }
What you get back
By default (JSON): image as base64. Add output=image for the raw binary, or output=url for a temporary link.