Bria AI Edit & Auto Download

Autonomously executes Bria AI operations, polls the status, and downloads the generated image

Expand Image (Outpainting)

AI-generated

Summary

Expands the provided image to the specified aspect ratio via outpainting, polls the generation status, and returns the resulting image as binary data.

Inputs

  • imageUrl (required) — The URL of the image. Alternatively, you can pass a base64 encoded string.
  • aspect_ratio — Target aspect ratio for outpainting (e.g. 16:9, 1:1, 4:3)
  • maxRetries — Maximum number of times to poll the status URL
  • waitTime — Time to wait between polling attempts in milliseconds

Output shape

Returns an object with json containing the full API response data and binary containing the downloaded image as image/png. If the operation does not complete within maxRetries, an error is thrown.

For non-structured_instruction operations (including expand_image), the binary data key 'data' holds the image; the json key holds the final response.

Links

Discussion