Images

Combine several images into a grid

Combines 2 to 30 images into one, in a grid, each fitted inside its cell without cropping. 1 call = 1 credit no matter how many images.

Costs 1 credit per call.

post/image-collage

Request

  • Base URL: https://api.cofferdock.com
  • URL: https://api.cofferdock.com/image-collage
  • Auth: API key in header x-api-key

Request body

imagesstring[] required

The images to combine: 2 to 30 base64-encoded images (about 4 MB in total), placed left to right and top to bottom in the order given.

columnsinteger

Number of columns in the grid, from 1 up to the number of images. Default: automatic and as square as possible (the square root of the image count, rounded up).

cell_widthinteger

Width of each cell in pixels (32-4000); every image is scaled to fit inside its cell, never cropped. Default 400.

cell_heightinteger

Height of each cell in pixels (32-4000); every image is scaled to fit inside its cell, never cropped. Default 400.

gapinteger

Space between the images and around the edges, in pixels (0-200). Default 10.

backgroundstring

Background color as a hex code, "#rgb" or "#rrggbb". Default "#ffffff" (white).

format'jpeg' | 'png' | 'webp'

Output image format: "png" (default), "jpeg" or "webp".

output'json' | 'binary' | 'url' | 'image'

How to return the image: "json" (base64 in the JSON response), "binary" (the image itself, ready for n8n/Make/Zapier) or "url" (a temporary download link, valid 15 minutes). Default: json when the request is JSON, binary when the input was sent raw.

Response

The resulting image (shape depends on output).

OR

Changes

No recorded changes to this operation across all 1 revision of this API.