bria/image-edit-expand, served by Comfy Router from Bria.
Quick start
Create a key at platform.comfy.org/profile/api-keys and export it asCOMFY_API_KEY. The Python and TypeScript snippets use the Comfy SDKs (pip install comfy-sdk, npm install @comfyorg/sdk); the cURL snippet is the same call over raw HTTP.
Model ID: bria/image-edit-expand
Endpoint: POST https://api.comfy.org/v2/models/bria/image-edit-expand
Schema
Input
object
Aspect ratio of the expanded canvas, either a predefined ratio string (“1:1”, “2:3”, “3:2”, “3:4”, “4:3”, “4:5”, “5:4”, “9:16”, “16:9”) or a float between 0.5 and 3.0. When provided, canvas_size, original_image_size, and original_image_location are ignored.
integer[]
Width and height of the expanded canvas in pixels. Defaults to [1000, 1000]. Maximum canvas area is 5000x5000 pixels.
string
required
The image to expand. Supported input types are Base64-encoded string or URL pointing to a publicly accessible image file. Accepted formats JPEG, JPG, PNG, WEBP.
string
A text prompt specifying concepts, styles, or objects to exclude from the expanded area.
integer[]
Position [x, y] of the original image’s top-left corner on the canvas. Required together with original_image_size when aspect_ratio is not provided.
integer[]
Width and height of the original image placed on the canvas. Required together with original_image_location when aspect_ratio is not provided.
boolean
Controls whether partially transparent areas from the input image are retained in the output.
string
Text prompt guiding the content generated in the expanded area. Auto-generated when omitted.
boolean
When enabled, applies content moderation to the prompt. Returns 422 if the prompt fails moderation.
integer
Seed for deterministic generation. If omitted, a random seed is used.
boolean
When false (default), the request is processed asynchronously. When true, the API holds the connection open until complete.
boolean
When enabled, applies content moderation to input visual. Returns 422 if the image fails moderation.
boolean
When enabled, applies content moderation to result visual. Returns 422 if the output fails moderation.
GET /v2/models/bria/image-edit-expand/openapi.json, the same document it validates a call against before the request reaches the provider.
Output
object
Error object (only present when status is ERROR)
integer
Error code.
string
Additional error details.
string
Error message.
string
Unique identifier for the request.
object
Result object (only present when status is COMPLETED)
string
URL of the generated/edited image.
string
Original prompt.
string
Refined version of the prompt.
integer
Seed used for generation.
string
The detailed JSON structured prompt.
string
URL of the generated video.
string
Current status of the request.Possible values:
IN_PROGRESS, COMPLETED, ERROR, UNKNOWNExamples
Input
Output
Before you ship
The snippets above are the shortest working call. Three things are the same for every model and are documented once on the Comfy Router headers page: send anIdempotency-Key on every paid call and reuse it when you retry, expect the connection to be held up to Router’s 10 minute deadline, and keep X-Comfy-Request-Id from every response. The SDKs do all three for you; the cURL tab does none of them. On failure, X-Comfy-Error-Type names the bucket, and a 422 means the body failed the model’s schema and was never billed.
Headers
Authentication, idempotency, request IDs, error buckets, retry pacing, spend limits.
Quick Start
Typed error handling in Python and TypeScript, reading the 422, walking the catalog.
Limitations
What Router does not do today, and what to use instead.