Placement

Use placement to control how an image is positioned

expanded product with placement alignment top right Right Alignment
expanded product with placement alignment top left Left Alignment

Overview

The placement object in Firefly APIs provides a way to control how an image is positioned and sized in the final generation. It is an essential tool for specifying precise alignment or inset adjustments for your output. With placement, you can specify one of the following:

Placement with Alignment

The alignment option lets you position the image relative to the frame by specifying horizontal and vertical alignment.

"placement": {
    "alignment": {
        "horizontal": "left",
        "vertical": "top"
    }
}

This example aligns the image to the top-left corner of the frame.

Placement with Inset

The inset option defines margins (in pixels) from each side of the frame, effectively controlling the size and position of the image within the frame.

"placement": {
    "inset": {
        "left": 500,
        "top": 0,
        "right": 400,
        "bottom": 40
    }
}

This example places the image with: