Skip to main content
POST

Overview

Starts growing an image to the aspect ratio you ask for. The original is centred on the larger canvas at its own size and the new area is generated, optionally guided by a prompt. The result is a new image in your library; the original is not modified. The call answers 202 with the id of the pending image. Poll Get Image on that mediaId until its status is COMPLETED; its url is the expanded image.
Pass media (an image of your library) or imageUrl (imported into your library first); when both are sent, media is used. Accepted formats: JPEG, PNG and WEBP, up to 25 MB. An image that already has the requested ratio is rejected with 400.

Credits

Errors

If Bria fails after accepting the job, the new image ends as status: "FAILED" in Get Image and the credits are refunded.

Get Image

Follow the expansion and read the result

Remove Image Background

Cut the subject out with a transparent background

Authorizations

x-api-key
string
header
required

Headers

Idempotency-Key
string

Makes the request safe to retry. 1-255 printable ASCII characters, one per operation (your job id, or a UUID you store), reused on every retry. Within 24 hours the same key with the same body answers with the first response and the header Idempotent-Replayed: true, without running or charging again. Keys are scoped to your team and the endpoint. 5xx answers and refusals before anything ran (401, 402, 403, 409, 429) are not kept. See Idempotency.

Required string length: 1 - 255
Pattern: ^[\x20-\x7E]+$

Body

application/json
aspectRatio
enum<string>
required

Target aspect ratio. An image that already has it is rejected with 400.

Available options:
ratio_9_16,
ratio_1_1,
ratio_16_9
media
string

ID of an image in your media library. Required unless imageUrl is given. When both are sent, media is used. A media that is not COMPLETED yet (an import or upload in progress) answers 400 media: Media "<id>" is not ready (status PROCESSING).

imageUrl
string<uri>

Public URL of a JPEG, PNG or WEBP image (up to 25 MB). It is imported into your library first, so the result is attached to a media you own. Required unless media is given.

prompt
string

What the new area should show (up to 500 characters). Without it the scene is continued from the image itself.

Maximum string length: 500

Response

Expansion started

success
boolean
message
string
data
object