## 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: edit ## 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 instruction-based editing with up to four references.", "properties": { "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": "Output aspect ratio. Applies only with two or more reference images; otherwise the output keeps the ratio of the first image.", "title": "Aspect Ratio", "x-sr-order": 401 }, "seed": { "anyOf": [ { "maximum": 2147483647, "minimum": 0, "type": "integer" }, { "type": "null" } ], "description": "Random seed for reproducibility (the model uses 5555 when omitted).", "title": "Seed", "x-sr-order": 501 }, "images": { "description": "1-4 reference images (public URLs). Order matters: the instruction is resolved against them in this order.", "items": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "string" } ] }, "maxItems": 4, "minItems": 1, "title": "Images", "type": "array", "x-sr-order": 301 }, "instruction": { "anyOf": [ { "maxLength": 2000, "type": "string" }, { "type": "null" } ], "description": "What to change, in plain English. Refer to the reference images in the order they are sent (e.g. 'put the jacket from image 2 on the person in image 1'). Required unless structured_instruction is given.", "title": "Instruction", "x-sr-order": 201 }, "mask": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "string" }, { "type": "null" } ], "description": "Optional mask marking the region to regenerate: white where the model should edit, black elsewhere. Single-reference requests only; must be the same size as the image.", "title": "Mask", "x-sr-order": 302 }, "structured_instruction": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "description": "Advanced: a structured instruction returned by a previous edit, used verbatim to reproduce or refine that edit.", "title": "Structured Instruction", "x-sr-order": 402 } }, "required": [ "images" ], "title": "EditInput", "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 { "aspect_ratio": null, "seed": null, "images": [ ], "instruction": null, "mask": null, "structured_instruction": null } ``` ### Output example ```json { } ``` ## Model code examples ### JavaScript ```javascript import { sunra } from "@sunra/client"; const result = await sunra.subscribe("bria/fibo-edit-1.5/edit", { input: { instruction: null, images: [], mask: null, aspect_ratio: null, structured_instruction: null, 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/edit", arguments={ "instruction": None, "images": [], "mask": None, "aspect_ratio": None, "structured_instruction": None, "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/edit", SubscribeOptions.builder() .input(Map.of( "instruction", null, "images", , "mask", null, "aspect_ratio", null, "structured_instruction", null, "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/edit", input = mapOf( "instruction" to null, "images" to , "mask" to null, "aspect_ratio" to null, "structured_instruction" to null, "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/edit \ --header "Authorization: Key $SUNRA_KEY" \ --header "Content-Type: application/json" \ --data '{"instruction":null,"images":[],"mask":null,"aspect_ratio":null,"structured_instruction":null,"seed":null}' ``` ## Model readme >