openapi: 3.2.0
info:
title: Image Editing API Reference v2 endpoints API
version: ''
description: "Below you will find the technical specifications, request schemas, and response models for our endpoints. \n\nChoose an endpoint from the sidebar to view code samples and run test requests.\n"
servers:
- url: https://engine.prod.bria-api.com/v2/image/edit
- url: https://engine.prod.bria-api.com/v1
tags:
- name: v2 endpoints
description: 'Endpoints that are part of BRIA API version 2.
'
paths:
/image/edit:
post:
summary: Image Edit by Text
tags:
- v2 endpoints
servers:
- url: https://engine.prod.bria-api.com/v2
description: "[**Try out this capability in Bria's sandbox**](https://platform.bria.ai/image-editing/fibo-image-edit)\n\n\n**Description**\n\nPowered by the **FIBO models family**, Bria’s Image Editing by Text API equips builders with the ability to modify existing images using natural language instructions or structured JSON instructions.\n\nFIBO Edit features **native masking support** for precise, localized editing. You can supply a binary mask to restrict changes to specific regions while preserving the rest of the image. \n\nThe masking logic operates as a **generative replacement**; the model generates entirely new content within the masked area based on your instruction, rather than modifying the existing pixels.\n\n**Core Technology: The FIBO Architecture**\n\nThis endpoint utilizes the **FIBO** architecture, a unique two-step process ensuring precise and controllable edits:\n1. **Translation:** A VLM Bridge (powered by **Gemini 2.5 Flash**) converts your inputs into a detailed `structured_instruction` (JSON).\n2. **Generation:** The FIBO Edit model performs the final, deterministic edit on the input image, based on that JSON.\n\n**Advanced Control & Recreation**\n\n* To recreate a specific result: You must provide the exact source images, the mask (if used), the `structured_instruction` returned in the original response, and the `seed` used to create it.\n* For advanced, programmatic control, you can pass in your own `structured_instruction` (e.g., from the `/v2/structured_instruction/generate` endpoint) to bypass the internal VLM bridge.\n\n---\n\n**Input Combination Rules**\n\nThe request body must include `images` and one of the following combinations:\n\n* **Global Edit (natural language):** `images` + `instruction`\n* **Global Edit (JSON instruction):** `images` + `structured_instruction`\n* **Masked Edit (natural language):** `images` + `mask` + `instruction`\n* **Masked Edit (JSON instruction):** `images` + `mask` + `structured_instruction`\n\n---\n**API Access**\n\nYou can register and access the API Token through Bria's platform <a href=\"https://platform.bria.ai/console/account/api-keys\" target=\"_blank\">by clicking here</a>.\n\n---\n**Examples**\n\n**Use Case 1: Lighting Change**\n\n**Instruction:** *\"change to golden hour\"*\n\n<table>\n <tr>\n <th style=\"text-align: center;\">Input Image</th>\n <th style=\"text-align: center;\">Output Image</th>\n </tr>\n <tr>\n <td align=\"center\" style=\"vertical-align: middle;\">\n <img src=\"https://bria-datasets.s3.us-east-1.amazonaws.com/Liza/magnifics_upscale-z3xYDU0K4AZzosFtvWvb-A_surreal_landscape_featuring_a_bright_yellow_train_standing_alone_on_a_reflecti+(1).png\" width=\"300\" style=\"border-radius: 8px;\">\n </td>\n <td align=\"center\" style=\"vertical-align: middle;\">\n <img src=\"https://bria-datasets.s3.us-east-1.amazonaws.com/Liza/train_fc496bfa_seed096.png\" width=\"300\" style=\"border-radius: 8px;\">\n </td>\n </tr>\n</table>\n\n<details>\n<summary style=\"cursor: pointer; color: #007bff; font-weight: bold;\">Click to view the Output Structured Instruction (JSON)</summary>\n\n```json\n{\n \"short_description\": \"A vibrant yellow train with multiple carriages stretches across a vast, reflective salt flat under a golden hour sky. The train's reflection is perfectly mirrored in the still, shallow water, creating a symmetrical and surreal scene. Fluffy white clouds are scattered across the sky, also reflected in the water, adding depth and texture to the expansive landscape. The warm, soft light of the golden hour bathes the entire scene, enhancing the colors and creating a serene and magical atmosphere.\",\n \"objects\": [\n {\n \"description\": \"A long, multi-car passenger train, painted in a bright, somewhat weathered yellow. The front locomotive is robust, with visible details like railings, windows, and industrial components. The carriages behind it are also yellow, with numerous windows reflecting the sky.\",\n \"location\": \"center, extending from mid-left to far right\",\n \"relationship\": \"The train is the primary subject, dominating the central horizontal axis and creating a strong leading line into the distance. Its reflection is a key compositional element.\",\n \"relative_size\": \"large within frame\",\n \"shape_and_color\": \"Elongated, rectangular, bright yellow with some darker accents.\",\n \"texture\": \"Metallic, slightly weathered, with visible rivets and panels.\",\n \"appearance_details\": \"The train appears to be a diesel locomotive with several passenger cars, showing signs of use but maintaining its vibrant yellow color.\",\n \"orientation\": \"Horizontal, moving from left to right into the distance.\"\n },\n {\n \"description\": \"The perfect, clear reflection of the yellow train in the still, shallow water of the salt flat. The reflection is almost identical to the train above, creating a strong sense of symmetry.\",\n \"location\": \"below the train, in the lower half of the frame\",\n \"relationship\": \"This object is the mirror image of the train, completing the symmetrical composition and emphasizing the reflective quality of the salt flat.\",\n \"relative_size\": \"large within frame\",\n \"shape_and_color\": \"Elongated, rectangular, bright yellow.\",\n \"texture\": \"Smooth, watery, with slight distortions from the water's surface.\",\n \"appearance_details\": \"The reflection includes all details of the train, including windows and structural elements.\",\n \"orientation\": \"Horizontal, mirroring the train above.\"\n },\n {\n \"description\": \"Numerous large, fluffy cumulus clouds scattered across the sky. They are bright white with soft, warm undertones from the golden hour light.\",\n \"location\": \"top half of the frame\",\n \"relationship\": \"The clouds fill the upper portion of the sky, providing a backdrop for the train and contributing to the overall sense of vastness. Their reflections are also visible in the water.\",\n \"relative_size\": \"large within frame\",\n \"shape_and_color\": \"Irregular, billowy, white with golden hues.\",\n \"texture\": \"Soft, ethereal, cotton-like.\",\n \"appearance_details\": \"The clouds vary in size and density, creating a dynamic sky.\",\n \"orientation\": \"Scattered across the sky.\"\n },\n {\n \"description\": \"The reflections of the fluffy white clouds in the calm, shallow water of the salt flat. These reflections are as clear and defined as the clouds in the sky.\",\n \"location\": \"bottom half of the frame\",\n \"relationship\": \"These reflections mirror the clouds in the sky, enhancing the symmetrical composition and the illusion of the train floating on water.\",\n \"relative_size\": \"large within frame\",\n \"shape_and_color\": \"Irregular, billowy, white with golden hues.\",\n \"texture\": \"Smooth, watery, with slight ripples.\",\n \"appearance_details\": \"The reflections are almost perfect, indicating very still water.\",\n \"orientation\": \"Mirrored below the clouds in the sky.\"\n }\n ],\n \"background_setting\": \"A vast, flat salt plain covered with a thin layer of incredibly still, reflective water, extending to the horizon. In the far distance, a faint, low-lying landmass or shoreline is visible, blurring into the horizon. The sky is expansive and clear, filled with scattered cumulus clouds, all bathed in the warm glow of golden hour.\",\n \"lighting\": {\n \"conditions\": \"golden hour\",\n \"direction\": \"Side-lit, with warm, low-angle light coming from the side, likely from the left or right, casting soft, elongated highlights.\",\n \"shadows\": \"Soft, elongated shadows are cast by the train and clouds, blending subtly with the reflections in the water, contributing to the overall warm and diffused light.\"\n },\n \"aesthetics\": {\n \"composition\": \"Symmetrical composition with the train positioned centrally, creating a strong horizontal line that divides the sky and its reflection. Leading lines are formed by the train and its reflection, drawing the eye towards the vanishing point on the horizon.\",\n \"color_scheme\": \"Warm complementary colors, dominated by the bright yellow of the train against the soft blues and oranges of the golden hour sky and water. White clouds provide contrast.\",\n \"mood_atmosphere\": \"Serene, magical, and expansive, with a sense of wonder and tranquility enhanced by the soft, warm light.\",\n \"preference_score\": \"very high\",\n \"aesthetic_score\": \"very high\"\n },\n \"photographic_characteristics\": {\n \"depth_of_field\": \"Deep, with both the foreground train and the distant horizon appearing in sharp focus.\",\n \"focus\": \"Sharp focus on the train and its reflection, extending clearly into the background.\",\n \"camera_angle\": \"Eye-level, providing a direct and immersive view of the scene.\",\n \"lens_focal_length\": \"Standard lens (e.g., 35mm-50mm) to capture the expansive landscape while maintaining detail on the train.\"\n },\n \"style_medium\": \"photograph\",\n \"context\": \"This is a fine art landscape photograph, emphasizing the surreal beauty of nature and human engineering, suitable for display in a gallery or as a travel magazine feature.\",\n \"artistic_style\": \"realistic\",\n \"edit_instruction\": \"Change the lighting to golden hour.\"\n}\n```\n</details>\n\n<br>\n\n**Use Case 2: Masked Text Addition**\n\n**Instruction:** *\"Write FIBO ROCKS on all balloons, use dark creative font, different font for each balloon\"*\n\n<table>\n <tr>\n <th style=\"text-align: center;\">Input Image</th>\n <th style=\"text-align: center;\">Input Mask</th>\n <th style=\"text-align: center;\">Output Image</th>\n </tr>\n <tr>\n <td align=\"center\" style=\"vertical-align: middle;\">\n <img src=\"https://bria-datasets.s3.us-east-1.amazonaws.com/api_doc/fibo-edit/pexels-natalie-bond-320378-3371094.jpg\" width=\"200\" style=\"border-radius: 8px;\">\n </td>\n <td align=\"center\" style=\"vertical-align: middle;\">\n <img src=\"https://bria-datasets.s3.us-east-1.amazonaws.com/api_doc/fibo-edit/pexels-natalie-bond-320378-3371094_mask.png\" width=\"200\" style=\"border-radius: 8px;\">\n </td>\n <td align=\"center\" style=\"vertical-align: middle;\">\n <img src=\"https://bria-datasets.s3.us-east-1.amazonaws.com/api_doc/fibo-edit/pexels-natalie-bond-320378-3371094_bria_result.png\" width=\"200\" style=\"border-radius: 8px;\">\n </td>\n </tr>\n</table>\n\n<details>\n<summary style=\"cursor: pointer; color: #007bff; font-weight: bold;\">Click to view the Output Structured Instruction (JSON)</summary>\n\n```json\n{\n \"short_description\": \"A vibrant cluster of metallic balloons in shades of red, silver, and purple, each adorned with the text \\\"FIBO ROCKS\\\" in a unique, dark, creative font. The balloons are tied together with white ribbons and float against a soft, light green background, creating a festive and celebratory atmosphere.\",\n \"objects\": [\n {\n \"description\": \"A large, metallic red balloon, reflecting light with a glossy sheen. It has \\\"FIBO ROCKS\\\" written on it in a dark, creative font.\",\n \"location\": \"top-right\",\n \"relationship\": \"Part of a cluster of balloons.\",\n \"relative_size\": \"large within frame\",\n \"shape_and_color\": \"Round, metallic red\",\n \"texture\": \"Smooth, glossy\",\n \"appearance_details\": \"Reflective surface showing subtle highlights.\",\n \"orientation\": \"Slightly angled upwards\"\n },\n {\n \"description\": \"A metallic purple balloon, with a deep, rich hue and a reflective surface. It has \\\"FIBO ROCKS\\\" written on it in a dark, creative font.\",\n \"location\": \"center-right\",\n \"relationship\": \"Nestled among other balloons in the cluster.\",\n \"relative_size\": \"medium within frame\",\n \"shape_and_color\": \"Round, metallic purple\",\n \"texture\": \"Smooth, glossy\",\n \"appearance_details\": \"Shows reflections of the surrounding environment.\",\n \"orientation\": \"Upright\"\n },\n {\n \"description\": \"A metallic silver balloon, appearing bright and reflective against the background. It has \\\"FIBO ROCKS\\\" written on it in a dark, creative font.\",\n \"location\": \"mid-left\",\n \"relationship\": \"Prominently positioned within the balloon cluster.\",\n \"relative_size\": \"medium within frame\",\n \"shape_and_color\": \"Round, metallic silver\",\n \"texture\": \"Smooth, glossy\",\n \"appearance_details\": \"Highly reflective, catching ambient light.\",\n \"orientation\": \"Slightly angled downwards\"\n },\n {\n \"description\": \"A cluster of several metallic balloons, including shades of red, silver, and purple, all tied together with white ribbons. Each balloon has \\\"FIBO ROCKS\\\" written on it in a unique, dark, creative font.\",\n \"location\": \"center-right\",\n \"relationship\": \"The main subject of the image, forming a cohesive group.\",\n \"relative_size\": \"large within frame\",\n \"shape_and_color\": \"Various round shapes, metallic red, silver, and purple\",\n \"texture\": \"Smooth, glossy\",\n \"appearance_details\": \"The balloons are inflated and appear to be floating, with ribbons trailing downwards.\",\n \"number_of_objects\": 12,\n \"orientation\": \"Clustered together, generally upright\"\n },\n {\n \"description\": \"Thin, translucent white ribbons trailing downwards from the cluster of balloons.\",\n \"location\": \"bottom-center\",\n \"relationship\": \"Attached to the balloons, providing a sense of upward movement.\",\n \"relative_size\": \"small\",\n \"shape_and_color\": \"Thin, white, translucent\",\n \"texture\": \"Smooth, delicate\",\n \"appearance_details\": \"Flowing gently, some ribbons are intertwined.\",\n \"orientation\": \"Vertical, trailing downwards\"\n }\n ],\n \"background_setting\": \"A plain, light green wall with a smooth texture, providing a clean and uncluttered backdrop for the balloons.\",\n \"lighting\": {\n \"conditions\": \"Bright, soft ambient light\",\n \"direction\": \"Front-lit with some light from the right\",\n \"shadows\": \"Subtle, soft shadows cast by the balloons on the wall, indicating depth.\"\n },\n \"aesthetics\": {\n \"composition\": \"Centered, with the balloon cluster occupying the majority of the right side of the frame, creating a balanced yet dynamic visual.\",\n \"color_scheme\": \"Complementary colors of metallic reds, purples, and silvers against a soft green background, creating a festive and appealing palette.\",\n \"mood_atmosphere\": \"Joyful, celebratory, and festive.\",\n \"preference_score\": \"very high\",\n \"aesthetic_score\": \"very high\"\n },\n \"photographic_characteristics\": {\n \"depth_of_field\": \"Shallow, with the balloons in sharp focus and the background softly blurred.\",\n \"focus\": \"Sharp focus on the balloon cluster.\",\n \"camera_angle\": \"Eye-level\",\n \"lens_focal_length\": \"Standard lens (e.g., 35mm-50mm)\"\n },\n \"style_medium\": \"photograph\",\n \"text_render\": [\n {\n \"text\": \"FIBO ROCKS\",\n \"location\": \"on each balloon\",\n \"size\": \"medium\",\n \"color\": \"dark\",\n \"font\": \"creative, different for each balloon\",\n \"appearance_details\": \"Each instance of the text uses a unique, dark, creative font style.\"\n }\n ],\n \"context\": \"This is a celebratory photograph, possibly for an event or a brand promotion, featuring balloons with custom text.\",\n \"artistic_style\": \"realistic\",\n \"edit_instruction\": \"Add the text \\\"FIBO ROCKS\\\" to each balloon, using a dark, creative font, with a different font for each balloon.\"\n}\n```\n</details>\n\n<br>\n\n**Use Case 3: Sketch to Realistic Photo**\n\n**Instruction:** *\"create a detailed realistic photo, with contemporary color scheme, and balanced exposure photo roughly based on this sketch\"*\n\n<table>\n <tr>\n <th style=\"text-align: center;\">Input Image</th>\n <th style=\"text-align: center;\">Output Image</th>\n </tr>\n <tr>\n <td align=\"center\" style=\"vertical-align: middle;\">\n <img src=\"https://bria-datasets.s3.us-east-1.amazonaws.com/api_doc/fibo-edit/42082.jpg\" width=\"300\" style=\"border-radius: 8px;\">\n </td>\n <td align=\"center\" style=\"vertical-align: middle;\">\n <img src=\"https://bria-datasets.s3.us-east-1.amazonaws.com/api_doc/fibo-edit/42082_bria_result.png\" width=\"300\" style=\"border-radius: 8px;\">\n </td>\n </tr>\n</table>\n\n<details>\n<summary style=\"cursor: pointer; color: #007bff; font-weight: bold;\">Click to view the Output Structured Instruction (JSON)</summary>\n\n```json\n{\n \"short_description\": \"A realistic photograph of a brown rabbit sitting on a natural ground surface, looking towards the left. The rabbit has soft fur, long ears, and a small fluffy tail. The scene is captured with a contemporary color scheme and balanced exposure, highlighting the natural textures and details of the animal.\",\n \"objects\": [\n {\n \"description\": \"A realistic brown rabbit with soft, detailed fur, long ears, and a small, fluffy white tail. Its eyes are dark and observant, and its whiskers are delicate.\",\n \"location\": \"center\",\n \"relationship\": \"The main subject of the image, positioned centrally on the ground.\",\n \"relative_size\": \"large within frame\",\n \"shape_and_color\": \"Oval-shaped body, brown and white fur.\",\n \"texture\": \"Soft, dense fur.\",\n \"appearance_details\": \"Prominent whiskers, alert eyes, and a twitching nose.\",\n \"pose\": \"Sitting with its front paws tucked under its chest and hind legs slightly extended, body slightly turned to the left.\",\n \"expression\": \"Alert and curious.\",\n \"action\": \"Sitting still, observing its surroundings.\",\n \"orientation\": \"Facing left, slightly angled towards the viewer.\"\n }\n ],\n \"background_setting\": \"A softly blurred natural ground surface, possibly grass or dirt, providing a subtle and unobtrusive backdrop that keeps the focus on the rabbit.\",\n \"lighting\": {\n \"conditions\": \"Bright, natural daylight with balanced exposure.\",\n \"direction\": \"Evenly lit from above and slightly to the front.\",\n \"shadows\": \"Soft, subtle shadows beneath the rabbit, indicating natural light.\"\n },\n \"aesthetics\": {\n \"composition\": \"Centered composition with the rabbit as the main focal point, creating a portrait-like feel.\",\n \"color_scheme\": \"Contemporary natural color scheme with earthy tones and subtle greens/browns.\",\n \"mood_atmosphere\": \"Calm, natural, and serene.\",\n \"preference_score\": \"very high\",\n \"aesthetic_score\": \"very high\"\n },\n \"photographic_characteristics\": {\n \"depth_of_field\": \"Shallow depth of field, with the rabbit in sharp focus and the background softly blurred.\",\n \"focus\": \"Sharp focus on the rabbit's face and fur.\",\n \"camera_angle\": \"Eye-level, capturing the rabbit from its perspective.\",\n \"lens_focal_length\": \"Portrait lens (e.g., 50mm-85mm)\"\n },\n \"style_medium\": \"photograph\",\n \"context\": \"This is a realistic wildlife photograph, suitable for nature magazines, educational materials, or as a decorative print.\",\n \"artistic_style\": \"realistic\",\n \"edit_instruction\": \"Render a detailed realistic photograph of a brown rabbit sitting on a natural ground surface, looking towards the left, with a contemporary color scheme and balanced exposure.\"\n}\n```\n</details>\n\n<br>\n\n**Use Case 4: Object Modification (Add Print)**\n\n**Instruction:** *\"add a bold modern print to the shirt\"*\n\n<table>\n <tr>\n <th style=\"text-align: center;\">Input Image</th>\n <th style=\"text-align: center;\">Output Image</th>\n </tr>\n <tr>\n <td align=\"center\" style=\"vertical-align: middle;\">\n <img src=\"https://bria-datasets.s3.us-east-1.amazonaws.com/api_doc/fibo-edit/front-view-young-attractive-female-white-t-shirt-posing-showing-victory-sign-pink-wall-model-female-pose-color-photo-female-young.jpg\" width=\"300\" style=\"border-radius: 8px;\">\n </td>\n <td align=\"center\" style=\"vertical-align: middle;\">\n <img src=\"https://bria-datasets.s3.us-east-1.amazonaws.com/api_doc/fibo-edit/front-view-young-attractive-female-white-t-shirt-posing-showing-victory-sign-pink-wall-model-female-pose-color-photo-female-young_bria_result.png\" width=\"300\" style=\"border-radius: 8px;\">\n </td>\n </tr>\n</table>\n\n<details>\n<summary style=\"cursor: pointer; color: #007bff; font-weight: bold;\">Click to view the Output Structured Instruction (JSON)</summary>\n\n```json\n{\n \"short_description\": \"A young woman with long, wavy brown hair stands against a solid pink background, making peace signs with both hands. She is wearing a white t-shirt with a bold modern print and dark pants, looking directly at the viewer with a calm expression and red lipstick.\",\n \"objects\": [\n {\n \"description\": \"A young woman with long, wavy brown hair, styled with a middle part and some strands pulled back from her face. She has fair skin, full red lips, and a calm, direct gaze.\",\n \"location\": \"center\",\n \"relationship\": \"main subject of the image\",\n \"relative_size\": \"large within frame\",\n \"shape_and_color\": \"human form, fair skin, brown hair\",\n \"texture\": \"smooth skin, wavy hair\",\n \"appearance_details\": \"wearing red lipstick\",\n \"pose\": \"standing with arms bent at the elbows, hands raised to shoulder height, making peace signs with both hands\",\n \"expression\": \"calm, direct, slightly smiling\",\n \"clothing\": \"a white t-shirt with a bold modern print and dark pants\",\n \"action\": \"making peace signs\",\n \"gender\": \"female\",\n \"skin_tone_and_texture\": \"fair, smooth\",\n \"orientation\": \"facing forward\"\n },\n {\n \"description\": \"A white t-shirt with short sleeves and a crew neck, featuring a bold modern print on the front.\",\n \"location\": \"center, on the woman's torso\",\n \"relationship\": \"worn by the woman\",\n \"relative_size\": \"medium\",\n \"shape_and_color\": \"rectangular, white with a multi-colored print\",\n \"texture\": \"cotton fabric\",\n \"appearance_details\": \"The print is abstract and geometric, in contrasting colors.\",\n \"orientation\": \"worn on the body\"\n }\n ],\n \"background_setting\": \"A plain, solid pink wall with no discernible features or textures.\",\n \"lighting\": {\n \"conditions\": \"bright studio lighting\",\n \"direction\": \"front-lit\",\n \"shadows\": \"minimal shadows, soft and diffused behind the subject\"\n },\n \"aesthetics\": {\n \"composition\": \"centered, medium shot, portrait composition\",\n \"color_scheme\": \"monochromatic pink background with a contrasting white shirt and red lips\",\n \"mood_atmosphere\": \"casual, friendly, confident\",\n \"preference_score\": \"very high\",\n \"aesthetic_score\": \"very high\"\n },\n \"photographic_characteristics\": {\n \"depth_of_field\": \"shallow\",\n \"focus\": \"sharp focus on subject\",\n \"camera_angle\": \"eye-level\",\n \"lens_focal_length\": \"portrait lens (e.g., 50mm-85mm)\"\n },\n \"style_medium\": \"photograph\",\n \"context\": \"This is a studio portrait photograph, likely for a fashion or lifestyle campaign, emphasizing a casual and confident style.\",\n \"artistic_style\": \"realistic\",\n \"edit_instruction\": \"Add a bold modern print to the white t-shirt worn by the subject.\"\n}\n```\n</details>\n\n<br>\n\n**Use Case 5: Text Modification (Replace Text)**\n\n**Instruction:** *\"replace the text to Great Work FIBO!\"*\n\n<table>\n <tr>\n <th style=\"text-align: center;\">Input Image</th>\n <th style=\"text-align: center;\">Output Image</th>\n </tr>\n <tr>\n <td align=\"center\" style=\"vertical-align: middle;\">\n <img src=\"https://bria-datasets.s3.us-east-1.amazonaws.com/api_doc/fibo-edit/pexels-matvalina-27310484.jpg\" width=\"300\" style=\"border-radius: 8px;\">\n </td>\n <td align=\"center\" style=\"vertical-align: middle;\">\n <img src=\"https://bria-datasets.s3.us-east-1.amazonaws.com/api_doc/fibo-edit/pexels-matvalina-27310484_bria_result.png\" width=\"300\" style=\"border-radius: 8px;\">\n </td>\n </tr>\n</table>\n\n<details>\n<summary style=\"cursor: pointer; color: #007bff; font-weight: bold;\">Click to view the Output Structured Instruction (JSON)</summary>\n\n```json\n{\n \"short_description\": \"A small, round white cake with a red heart decoration is nestled in a light brown paper liner inside an open, off-white takeout container. The container rests on a stack of papers and a wooden surface, with the cake prominently featuring the text \\\"Great Work FIBO!\\\" in a mix of brown and black lettering.\",\n \"objects\": [\n {\n \"description\": \"A small, round cake with smooth white frosting, decorated with a small red heart and text.\",\n \"location\": \"center\",\n \"relationship\": \"The cake is the main subject, sitting inside the takeout container.\",\n \"relative_size\": \"large within frame\",\n \"shape_and_color\": \"round, white\",\n \"texture\": \"smooth frosting\",\n \"appearance_details\": \"The cake has a clean, minimalist design with a small red heart at the bottom center of the text.\",\n \"orientation\": \"flat, facing upwards\"\n },\n {\n \"description\": \"An open, off-white, square-shaped takeout container made of a fibrous material, holding the cake.\",\n \"location\": \"center-right\",\n \"relationship\": \"The container holds and frames the cake.\",\n \"relative_size\": \"large within frame\",\n \"shape_and_color\": \"square, off-white\",\n \"texture\": \"slightly rough, fibrous\",\n \"appearance_details\": \"The container is open, with its lid folded back, revealing the cake inside.\",\n \"orientation\": \"open, with the base angled slightly towards the bottom left\"\n },\n {\n \"description\": \"A light brown, crinkled paper liner that cradles the cake within the takeout container.\",\n \"location\": \"inside the takeout container, surrounding the cake\",\n \"relationship\": \"The liner supports the cake within the container.\",\n \"relative_size\": \"medium\",\n \"shape_and_color\": \"irregular, light brown\",\n \"texture\": \"crinkled paper\",\n \"appearance_details\": \"The paper is slightly crumpled, conforming to the shape of the cake and container.\",\n \"orientation\": \"wrapped around the cake\"\n },\n {\n \"description\": \"A stack of various papers, including what appears to be newspaper or old documents, providing a textured surface beneath the container.\",\n \"location\": \"bottom-left to top-left background\",\n \"relationship\": \"The papers form part of the surface on which the container rests.\",\n \"relative_size\": \"medium\",\n \"shape_and_color\": \"rectangular, white and grey with black text\",\n \"texture\": \"paper, some crinkled\",\n \"appearance_details\": \"The papers show printed text and images, suggesting old documents or newsprint.\",\n \"orientation\": \"stacked and spread out\"\n },\n {\n \"description\": \"A wooden surface, possibly a table, visible in the background and beneath some of the papers.\",\n \"location\": \"top-left and bottom-right background\",\n \"relationship\": \"The wooden surface serves as the primary base for all other objects.\",\n \"relative_size\": \"large\",\n \"shape_and_color\": \"irregular, brown\",\n \"texture\": \"wood grain\",\n \"appearance_details\": \"The wood has visible grain patterns and a warm, natural tone.\",\n \"orientation\": \"horizontal\"\n }\n ],\n \"background_setting\": \"The scene is set on a rustic wooden table, partially covered by a stack of old papers and a folded white and grey checkered cloth, creating a casual and slightly vintage backdrop for the cake.\",\n \"lighting\": {\n \"conditions\": \"bright, natural daylight\",\n \"direction\": \"top-down, slightly from the left\",\n \"shadows\": \"soft, subtle shadows cast by the container and cake, indicating gentle overhead lighting\"\n },\n \"aesthetics\": {\n \"composition\": \"centered, with the cake as the focal point, using a slightly elevated perspective\",\n \"color_scheme\": \"neutral tones of white, brown, and grey with a pop of red from the heart\",\n \"mood_atmosphere\": \"simple, celebratory, and warm\",\n \"preference_score\": \"very high\",\n \"aesthetic_score\": \"very high\"\n },\n \"photographic_characteristics\": {\n \"depth_of_field\": \"shallow, with the cake in sharp focus and the background gently blurred\",\n \"focus\": \"sharp focus on subject\",\n \"camera_angle\": \"high angle, looking down onto the cake\",\n \"lens_focal_length\": \"standard lens (e.g., 35mm-50mm)\"\n },\n \"style_medium\": \"photograph\",\n \"text_render\": [\n {\n \"text\": \"Great Work\",\n \"location\": \"top of the cake, slightly left of center\",\n \"size\": \"medium\",\n \"color\": \"brown\",\n \"font\": \"serif typeface\",\n \"appearance_details\": \"Neatly piped, uppercase letters\"\n },\n {\n \"text\": \"FIBO!\",\n \"location\": \"bottom of the cake, below 'Great Work'\",\n \"size\": \"large\",\n \"color\": \"black\",\n \"font\": \"script typeface\",\n \"appearance_details\": \"Elegantly handwritten style, with an exclamation mark\"\n }\n ],\n \"context\": \"This is a concept for a celebratory photograph, possibly for a social media post or a personal gift, emphasizing achievement.\",\n \"artistic_style\": \"realistic\",\n \"edit_instruction\": \"Change the text on the cake to \\\"Great Work FIBO!\\\".\"\n}\n```\n</details>\n\n<br>\n\n**Use Case 6: Object Replacement**\n\n**Instruction:** *\"replace the garlic with slices of lemon, and chilli rings\"*\n\n<table>\n <tr>\n <th style=\"text-align: center;\">Input Image</th>\n <th style=\"text-align: center;\">Output Image</th>\n </tr>\n <tr>\n <td align=\"center\" style=\"vertical-align: middle;\">\n <img src=\"https://bria-datasets.s3.us-east-1.amazonaws.com/api_doc/fibo-edit/pexels-karola-g-4871148.jpg\" width=\"300\" style=\"border-radius: 8px;\">\n </td>\n <td align=\"center\" style=\"vertical-align: middle;\">\n <img src=\"https://bria-datasets.s3.us-east-1.amazonaws.com/api_doc/fibo-edit/pexels-karola-g-4871148_bria_result.png\" width=\"300\" style=\"border-radius: 8px;\">\n </td>\n </tr>\n</table>\n\n<details>\n<summary style=\"cursor: pointer; color: #007bff; font-weight: bold;\">Click to view the Output Structured Instruction (JSON)</summary>\n\n```json\n{\n \"short_description\": \"A close-up, high-angle shot of a light wooden cutting board featuring two metal spoons filled with a mixture of seeds and spices. To the left of the spoons are several bright yellow lemon slices and vibrant red chili rings, replacing the garlic. A delicate green dill sprig extends from the top-right, and a fresh mint leaf is visible in the bottom-right corner, adding a touch of freshness to the composition. The scene is brightly lit, highlighting the textures and colors of the ingredients.\",\n \"objects\": [\n {\n \"descrip
# --- truncated at 32 KB (195 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/bria/refs/heads/main/openapi/bria-v2-endpoints-api-openapi.yml