## Basic model info - Model name: bria/bria fibo-edit-1.5 - Model description: Bria FIBO-Edit-1.5 image editing family. edit follows a plain-language instruction alone or with up to four reference images (object and character combinations, virtual try-on, background replacement, style transfer), optionally limited to a mask; expand extends an image beyond its borders to any of nine aspect ratios or a custom canvas up to 25 megapixels. $0.04 per image. - Endpoint name: expand ## Model schema The model schema is defined in the OpenAPI schema: [OpenAPI Schema](https://oapi.sunra.ai/main/bria/fibo-edit-1.5/latest.json) ### Model input schema The model input schema is: ```json { "description": "Input schema for FIBO Edit 1.5 image expansion (outpainting).", "properties": { "prompt": { "anyOf": [ { "maxLength": 1000, "type": "string" }, { "type": "null" } ], "description": "What should appear in the expanded area (English). Omit it to simply extend the image, which is usually what you want for a plain canvas change.", "title": "Prompt", "x-sr-order": 201 }, "aspect_ratio": { "anyOf": [ { "enum": [ "1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9" ], "type": "string" }, { "type": "null" } ], "description": "Aspect ratio of the final image. The original is centred and the canvas grown around it. Takes precedence over canvas_size, original_image_size and original_image_location.", "title": "Aspect Ratio", "x-sr-order": 401 }, "seed": { "anyOf": [ { "maximum": 2147483647, "minimum": 0, "type": "integer" }, { "type": "null" } ], "description": "Reuse the seed from a previous response to recreate that result.", "title": "Seed", "x-sr-order": 501 }, "canvas_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "description": "Size of the final image as [width, height]; the area must be under 25 megapixels. Required when aspect_ratio is not set. Pairs with original_image_size and original_image_location.", "examples": [ [ 1920, 1080 ] ], "title": "Canvas Size", "x-sr-order": 402 }, "image": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "string" } ], "description": "The image to expand (public URL).", "title": "Image", "x-sr-order": 301 }, "original_image_location": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "description": "Top-left corner of the original within the canvas as [x, y]. May sit outside the canvas, in which case the original is cropped. Ignored when aspect_ratio is set.", "title": "Original Image Location", "x-sr-order": 404 }, "original_image_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "description": "Size of the original inside the canvas as [width, height]; it is resized to this before being placed. Ignored when aspect_ratio is set.", "title": "Original Image Size", "x-sr-order": 403 }, "preserve_alpha": { "default": true, "description": "Keep the input's transparency by extending its alpha channel outwards.", "title": "Preserve Alpha", "type": "boolean", "x-sr-order": 406 }, "retain_original_quality": { "default": true, "description": "Keep the original's own pixels at full resolution. Generation happens near one megapixel and a larger canvas is scaled up afterwards; leave this on unless you want the model's output as-is.", "title": "Retain Original Quality", "type": "boolean", "x-sr-order": 405 } }, "required": [ "image" ], "title": "ExpandInput", "type": "object" } ``` ### Model output schema The model output schema is: ```json { "anyOf": [ { "description": "Edited image plus the structured instruction the model ran.", "properties": { "image": { "properties": { "content_type": { "description": "The mime type of the file.", "title": "Content Type", "type": "string" }, "file_name": { "description": "The name of the file. It will be auto-generated if not provided.", "title": "File Name", "type": "string" }, "file_size": { "description": "The size of the file in bytes.", "title": "File Size", "type": "integer" }, "url": { "description": "The URL where the file can be downloaded from.", "title": "Url", "type": "string" } }, "required": [ "content_type", "file_name", "file_size", "url" ], "title": "SunraFile", "type": "object" }, "structured_instruction": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "description": "Structured instruction the model ran; pass it back as structured_instruction to reproduce or refine the edit.", "title": "Structured Instruction" } }, "required": [ "image" ], "title": "EditOutput", "type": "object" }, { "description": "Expanded image plus the seed that produced it.", "properties": { "seed": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "description": "Seed used for the expansion.", "title": "Seed" }, "image": { "properties": { "content_type": { "description": "The mime type of the file.", "title": "Content Type", "type": "string" }, "file_name": { "description": "The name of the file. It will be auto-generated if not provided.", "title": "File Name", "type": "string" }, "file_size": { "description": "The size of the file in bytes.", "title": "File Size", "type": "integer" }, "url": { "description": "The URL where the file can be downloaded from.", "title": "Url", "type": "string" } }, "required": [ "content_type", "file_name", "file_size", "url" ], "title": "SunraFile", "type": "object" } }, "required": [ "image" ], "title": "ExpandOutput", "type": "object" } ], "title": "Response Get Request Result Requests Request Id Get" } ``` ## Example inputs and outputs Use the following example inputs and outputs to understand the model. ### Input example ```json { "prompt": null, "aspect_ratio": null, "seed": null, "canvas_size": [ 1920, 1080 ], "image": "", "original_image_location": null, "original_image_size": null, "preserve_alpha": true, "retain_original_quality": true } ``` ### Output example ```json { } ``` ## Model code examples ### JavaScript ```javascript import { sunra } from "@sunra/client"; const result = await sunra.subscribe("bria/fibo-edit-1.5/expand", { input: { prompt: null, image: '', aspect_ratio: null, canvas_size: [ 1920, 1080 ], original_image_size: null, original_image_location: null, retain_original_quality: true, preserve_alpha: true, seed: null }, logs: true, onQueueUpdate: (update) => { console.log(`Status Update: ${update.status}, Request ID: ${update.request_id}`); }, }); console.log(result.data); console.log(result.requestId); ``` ### Python ```python import sunra_client result = sunra_client.subscribe( "bria/fibo-edit-1.5/expand", arguments={ "prompt": None, "image": "", "aspect_ratio": None, "canvas_size": [1920, 1080], "original_image_size": None, "original_image_location": None, "retain_original_quality": True, "preserve_alpha": True, "seed": None }, with_logs=True, on_enqueue=print, on_queue_update=print, ) print(result) ``` ### Java ```java import ai.sunra.client.*; import java.util.Map; import com.google.gson.JsonObject; var client = SunraClient.withEnvCredentials(); var response = client.subscribe( "bria/fibo-edit-1.5/expand", SubscribeOptions.builder() .input(Map.of( "prompt", null, "image", "", "aspect_ratio", null, "canvas_size", 1920,1080, "original_image_size", null, "original_image_location", null, "retain_original_quality", true, "preserve_alpha", true, "seed", null)) .resultType(JsonObject.class) .onQueueUpdate(update -> System.out.printf( "\nStatus Update: %s, Request ID: %s%n", update.getStatus(), update.getRequestId() )) .logs(true) .build() ); System.out.println("Completed!"); System.out.println(response.getData()); ``` ### Kotlin ```kotlin import ai.sunra.client.kt.* import com.google.gson.JsonObject val client = createSunraClient() val response = client.subscribe( endpointId = "bria/fibo-edit-1.5/expand", input = mapOf( "prompt" to null, "image" to "", "aspect_ratio" to null, "canvas_size" to 1920,1080, "original_image_size" to null, "original_image_location" to null, "retain_original_quality" to true, "preserve_alpha" to true, "seed" to null), options = ai.sunra.client.kt.SubscribeOptions(logs = true), onUpdate = { update -> println("\nStatus Update: ${update.status}, Request ID: ${update.requestId}") } ) println("Completed!") println(response.data) ``` ### Curl ```bash curl --request POST \ --url https://api.sunra.ai/v1/queue/bria/fibo-edit-1.5/expand \ --header "Authorization: Key $SUNRA_KEY" \ --header "Content-Type: application/json" \ --data '{"prompt":null,"image":"","aspect_ratio":null,"canvas_size":[1920,1080],"original_image_size":null,"original_image_location":null,"retain_original_quality":true,"preserve_alpha":true,"seed":null}' ``` ## Model readme >