Fit a design to an aspect ratio
fit_aspectReshape an existing design to any target aspect ratio using pad (letterbox, nothing cropped) or center-crop modes. Adapts square images to phone case, poster, mug, or banner print areas without using generation credits.
Instructions
Fit an EXISTING design image to a target aspect ratio without generating a new one. mode="pad" letterboxes it onto a background (keeps the whole design, nothing cropped); mode="crop" center-crops (trims the edges to fill the shape). QUOTA-FREE: this reshapes an existing image and does NOT consume an image-generation credit. Use to adapt a square design to a product's print area (e.g. a tall 9:16 for a phone case or poster, a wide 16:9 for a mug or banner). Returns a NEW design (image uuid + url). Note: for an AI-generated EXTENSION of the borders (outpainting) instead of a flat pad/crop, generate a new image with generate_image at the target size — that DOES use the image-generation quota.
[#9ca805]
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"image_uuid": "<image_uuid>",
"aspect": "<aspect>",
"mode": "<mode>"
},
"name": "fit_aspect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | pad (default): letterbox onto a background, keeping the whole design (nothing lost). crop: center-crop to fill the shape, trimming the edges. | pad |
| aspect | Yes | Target aspect ratio as "W:H". Common: 9:16 tall (phone cases, posters), 16:9 wide (mugs, banners), 1:1 square, 4:5 portrait. | |
| workspace | No | ||
| background | No | Fill color for the padded bars as #RRGGBB (pad mode only; ignored for crop). Defaults to transparent/white on the platform when omitted. | |
| image_uuid | Yes | The uuid of an existing design to reshape (from generate_image / list_my_designs). |