Firefly Services icon

Firefly Services

Interact with Adobe Firefly API

Expand Image (Async)

AI-generated

Summary

Submit an asynchronous request to expand an existing image by changing its aspect ratio or enlarging its canvas, optionally guided by a text prompt and mask for selective expansion.

Inputs

  • Source Image Upload ID (required) — The upload ID from Firefly's storage API of the image to expand.
  • Expand Options — Optional parameters that customize the expansion, including output width and height (pixels), horizontal and vertical alignment of the source image in the expanded canvas, optional margin insets (top, bottom, left, right), an optional mask upload ID for selective expansion, an invert mask flag, number of variations (1-4) to generate, optional text prompt to guide expansion (up to 1024 characters), and optional comma-separated seeds for deterministic variation generation.

Output shape

a JSON object representing the initiated async expansion job, including the job ID and status details.

The operation initiates the expansion asynchronously and returns job information. To retrieve completion status or results, use the 'Get Job Status' operation. The prompt, mask, and other options are applied to guide the expansion but are optional. Multiple variations can be requested, and seeds allow repeatable output if specified.

Examples

Example 1: Expanding an image to 2048x2048 pixels with centered alignment and a guiding prompt to add pine trees on the expanded edges.

Set 'Source Image Upload ID' to the stored image's upload ID, specify 'Expand Options' with width and height of 2048, horizontal and vertical alignment as 'center', and provide a prompt describing the desired content to add.

Discussion