> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bfl.ml/llms.txt
> Use this file to discover all available pages before exploring further.

# Bounding boxes with FLUX 3 Image

> Place every element of an image with bounding boxes, then recolor, move, replace, or remove elements box by box while the rest of the image stays unchanged.

export const FLUX3_PIXEL_EXAMPLES = [{
  "key": "cats",
  "title": "Remove a cat",
  "op": "Remove",
  "change": "Orange cat removed",
  "input": "https://cdn.sanity.io/images/2gpum2i6/production/8fc2d013a3912a101e10aa116841adae9b930f74-1600x898.webp",
  "edited": "https://cdn.sanity.io/images/2gpum2i6/production/cfd2c6cf8f18a212d053b5efe0e18ea7eb1e3c5b-1600x898.webp",
  "mask": "https://cdn.sanity.io/images/2gpum2i6/production/8b251636c81303d1217c97308b4e676b3c4692ce-1600x898.png",
  "width": 1600,
  "height": 898,
  "identical": "80.7%",
  "pixels": 3491600,
  "full_res": [2494, 1400]
}, {
  "key": "bird",
  "title": "Add a bird",
  "op": "Add",
  "change": "Small bird added on the currants",
  "input": "https://cdn.sanity.io/images/2gpum2i6/production/c5ebc86b4050a2844ccd12ef0ec6e6f1eb168790-1600x1206.webp",
  "edited": "https://cdn.sanity.io/images/2gpum2i6/production/3ecf4e4ead6470ffd183833f5cee24dce231c70a-1600x1206.webp",
  "mask": "https://cdn.sanity.io/images/2gpum2i6/production/7a95f780e59c40614ecc7765d04582ee9e837c5f-1600x1206.png",
  "width": 1600,
  "height": 1206,
  "identical": "86.4%",
  "pixels": 2601200,
  "full_res": [1858, 1400]
}, {
  "key": "burger",
  "title": "Swap the plate",
  "op": "Replace",
  "change": "Plate swapped for a burger",
  "input": "https://cdn.sanity.io/images/2gpum2i6/production/e80c3c8f6d928356f5f4479644cdce033193a827-1191x1400.webp",
  "edited": "https://cdn.sanity.io/images/2gpum2i6/production/6290ac98c2b96eaead51063171e6d2b6dcf29bdc-1191x1400.webp",
  "mask": "https://cdn.sanity.io/images/2gpum2i6/production/a5fc3618762649a4cef0a78bd86c25ec6b188894-1191x1400.png",
  "width": 1191,
  "height": 1400,
  "identical": "88.4%",
  "pixels": 1667400,
  "full_res": [1191, 1400]
}, {
  "key": "shirt",
  "title": "Print on a shirt",
  "op": "Add",
  "change": "Cat print added to the T-shirt",
  "input": "https://cdn.sanity.io/images/2gpum2i6/production/0558a5d7996849b1fbda6aa00572d9f3d14ba809-1400x1400.webp",
  "edited": "https://cdn.sanity.io/images/2gpum2i6/production/6eb5c77713772f7c46abea03f6a3be6dda2ba53f-1400x1400.webp",
  "mask": "https://cdn.sanity.io/images/2gpum2i6/production/0898adeaf7ccae59dbb4d3e44093b0d4ece67ac5-1400x1400.png",
  "width": 1400,
  "height": 1400,
  "identical": "89.7%",
  "pixels": 1960000,
  "full_res": [1400, 1400]
}, {
  "key": "duck",
  "title": "Replace the duck",
  "op": "Replace",
  "change": "Rubber duck replaced",
  "input": "https://cdn.sanity.io/images/2gpum2i6/production/1fc2e839e624487f872609395cf0a67dc303b0b5-1600x1189.webp",
  "edited": "https://cdn.sanity.io/images/2gpum2i6/production/3d12f59a624a022ac12554242aa404be64db5b9d-1600x1189.webp",
  "mask": "https://cdn.sanity.io/images/2gpum2i6/production/1d01fcec8d4273fe6bc998242a4950ac798b8543-1600x1189.png",
  "width": 1600,
  "height": 1189,
  "identical": "85.5%",
  "pixels": 2637600,
  "full_res": [1884, 1400]
}, {
  "key": "hair",
  "title": "Recolor hair",
  "op": "Recolour",
  "change": "Hair recolored blue",
  "input": "https://cdn.sanity.io/images/2gpum2i6/production/6c2f4e7142e08a45343f735da9c6979ac78fd528-1046x1400.webp",
  "edited": "https://cdn.sanity.io/images/2gpum2i6/production/381358b6b1fcda8eaba213bc70d27f7a754f2fb6-1046x1400.webp",
  "mask": "https://cdn.sanity.io/images/2gpum2i6/production/e65e9abb341ceaebf84893240d3f6428a49bb86b-1046x1400.png",
  "width": 1046,
  "height": 1400,
  "identical": "67.8%",
  "pixels": 1464400,
  "full_res": [1046, 1400]
}, {
  "key": "moto",
  "title": "Add a rider",
  "op": "Add",
  "change": "Motorcyclist added in the bend",
  "input": "https://cdn.sanity.io/images/2gpum2i6/production/942f0e77c30e850c4114f7adc0e45869a591edd2-1600x663.webp",
  "edited": "https://cdn.sanity.io/images/2gpum2i6/production/69ef6ce42514482eed365cc8c57b974e3947a27b-1600x663.webp",
  "mask": "https://cdn.sanity.io/images/2gpum2i6/production/c133740c9eb19b1b59f2a1da18822d84ce83c175-1600x663.png",
  "width": 1600,
  "height": 663,
  "identical": "89.2%",
  "pixels": 4732000,
  "full_res": [3380, 1400]
}, {
  "key": "sofa",
  "title": "New sofa",
  "op": "Replace",
  "change": "Armchairs replaced with a sofa",
  "input": "https://cdn.sanity.io/images/2gpum2i6/production/8a3546c271532f377c5707d5edc52265028b569d-1600x1067.webp",
  "edited": "https://cdn.sanity.io/images/2gpum2i6/production/5125bc353896ff5de2dd73d84cc7838e9ea8670a-1600x1067.webp",
  "mask": "https://cdn.sanity.io/images/2gpum2i6/production/ba22eacfac502719104a658652f2262e2280616a-1600x1067.png",
  "width": 1600,
  "height": 1067,
  "identical": "76.5%",
  "pixels": 2940000,
  "full_res": [2100, 1400]
}, {
  "key": "divers",
  "title": "Two tiny divers",
  "op": "Add",
  "change": "Two divers added",
  "input": "https://cdn.sanity.io/images/2gpum2i6/production/a48094ab64a9008f77088440bd8f2919aca25e8c-1600x1060.webp",
  "edited": "https://cdn.sanity.io/images/2gpum2i6/production/662d38c3e6d14780f62b0db45ae19333420d416f-1600x1060.webp",
  "mask": "https://cdn.sanity.io/images/2gpum2i6/production/2d37fae000aa2287e0b3cc39ffb5f61117739df5-1600x1060.png",
  "width": 1600,
  "height": 1060,
  "identical": "94.1%",
  "pixels": 2958200,
  "full_res": [2113, 1400]
}];

export const FLUX3_EDIT_EXAMPLES = [{
  "key": "tiger-after",
  "title": "Recolor two boxes",
  "op": "recolour",
  "instruction": "Make both pink.",
  "before": "https://cdn.sanity.io/images/2gpum2i6/production/b6476b163e11444d6d5490ac1fa1e610d4eab85e-1360x768.webp",
  "after": "https://cdn.sanity.io/images/2gpum2i6/production/3c884e72074d330bd62f27e8d222b294b855eb74-1360x768.webp",
  "width": 1360,
  "height": 768,
  "record": "In <ref_image_0>, change the large tiger <animal_1> and the small glowing butterfly <insect_1> to be pink. Keep the massive fallen log <log_1>, the falling snow <snow_1>, and the dark background trees <trees_1> exactly unchanged.",
  "rows": [{
    "id": "animal_1",
    "from": null,
    "src_bbox": null,
    "tgt_bbox": [250, 50, 850, 650],
    "desc": "Make both pink.",
    "kind": "new"
  }, {
    "id": "insect_1",
    "from": null,
    "src_bbox": null,
    "tgt_bbox": [650, 680, 750, 750],
    "desc": "Make both pink.",
    "kind": "new"
  }, {
    "id": "log_1",
    "from": "ref_image_0",
    "src_bbox": [600, 0, 1000, 1000],
    "tgt_bbox": [600, 0, 1000, 1000],
    "desc": "A massive, fallen tree log stretching horizontally across the foreground. The surface features deep, rough-textured bark, weathered cracks, and small pockets of frost.",
    "kind": "anchor"
  }, {
    "id": "snow_1",
    "from": "ref_image_0",
    "src_bbox": [0, 0, 1000, 1000],
    "tgt_bbox": [0, 0, 1000, 1000],
    "desc": "Numerous white snowflakes of varying sizes falling across the scene. Some flakes are sharp and distinct, while others closer to the lens appear as blurred white streaks.",
    "kind": "anchor"
  }, {
    "id": "trees_1",
    "from": "ref_image_0",
    "src_bbox": [0, 0, 650, 1000],
    "tgt_bbox": [0, 0, 650, 1000],
    "desc": "A dense stand of tall, dark, vertical tree trunks receding into the distance. A cool, blue misty light permeates the spaces between the trees, glowing most intensely from the right edge.",
    "kind": "anchor"
  }]
}, {
  "key": "bamboo-multi",
  "title": "Three replacements at once",
  "op": "replace",
  "instruction": "a cyberpunk dog · a fallen bamboo leaf out of gold · a bird made out of a robot",
  "before": "https://cdn.sanity.io/images/2gpum2i6/production/fa34bced7273bdc735dad58a65c225d8d5ff63e6-1360x768.webp",
  "after": "https://cdn.sanity.io/images/2gpum2i6/production/2954729279a1bf4838c24b7ff66f024c32bd38f7-1360x768.webp",
  "width": 1360,
  "height": 768,
  "record": "Modify <ref_image_0> by making three replacements. On the lower left path, replace the tiny anthropomorphic wolf with a cyberpunk dog <wolf_1>. On the lower right, replace the fallen frosted bamboo log with a fallen bamboo leaf made out of gold <log_1>. In the middle of the misty forest, replace the small dark bird perched on a branch with a bird made out of a robot <bird_1>. Keep the rest of the scene exactly unchanged, preserving the dense upper bamboo leaves <bamboo_1>, the vertical bamboo trunks <bamboo_2> receding into the fog, the frosted ground and lower stalks <bamboo_3>, the dramatic slanting sunbeams <light_1>, the thick foreground bamboo trunk <bamboo_4> on the right, the frozen stream <stream_1>, the stone lantern <lantern_1>, and the floating frost flakes <particles_1>.",
  "rows": [{
    "id": "wolf_1",
    "from": null,
    "src_bbox": null,
    "tgt_bbox": [817, 120, 950, 167],
    "desc": "a cyberpunk dog",
    "kind": "new"
  }, {
    "id": "log_1",
    "from": null,
    "src_bbox": null,
    "tgt_bbox": [850, 600, 950, 850],
    "desc": "A fallen bamboo leave out of gold",
    "kind": "new"
  }, {
    "id": "bird_1",
    "from": null,
    "src_bbox": null,
    "tgt_bbox": [450, 500, 480, 530],
    "desc": "a bird made out of a robot",
    "kind": "new"
  }, {
    "id": "bamboo_1",
    "from": "ref_image_0",
    "src_bbox": [0, 0, 350, 1000],
    "tgt_bbox": [0, 0, 350, 1000],
    "desc": "Dense bamboo leaves and upper stalks illuminated by white sunlight. Translucent dew drops cling to the bright green foliage, creating small specular highlights.",
    "kind": "anchor"
  }, {
    "id": "bamboo_2",
    "from": "ref_image_0",
    "src_bbox": [300, 0, 750, 1000],
    "tgt_bbox": [300, 0, 750, 1000],
    "desc": "Thick, vertical bamboo trunks receding into dense, charcoal-tinted shadows. The green color of the stalks is darkened by the heavy shade and foggy atmosphere.",
    "kind": "anchor"
  }, {
    "id": "bamboo_3",
    "from": "ref_image_0",
    "src_bbox": [700, 0, 1000, 1000],
    "tgt_bbox": [700, 0, 1000, 1000],
    "desc": "The lower segments of the bamboo stalks and the ground, encrusted in sharp, frozen white frost crystals. The textures are crisp and perfectly still.",
    "kind": "anchor"
  }, {
    "id": "light_1",
    "from": "ref_image_0",
    "src_bbox": [200, 0, 900, 1000],
    "tgt_bbox": [200, 0, 900, 1000],
    "desc": "Parallel, slanting shafts of bright cream-white light slicing diagonally through the atmospheric fog, creating sharp, alternating bands of illumination and velvet shadow.",
    "kind": "anchor"
  }, {
    "id": "bamboo_4",
    "from": "ref_image_0",
    "src_bbox": [0, 850, 1000, 1000],
    "tgt_bbox": [0, 850, 1000, 1000],
    "desc": "A massive, thick bamboo trunk positioned in the immediate foreground on the right side, its surface detailed with horizontal nodes and a light dusting of frost near the bottom.",
    "kind": "anchor"
  }, {
    "id": "stream_1",
    "from": "ref_image_0",
    "src_bbox": [800, 400, 1000, 550],
    "tgt_bbox": [800, 400, 1000, 550],
    "desc": "A narrow, frozen stream winding through the frosty terrain, its icy surface reflecting the ambient light.",
    "kind": "anchor"
  }, {
    "id": "lantern_1",
    "from": "ref_image_0",
    "src_bbox": [750, 300, 880, 380],
    "tgt_bbox": [750, 300, 880, 380],
    "desc": "A stone lantern, partially buried in the frost, constructed from dark charcoal-colored stone.",
    "kind": "anchor"
  }, {
    "id": "particles_1",
    "from": "ref_image_0",
    "src_bbox": [400, 200, 700, 800],
    "tgt_bbox": [400, 200, 700, 800],
    "desc": "Tiny, floating frost flakes suspended in the foggy air, illuminated by the slanting light shafts.",
    "kind": "anchor"
  }]
}, {
  "key": "knight-after",
  "title": "Move a box",
  "op": "move",
  "instruction": "Drag knight_1 up and to the left.",
  "before": "https://cdn.sanity.io/images/2gpum2i6/production/aa7b28af831835fcef86e770262c8c30fa308c2c-1360x768.webp",
  "after": "https://cdn.sanity.io/images/2gpum2i6/production/18ea13b9dc6a33d255071ed0e78962629caafdbd-1360x768.webp",
  "width": 1360,
  "height": 768,
  "record": "In <ref_image_0>, move the miniature grey amigurumi knight figure <knight_1> upwards and to the left along the yarn cliff <cliff_1>. Leave the polished steel tapestry needle <needle_1> in its original position in the air. Keep the rest of the image completely unchanged, preserving the blurred yarn backdrop <backdrop_1>, the large knitted dragon <dragon_1>, and the fiery orange thread <fire_1> suspended between them.",
  "rows": [{
    "id": "knight_1",
    "from": "ref_image_0",
    "src_bbox": [500, 150, 850, 350],
    "tgt_bbox": [194, 55, 544, 255],
    "desc": "A miniature amigurumi knight figure crocheted from thick grey woolen yarn. It has visible, intricate stitches forming a rounded helmet shape and a cylindrical body, with tiny stubby arms reaching upwards against the cliff.",
    "kind": "move"
  }, {
    "id": "backdrop_1",
    "from": "ref_image_0",
    "src_bbox": [0, 0, 1000, 1000],
    "tgt_bbox": [0, 0, 1000, 1000],
    "desc": "A soft, out-of-focus expanse of cream ivory and melange indigo knitted yarn, providing a blurred studio backdrop with tangible fiber fuzz catching the ambient light.",
    "kind": "anchor"
  }, {
    "id": "cliff_1",
    "from": "ref_image_0",
    "src_bbox": [300, 0, 1000, 450],
    "tgt_bbox": [300, 0, 1000, 450],
    "desc": "A steep, uneven cliff face constructed from stacked, thick yarn skeins in rich shades of mustard yellow, terracotta, and melange indigo, featuring visible woven wool textures and loose, stray fiber strands.",
    "kind": "anchor"
  }, {
    "id": "needle_1",
    "from": "ref_image_0",
    "src_bbox": [420, 250, 550, 450],
    "tgt_bbox": [420, 250, 550, 450],
    "desc": "A real, oversized polished steel tapestry needle, gleaming under the studio lighting. It features a blunt tip and an elongated eye, grasped like a weapon in the knight's yarn-stub hand.",
    "kind": "anchor"
  }, {
    "id": "dragon_1",
    "from": "ref_image_0",
    "src_bbox": [100, 600, 950, 1000],
    "tgt_bbox": [100, 600, 950, 1000],
    "desc": "A large, fluffy knitted dragon made of highly textured, fuzzy yarn in terracotta and mustard yellow. It has a rounded snout, large crocheted eyes, and a wide-open mouth, with visible loose fibers creating a soft, tactile surface.",
    "kind": "anchor"
  }, {
    "id": "fire_1",
    "from": "ref_image_0",
    "src_bbox": [350, 400, 650, 650],
    "tgt_bbox": [350, 400, 650, 650],
    "desc": "Curled, sculptural puffs of fiery orange angora thread, suspended in mid-air. The thread is highly textured, fuzzy, and chaotic, bursting from the dragon's mouth and stretching horizontally across the center.",
    "kind": "anchor"
  }]
}, {
  "key": "bamboo-wolf",
  "title": "Swap the subject",
  "op": "replace",
  "instruction": "a Dog",
  "before": "https://cdn.sanity.io/images/2gpum2i6/production/fa34bced7273bdc735dad58a65c225d8d5ff63e6-1360x768.webp",
  "after": "https://cdn.sanity.io/images/2gpum2i6/production/50631bead7e36e98e8901c717fa58c1f46a5dbb8-1360x768.webp",
  "width": 1360,
  "height": 768,
  "record": "In <ref_image_0>, replace the tiny anthropomorphic wolf standing on the left side of the frosty path with a dog <wolf_1>. Keep the rest of the image exactly unchanged, including the illuminated upper bamboo leaves <bamboo_1>, the shadowed vertical trunks <bamboo_2>, the frost-covered lower stalks and ground <bamboo_3>, the slanting shafts of light <light_1>, the massive foreground trunk <bamboo_4>, the fallen hollow log <log_1>, the frozen stream <stream_1>, the stone lantern <lantern_1>, the floating frost flakes <particles_1>, and the small perched bird <bird_1>.",
  "rows": [{
    "id": "wolf_1",
    "from": null,
    "src_bbox": null,
    "tgt_bbox": [817, 120, 950, 167],
    "desc": "a Dog",
    "kind": "new"
  }, {
    "id": "bamboo_1",
    "from": "ref_image_0",
    "src_bbox": [0, 0, 350, 1000],
    "tgt_bbox": [0, 0, 350, 1000],
    "desc": "Dense bamboo leaves and upper stalks illuminated by white sunlight. Translucent dew drops cling to the bright green foliage, creating small specular highlights.",
    "kind": "anchor"
  }, {
    "id": "bamboo_2",
    "from": "ref_image_0",
    "src_bbox": [300, 0, 750, 1000],
    "tgt_bbox": [300, 0, 750, 1000],
    "desc": "Thick, vertical bamboo trunks receding into dense, charcoal-tinted shadows. The green color of the stalks is darkened by the heavy shade and foggy atmosphere.",
    "kind": "anchor"
  }, {
    "id": "bamboo_3",
    "from": "ref_image_0",
    "src_bbox": [700, 0, 1000, 1000],
    "tgt_bbox": [700, 0, 1000, 1000],
    "desc": "The lower segments of the bamboo stalks and the ground, encrusted in sharp, frozen white frost crystals. The textures are crisp and perfectly still.",
    "kind": "anchor"
  }, {
    "id": "light_1",
    "from": "ref_image_0",
    "src_bbox": [200, 0, 900, 1000],
    "tgt_bbox": [200, 0, 900, 1000],
    "desc": "Parallel, slanting shafts of bright cream-white light slicing diagonally through the atmospheric fog, creating sharp, alternating bands of illumination and velvet shadow.",
    "kind": "anchor"
  }, {
    "id": "bamboo_4",
    "from": "ref_image_0",
    "src_bbox": [0, 850, 1000, 1000],
    "tgt_bbox": [0, 850, 1000, 1000],
    "desc": "A massive, thick bamboo trunk positioned in the immediate foreground on the right side, its surface detailed with horizontal nodes and a light dusting of frost near the bottom.",
    "kind": "anchor"
  }, {
    "id": "log_1",
    "from": "ref_image_0",
    "src_bbox": [850, 600, 950, 850],
    "tgt_bbox": [850, 600, 950, 850],
    "desc": "A fallen, hollow bamboo log resting horizontally on the ground, heavily coated in sharp white frost crystals.",
    "kind": "anchor"
  }, {
    "id": "stream_1",
    "from": "ref_image_0",
    "src_bbox": [800, 400, 1000, 550],
    "tgt_bbox": [800, 400, 1000, 550],
    "desc": "A narrow, frozen stream winding through the frosty terrain, its icy surface reflecting the ambient light.",
    "kind": "anchor"
  }, {
    "id": "lantern_1",
    "from": "ref_image_0",
    "src_bbox": [750, 300, 880, 380],
    "tgt_bbox": [750, 300, 880, 380],
    "desc": "A stone lantern, partially buried in the frost, constructed from dark charcoal-colored stone.",
    "kind": "anchor"
  }, {
    "id": "particles_1",
    "from": "ref_image_0",
    "src_bbox": [400, 200, 700, 800],
    "tgt_bbox": [400, 200, 700, 800],
    "desc": "Tiny, floating frost flakes suspended in the foggy air, illuminated by the slanting light shafts.",
    "kind": "anchor"
  }, {
    "id": "bird_1",
    "from": "ref_image_0",
    "src_bbox": [450, 500, 480, 530],
    "tgt_bbox": [450, 500, 480, 530],
    "desc": "A small, dark-feathered bird perched motionless on a bamboo node, forming a silhouette against the fog.",
    "kind": "anchor"
  }]
}, {
  "key": "cliff-after",
  "title": "Recolor, keep the text",
  "op": "recolour",
  "instruction": "Change the jacket to blue.",
  "before": "/images/flux3-image/layouts/cliff-before.webp",
  "after": "/images/flux3-image/layouts/cliff-after.webp",
  "width": 768,
  "height": 1360,
  "record": "In <ref_image_0>, change the bright red hooded jacket worn by the person <person_1> standing atop the rock pinnacle <rock_1> to blue. Keep everything else in the image exactly unchanged, including the text <En_Text_1>, the overcast sky <sky_1>, the distant hills <hills_1>, the composition, and the lighting.",
  "rows": [{
    "id": "person_1",
    "from": null,
    "src_bbox": null,
    "tgt_bbox": [378, 542, 492, 734],
    "desc": "Change the jacket to blue.",
    "kind": "new"
  }, {
    "id": "rock_1",
    "from": "ref_image_0",
    "src_bbox": [485, 0, 1000, 875],
    "tgt_bbox": [485, 0, 1000, 875],
    "desc": "A steep, jagged rock formation rising to a point. It is dark gray and brown, covered in patches of green moss and some white snow or frost near the bottom.",
    "kind": "anchor"
  }, {
    "id": "En_Text_1",
    "from": "ref_image_0",
    "src_bbox": [49, 0, 372, 1000],
    "tgt_bbox": [49, 0, 372, 1000],
    "desc": "The text \"bigger\\nidiots\\nthan you\\nhave done it\" written in large, bold, lowercase, white sans-serif font. The text is center-aligned and spans four lines.",
    "kind": "anchor"
  }, {
    "id": "sky_1",
    "from": "ref_image_0",
    "src_bbox": [0, 0, 1000, 1000],
    "tgt_bbox": [0, 0, 1000, 1000],
    "desc": "A pale, overcast sky filled with thick, diffused fog, casting a soft, even, muted gray-white light over the entire scene.",
    "kind": "anchor"
  }, {
    "id": "hills_1",
    "from": "ref_image_0",
    "src_bbox": [400, 0, 550, 1000],
    "tgt_bbox": [400, 0, 550, 1000],
    "desc": "The hazy, barely discernible silhouettes of distant rolling hills and mountains, appearing as soft, flat bands of muted blue-gray through the thick fog along the horizon.",
    "kind": "anchor"
  }]
}];

export const FLUX3_LAYOUT_EXAMPLES = [{
  "key": "runner",
  "title": "Stippled runner",
  "image": "https://cdn.sanity.io/images/2gpum2i6/production/18b18904e3840c135281c61d65968b8eb67e5d28-1400x1400.webp",
  "width": 1400,
  "height": 1400,
  "aspect_ratio": "1:1",
  "caption": "Minimalist graphic illustration featuring a black silhouette of a person <silhouette_1> centered against a solid, vibrant chartreuse background <background_1>. The figure is captured in a dynamic, mid-stride running pose, facing toward the left side of the frame. The image relies entirely on the high-contrast relationship between the two colors, mimicking a digital recreation of a screen-printed or risograph aesthetic, with no discernible light source or shadow.",
  "rows": [{
    "id": "background_1",
    "bbox": [0, 0, 1000, 1000],
    "desc": "A flat field of neon yellow-green possessing a subtle, tactile paper texture with fine, organic grain and slight variations in color saturation, giving the flat surface a sense of physical depth."
  }, {
    "id": "silhouette_1",
    "bbox": [150, 150, 850, 850],
    "desc": "A black silhouette of a person in motion, composed of a dense, stippled texture that resembles physical ink on paper or a low-resolution digital dither. The leading edges, including the front of the head, chest, and forward leg, are relatively solid and opaque. The trailing edges, such as the back, outstretched rear arm, and lifted back leg, dissolve into a spray of coarse, square-shaped pixels and scattered dots. The black ink shows a slight textural irregularity, as if pressed onto a porous surface."
  }],
  "hidden": ["background_1"]
}, {
  "key": "rooftop",
  "title": "Four on a rooftop",
  "image": "https://cdn.sanity.io/images/2gpum2i6/production/c09c527456f5197586d179ca9522c4afc556b4a2-1400x927.webp",
  "width": 1400,
  "height": 927,
  "aspect_ratio": "3:2",
  "caption": "High-angle black and white photograph with a grainy film texture. In the right foreground, a brightly lit, pale, flat rooftop <rooftop_1> anchors the composition. Four men in dark suits <person_1> <person_2> <person_3> <person_4> walk in mid-stride towards the right edge of the building, rendered almost entirely as silhouettes against the stark surface. They cast long, sharp diagonal shadows that stretch out before them under harsh, directional lighting. To the left, a plunging view reveals a deep urban canyon and a congested city street <street_1> far below, bisecting the dense architecture. The avenue is packed with a multitude of cars and buses <vehicle_collection_1> appearing as small dark shapes, alongside tiny figures of pedestrians <pedestrian_collection_1> dotting the sidewalks and crosswalks. The street is sharply split by light and shadow, with the left side plunged into deep darkness while the right catches intense sunlight. A faint haze or smoke <haze_1> drifts near the lower central portion of the canyon. The background is filled with towering, monolithic skyscrapers <skyscraper_collection_1> featuring repetitive grids of windows. The buildings recede into the distance, their details softening in the atmospheric perspective.",
  "rows": [{
    "id": "rooftop_1",
    "bbox": [400, 450, 1000, 1000],
    "desc": "a brightly lit, pale, flat concrete rooftop surface"
  }, {
    "id": "person_1",
    "bbox": [500, 500, 750, 600],
    "desc": "a man wearing a dark suit, rendered almost entirely as a black silhouette"
  }, {
    "id": "person_2",
    "bbox": [520, 620, 770, 720],
    "desc": "a silhouetted man in a dark suit, captured in mid-stride walking towards the right"
  }, {
    "id": "person_3",
    "bbox": [540, 740, 790, 840],
    "desc": "a man in a dark suit walking to the right, visible as a high-contrast silhouette"
  }, {
    "id": "person_4",
    "bbox": [560, 860, 810, 960],
    "desc": "a silhouetted figure of a man in a dark suit, striding towards the right"
  }, {
    "id": "street_1",
    "bbox": [100, 0, 1000, 450],
    "desc": "a deep urban canyon framing a city street viewed from a plunging high angle"
  }, {
    "id": "vehicle_collection_1",
    "bbox": [500, 50, 950, 400],
    "desc": "a dense collection of cars and buses navigating the street far below"
  }, {
    "id": "pedestrian_collection_1",
    "bbox": [550, 20, 900, 420],
    "desc": "numerous tiny figures of pedestrians scattered along the sidewalks"
  }, {
    "id": "haze_1",
    "bbox": [700, 100, 950, 400],
    "desc": "a faint, semi-translucent patch of haze or smoke drifting through the air"
  }, {
    "id": "skyscraper_collection_1",
    "bbox": [0, 0, 500, 1000],
    "desc": "a dense cluster of towering, monolithic skyscrapers"
  }],
  "hidden": []
}, {
  "key": "tokyo",
  "title": "Tokyo poster",
  "image": "https://cdn.sanity.io/images/2gpum2i6/production/04cedf90362e61a3227028a045e8f1113c0168be-927x1400.webp",
  "width": 927,
  "height": 1400,
  "aspect_ratio": "2:3",
  "caption": "A stylized digital illustration in a flat, graphic anime style, resembling a modern pop-art poster with non-directional, uniform lighting. The composition is built on a vibrant background <background_1>. Framed in a medium close-up from the chest up, a young demonic woman <character_1> occupies the center, angled in a three-quarter view and looking back over her shoulder. Large, bold Japanese typography <Ja_Text_1> runs down the left side of the frame, while another block of typography <Ja_Text_2> is positioned in the upper right section. In the lower right corner rests a square seal <Ja_Text_3>. At the bottom center, a line of bright text <Ja_Text_4> sits directly above a smaller line of text <Unknown_Text_1>.",
  "rows": [{
    "id": "background_1",
    "bbox": [0, 0, 1000, 1000],
    "desc": "A vibrant, solid primary yellow background field, scattered with small, dark blue stylized cloud-like shapes and scattered black specks that resemble spray-paint distress marks."
  }, {
    "id": "character_1",
    "bbox": [250, 150, 1000, 850],
    "desc": "A young woman rendered with clean, bold black outlines and flat areas of color without gradients. She has pale, cool lavender-blue skin, pointed ears, and two small, curved horns protruding from the top of her head. Her large, almond-shaped eyes have bright red irises and black pupils, and she wears a neutral, slightly aloof expression. Her hair is straight, shoulder-length, and matching lavender-blue, styled with short, blunt bangs. A thin red stick protrudes from the side of her mouth, and she wears a square red earring. Her layered outfit consists of a red turtleneck under a dark blue hooded jacket. The jacket features subtle cross-hatching texture, a large red collar, a circular smiley-face patch on the chest, and a rectangular pocket adorned with a jagged, tooth-like pattern."
  }, {
    "id": "Ja_Text_1",
    "bbox": [100, 50, 600, 180],
    "desc": "Large, bold red kanji and katakana characters arranged vertically, featuring distressed, spray-paint-like edges. The text reads \"ストリート\\n悪魔\"."
  }, {
    "id": "Ja_Text_2",
    "bbox": [50, 780, 400, 920],
    "desc": "Large, bold red kanji characters arranged vertically, featuring distressed, spray-paint-like edges. The text reads \"東京\"."
  }, {
    "id": "Ja_Text_3",
    "bbox": [820, 820, 920, 920],
    "desc": "A red square seal containing stylized, archaic characters, resembling a traditional Japanese hanko stamp. The text reads \"印\"."
  }, {
    "id": "Ja_Text_4",
    "bbox": [880, 350, 930, 650],
    "desc": "The text \"たうのさん\" written horizontally in a vibrant yellow, clean, flat sans-serif font."
  }, {
    "id": "Unknown_Text_1",
    "bbox": [940, 350, 970, 650],
    "desc": "A line of small, less legible white text written horizontally, reading \"ORIGINAL ARTWORK\"."
  }],
  "hidden": []
}, {
  "key": "soleil",
  "title": "Le Festival du Soleil",
  "image": "https://cdn.sanity.io/images/2gpum2i6/production/e0a80c721e2962973d76903f966160e06d7e5ed7-1050x1400.webp",
  "width": 1050,
  "height": 1400,
  "aspect_ratio": "3:4",
  "caption": "Vertical 35mm photograph with fine grain and slightly soft focus. Centered at the top is a cream-colored title <Fr_Text_1>. A hazy, pale grey and green overcast sky <sky_1> sits above dark, rolling mountains <mountains_1> and a distant coastal town <town_1> on the right. In the dark water <water_1> of a bay stands a massive, pale concrete parabolic dome <dome_1>. The dome's arched opening faces the shore, radiating a warm, golden-orange glow from its interior. A dark rectangular monolith <monolith_1> sits deep inside at water level. The golden light reflects on the rippling water, where scattered silhouettes of people <swimmers_1> wade. In the foreground, a pale, pebbly beach <beach_1> holds a large crowd of seated onlookers <crowd_1> in casual, light-colored clothing. Their backs are to the slightly elevated camera as they gaze at the structure under blue hour lighting.",
  "rows": [{
    "id": "Fr_Text_1",
    "bbox": [40, 200, 100, 800],
    "desc": "\"LE FESTIVAL DU SOLEIL\" written in a thin, elegant, serif typeface in a light cream color"
  }, {
    "id": "sky_1",
    "bbox": [0, 0, 280, 1000],
    "desc": "a hazy, overcast sky in muted tones of pale grey and muted green"
  }, {
    "id": "mountains_1",
    "bbox": [200, 0, 400, 700],
    "desc": "dark, rolling mountains forming the backdrop along the coastline"
  }, {
    "id": "town_1",
    "bbox": [280, 700, 420, 1000],
    "desc": "faint lights and small buildings of a coastal town at the foot of the hills"
  }, {
    "id": "water_1",
    "bbox": [380, 0, 750, 1000],
    "desc": "dark bay water with a rippling surface"
  }, {
    "id": "dome_1",
    "bbox": [250, 150, 650, 850],
    "desc": "a massive, smooth parabolic dome of pale concrete"
  }, {
    "id": "monolith_1",
    "bbox": [550, 460, 610, 540],
    "desc": "a small, dark rectangular silhouette resembling a stage or monolith"
  }, {
    "id": "swimmers_1",
    "bbox": [580, 200, 720, 800],
    "desc": "dozens of small, silhouetted figures scattered in the dark water, wading"
  }, {
    "id": "beach_1",
    "bbox": [720, 0, 1000, 1000],
    "desc": "a pale, pebbly beach filling the foreground"
  }, {
    "id": "crowd_1",
    "bbox": [740, 0, 1000, 1000],
    "desc": "a large crowd of people seated on the beach in casual, light-colored summer attire"
  }],
  "hidden": []
}, {
  "key": "on-time",
  "title": "You'll do everything on time",
  "image": "https://cdn.sanity.io/images/2gpum2i6/production/395c953738988b8a24832fe2c3ca843a5a40d096-786x1400.webp",
  "width": 786,
  "height": 1400,
  "aspect_ratio": "9:16",
  "caption": "Monochromatic graphic design poster framed by solid black letterbox bars at the top <bar_1> and bottom <bar_2>. The background is a textured, off-white surface <background_1>. Dominating the left side of the vertical frame is a large, abstract black mass <mass_1>. To the right of this mass, stacked lowercase text is printed <En_Text_1>. Further down on the right side, a second block of text sits <En_Text_2>. Near the bottom center, positioned below the abstract mass and to the left of the lower text, is a pair of disembodied eyes <eyes_1>. The entire composition features a distressed, photocopy-like aesthetic with heavy grain, noise, and stark black-and-white contrast.",
  "rows": [{
    "id": "bar_1",
    "bbox": [0, 0, 80, 1000],
    "desc": "a solid black horizontal rectangle forming a top letterbox border"
  }, {
    "id": "bar_2",
    "bbox": [920, 0, 1000, 1000],
    "desc": "a solid black horizontal rectangle forming a bottom letterbox border"
  }, {
    "id": "background_1",
    "bbox": [80, 0, 920, 1000],
    "desc": "a textured, off-white surface spanning the area between the black bars"
  }, {
    "id": "mass_1",
    "bbox": [150, 50, 750, 480],
    "desc": "a large, abstract black smear resembling a distorted face"
  }, {
    "id": "En_Text_1",
    "bbox": [350, 500, 520, 920],
    "desc": "legible black lowercase text reading \"you'll do\\neverything\""
  }, {
    "id": "En_Text_2",
    "bbox": [700, 550, 780, 880],
    "desc": "black lowercase text reading \"on time\""
  }, {
    "id": "eyes_1",
    "bbox": [760, 250, 860, 500],
    "desc": "a pair of human eyes, cropped without a surrounding face"
  }],
  "hidden": []
}, {
  "key": "panels",
  "title": "Two tall panels",
  "image": "https://cdn.sanity.io/images/2gpum2i6/production/64091d4e438efef0fcc67d2e7f76592180f86837-1050x1400.webp",
  "width": 1050,
  "height": 1400,
  "aspect_ratio": "3:4",
  "caption": "Full-color graphic design on a solid black background <background_1>. The composition features two tall, narrow rectangular panels styled as perforated postage stamps, separated by a vertical black gutter. The left panel <panel_1> is rendered in the style of a traditional Japanese ukiyo-e woodblock print with aged paper texture, subtle grain, and ink bleed, depicting dark, craggy rocks and lush green foreground foliage. Down the center of this panel, a cascading waterfall <waterfall_1> tumbles over the rocks. A small wooden bridge <bridge_1> spans the chasm in the middle ground, where two figures stand. On the left is a figure in a light blue kimono and straw hat <person_1>, and on the right is a figure in a purple kimono holding a red parasol <person_2>. White text overlays the left panel at the top <En_Text_1> and bottom <En_Text_2>. The right panel <panel_2> shares the same ukiyo-e style, perforated edges, and horizontal segment divisions, showing a serene landscape. At the top, a sloping mountain <mountain_1> sits under a gradient twilight sky with silhouetted pine trees. In the middle ground, a traditional Japanese house <house_1> rests on a rocky cliff, its windows emitting a warm yellow light. Below the cliff, a rushing turquoise river <river_1> filled with dark grey boulders flows through the foreground. White text is overlaid on the right panel at the top <En_Text_3>, middle <En_Text_4>, and bottom <En_Text_5>. Both panels feature bold outlines, flat areas of color, and high-angle perspectives.",
  "rows": [{
    "id": "background_1",
    "bbox": [0, 0, 1000, 1000],
    "desc": "A solid black background filling the entire frame, providing a dark contrast to the two bright rectangular panels."
  }, {
    "id": "panel_1",
    "bbox": [50, 100, 950, 480],
    "desc": "A tall, narrow rectangular panel on the left, styled as a postage stamp with an outer border of circular perforations. Two horizontal lines of perforations divide the panel evenly into three vertical segments. The artwork within mimics an ukiyo-e woodblock print on aged paper with subtle grain and ink bleed, depicting dark, craggy rocks and lush green foliage in the foreground."
  }, {
    "id": "waterfall_1",
    "bbox": [150, 150, 850, 430],
    "desc": "A cascading waterfall tumbling down the rocky face in the left panel, rendered in flat areas of white and pale blue with rhythmic, curved outlines indicating the downward flow of the water."
  }, {
    "id": "bridge_1",
    "bbox": [440, 150, 480, 430],
    "desc": "A small wooden bridge spanning the rocky chasm in the middle ground of the left panel, constructed with simple, bold outlines and flat earthy brown tones."
  }, {
    "id": "person_1",
    "bbox": [340, 220, 450, 290],
    "desc": "A small figure standing on the left side of the wooden bridge, wearing a light blue kimono with a flat geometric pattern and a wide yellow straw hat."
  }, {
    "id": "person_2",
    "bbox": [320, 310, 450, 400],
    "desc": "A small figure standing on the right side of the wooden bridge, wearing a purple kimono and holding up a bright red parasol decorated with white floral patterns."
  }, {
    "id": "En_Text_1",
    "bbox": [80, 120, 160, 460],
    "desc": "White sans-serif typography overlaid at the top of the left panel, reading \"i could stay here with you\\n愛してる\", with the English text positioned above the Japanese characters."
  }, {
    "id": "En_Text_2",
    "bbox": [850, 120, 920, 460],
    "desc": "White sans-serif typography overlaid at the bottom of the left panel, reading \"永遠 forever and ever\"."
  }, {
    "id": "panel_2",
    "bbox": [50, 520, 950, 900],
    "desc": "A tall, narrow rectangular panel on the right, styled as a postage stamp with a perforated outer edge and two horizontal lines of perforations dividing it into three segments. The artwork shares the ukiyo-e woodblock print style, aged paper texture, and ink bleed, depicting a rocky cliff overlooking a river."
  }, {
    "id": "mountain_1",
    "bbox": [60, 530, 400, 890],
    "desc": "A sloping mountain in the background of the right panel, set against a soft twilight sky that transitions from pale orange at the horizon to deep cerulean blue at the top. Tall, slender pine trees are silhouetted against the sky."
  }, {
    "id": "house_1",
    "bbox": [380, 650, 550, 850],
    "desc": "A traditional Japanese house perched on a rocky cliff in the middle ground of the right panel. It features dark wood construction, a tiled roof, and windows emitting a warm, glowing yellow light."
  }, {
    "id": "river_1",
    "bbox": [550, 530, 940, 890],
    "desc": "A rushing river filling the foreground of the right panel, rendered in vibrant turquoise with churning white water and dark grey boulders breaking the surface."
  }, {
    "id": "En_Text_3",
    "bbox": [80, 540, 160, 880],
    "desc": "White sans-serif typography overlaid at the top of the right panel, reading \"Someday You’ll Find Me\\nどこか\"."
  }, {
    "id": "En_Text_4",
    "bbox": [450, 540, 530, 880],
    "desc": "White sans-serif typography overlaid in the middle of the right panel, reading \"Somewhere Quiet\\n静か\"."
  }, {
    "id": "En_Text_5",
    "bbox": [850, 540, 930, 880],
    "desc": "White sans-serif typography overlaid at the bottom of the right panel, reading \"In the Peace & Tranquil\\n平和\"."
  }],
  "hidden": ["background_1"]
}, {
  "key": "spectators",
  "title": "Winter spectators",
  "image": "https://cdn.sanity.io/images/2gpum2i6/production/1ecb99e9f04048560a6b220a0a6accfda39919c0-1400x927.webp",
  "width": 1400,
  "height": 927,
  "aspect_ratio": "3:2",
  "caption": "Full-color outdoor photograph with a shallow depth of field, taken under overcast daytime light at a winter sporting event. A medium close-up captures a row of spectators, focusing on a woman <person_1> seated in the left foreground in profile, facing right. Tucked into her coat and held closely in her lap is a small Pomeranian dog <animal_1>. Seated slightly out of alignment next to her on the right is a man <person_2>, also in profile facing right, holding a Jack Russell Terrier <animal_2> in his lap. Extending to the left behind them is a row of softly blurred spectators, including two blonde women <person_3> <person_4> wearing winter attire. In the background, a hillside covered with dark evergreen trees <region_1> rises against a pale sky. To the upper right, event structures are visible, featuring a white flag <flag_3>, a German flag <flag_1>, a Swiss flag <flag_2>, and a blue banner <structure_1> bearing illegible white text. The composition contrasts the warm browns of the fur coats and dogs with the cooler blues of denim jeans and the muted winter landscape.",
  "rows": [{
    "id": "person_1",
    "bbox": [150, 200, 950, 550],
    "desc": "A woman seen in profile facing right, with fair skin. She wears a voluminous, light brown fur coat, a matching plush fur headband over her hair, oversized dark sunglasses with a silver accent on the frame, and a large, round pearl earring. A patterned silk scarf is tied around her neck, its edges slightly wrinkled. She wears blue denim jeans on her lower half."
  }, {
    "id": "animal_1",
    "bbox": [500, 320, 750, 520],
    "desc": "A small, fluffy Pomeranian dog with reddish-brown fur, tucked partially inside the woman's coat and resting in her lap. The dog's head is turned to look directly toward the camera, featuring dark, alert eyes and a black nose."
  }, {
    "id": "person_2",
    "bbox": [180, 520, 950, 880],
    "desc": "A man seen in profile facing right, with fair skin. He wears a dark brown knit beanie, wire-rimmed eyeglasses, a dark leather jacket layered over a red sweater, black leather gloves showing a few stray light dog hairs, and blue denim jeans."
  }, {
    "id": "animal_2",
    "bbox": [520, 650, 850, 850],
    "desc": "A medium-sized Jack Russell Terrier with white, black, and brown markings and a brown leather collar. The dog sits upright in the man's lap, its body and gaze directed intently to the right."
  }, {
    "id": "person_3",
    "bbox": [250, 50, 700, 220],
    "desc": "A softly blurred figure of a woman with blonde hair, wearing sunglasses and a bulky winter coat, seated in the background row."
  }, {
    "id": "person_4",
    "bbox": [260, 0, 650, 120],
    "desc": "A softly blurred figure of a woman with blonde hair, wearing a fur hat and a winter jacket, seated further down the row near the left edge of the frame."
  }, {
    "id": "region_1",
    "bbox": [0, 0, 350, 1000],
    "desc": "A softly blurred background expanse of a hillside densely covered with dark evergreen trees, sitting below a flat, pale overcast sky."
  }, {
    "id": "flag_3",
    "bbox": [70, 680, 210, 760],
    "desc": "A softly blurred plain white flag flying from a pole."
  }, {
    "id": "flag_1",
    "bbox": [80, 780, 220, 860],
    "desc": "A softly blurred German flag with black, red, and gold horizontal stripes, flapping from a pole."
  }, {
    "id": "flag_2",
    "bbox": [90, 880, 230, 960],
    "desc": "A softly blurred Swiss flag, featuring a red square with a white cross, flying from a pole."
  }, {
    "id": "structure_1",
    "bbox": [250, 750, 450, 980],
    "desc": "A softly blurred blue banner attached to a distant metal event structure, displaying illegible white text."
  }],
  "hidden": []
}, {
  "key": "portraits",
  "title": "Portrait grid",
  "image": "https://cdn.sanity.io/images/2gpum2i6/production/f8ae52b08b10a2c3f4f346dbce43216e2357d3dd-1400x927.webp",
  "width": 1400,
  "height": 927,
  "aspect_ratio": "3:2",
  "caption": "Studio photograph of a fashion mood board arranged as a grid of fifteen rectangular images separated by clean white borders <board_1>. The top row contains five images: a woman sitting with a wide stance in a black leather jumpsuit <image_1>, a close-up of legs in red tights <image_2>, a blurred figure in a dark blue velvet garment <image_3>, a woman in a black ribbed turtleneck with closed eyes <image_4>, and a black-and-white shot of legs in high heels on a chair <image_5>. The middle row features a high-contrast face close-up <image_6>, a portrait of a woman with closed eyes and a pearl earring <image_7>, the back of a head with wavy hair being combed <image_8>, a motion-blurred facial profile <image_9>, and a figure mid-stride in a dark skirt and boots <image_10>. The bottom row displays a black-and-white profile of a bob haircut <image_11>, an extreme close-up of an eye and damp hair <image_12>, white flower petals on a black background <image_13>, a low-angle shot of a teal leather jacket and silver trousers <image_14>, and a close-up of a hand wearing silver rings <image_15>.",
  "rows": [{
    "id": "board_1",
    "bbox": [0, 0, 1000, 1000],
    "desc": "A flat white surface forming the background and intersecting borders of the grid layout."
  }, {
    "id": "image_1",
    "bbox": [20, 20, 326, 196],
    "desc": "A color photograph of a woman with fair skin sitting on a stool with a wide stance, wearing a glossy black leather jumpsuit."
  }, {
    "id": "image_2",
    "bbox": [20, 216, 326, 392],
    "desc": "A color photograph focusing on a pair of legs wearing vibrant red opaque tights against a neutral grey background."
  }, {
    "id": "image_3",
    "bbox": [20, 412, 326, 588],
    "desc": "A color photograph showing a figure in a dark blue velvet garment, heavily motion-blurred to obscure the body details."
  }, {
    "id": "image_4",
    "bbox": [20, 608, 326, 784],
    "desc": "A black-and-white photograph of a woman with dark skin wearing a black ribbed turtleneck sweater, her head tilted slightly back with her eyes closed."
  }, {
    "id": "image_5",
    "bbox": [20, 804, 326, 980],
    "desc": "A black-and-white photograph showing a woman's legs crossed, wearing dark high heels, resting on the edge of a minimalist wire chair."
  }, {
    "id": "image_6",
    "bbox": [346, 20, 652, 196],
    "desc": "A black-and-white photograph featuring a tight close-up of a woman's face with pale skin, illuminated by harsh directional light casting deep shadows."
  }, {
    "id": "image_7",
    "bbox": [346, 216, 652, 392],
    "desc": "A color photograph of a woman with olive skin facing forward, her eyes closed, wearing a single large pearl earring."
  }, {
    "id": "image_8",
    "bbox": [346, 412, 652, 588],
    "desc": "A black-and-white photograph showing the back of a person's head with long wavy hair; a black comb is caught mid-stroke through the strands."
  }, {
    "id": "image_9",
    "bbox": [346, 608, 652, 784],
    "desc": "A black-and-white photograph of a woman's profile, rendered with horizontal motion blur that smears her features."
  }, {
    "id": "image_10",
    "bbox": [346, 804, 652, 980],
    "desc": "A color photograph of a person captured mid-stride, wearing a dark flowing skirt and black leather boots, the fabric trailing behind them."
  }, {
    "id": "image_11",
    "bbox": [672, 20, 978, 196],
    "desc": "A black-and-white photograph of a woman's profile, featuring a sharp, chin-length bob haircut against a bright white background."
  }, {
    "id": "image_12",
    "bbox": [672, 216, 978, 392],
    "desc": "A black-and-white extreme close-up of a single human eye, surrounded by strands of damp, dark hair clinging to the skin."
  }, {
    "id": "image_13",
    "bbox": [672, 412, 978, 588],
    "desc": "A black-and-white photograph of white flower petals scattered against a solid black background."
  }, {
    "id": "image_14",
    "bbox": [672, 608, 978, 784],
    "desc": "A color photograph taken from a low angle, showing a person wearing a dark teal leather jacket and shimmering silver trousers."
  }, {
    "id": "image_15",
    "bbox": [672, 804, 978, 980],
    "desc": "A black-and-white photograph of a hand with fair skin resting on dark fabric, adorned with multiple thick silver rings."
  }],
  "hidden": []
}, {
  "key": "bench",
  "title": "Three on a bench",
  "image": "https://cdn.sanity.io/images/2gpum2i6/production/1c91f02039d9af9fbffa95a034c72f01dd1006a5-927x1400.webp",
  "width": 927,
  "height": 1400,
  "aspect_ratio": "2:3",
  "caption": "Full-color indoor 35mm photograph with a slight film grain and a warm color cast, lit by harsh, direct camera flash that casts sharp shadows against the background. A light-colored wooden bench <bench_1> sits against a wall of horizontal light-wood panels <wall_1>. On the floor beneath the bench is a vibrant moss-green rug <rug_1>. Seated on the left side of the bench is a man <person_1> captured mid-sip from a glass of amber liquid <glass_1>. In the center sits a humanoid figure <figure_1>. To the right, another man <person_2> sits with a slumped posture, looking downward at a second glass of amber liquid <glass_2> held in his hand. The framing is a full-body shot centered on the three figures, leaving a significant expanse of the wood-paneled wall visible above their heads.",
  "rows": [{
    "id": "wall_1",
    "bbox": [0, 0, 750, 1000],
    "desc": "An indoor wall covered in horizontal light-wood panels. The surface bears sharp, dark cast shadows from the seated subjects, characteristic of a direct, built-in camera flash."
  }, {
    "id": "bench_1",
    "bbox": [480, 50, 780, 950],
    "desc": "A simple, light-colored wooden bench frame topped with a thick, flat white cushion, spanning the width of the frame behind the subjects."
  }, {
    "id": "rug_1",
    "bbox": [730, 0, 1000, 1000],
    "desc": "A vibrant moss-green rug covering the floor area beneath the bench, its textured surface illuminated by the harsh overhead flash."
  }, {
    "id": "person_1",
    "bbox": [300, 80, 920, 380],
    "desc": "A man with fair skin, short brown hair, and glasses. He wears a white short-sleeved button-down shirt with thin vertical black stripes and embroidered patches, including a cartoon dog on the chest. He has black trousers and bright red high-top sneakers. His left hand rests on his knee, revealing a black wristwatch, while his right hand holds a glass to his mouth."
  }, {
    "id": "glass_1",
    "bbox": [360, 240, 430, 300],
    "desc": "A clear glass tumbler partially filled with an amber liquid, held up near the face of the man on the left."
  }, {
    "id": "figure_1",
    "bbox": [320, 360, 900, 640],
    "desc": "A humanoid figure encased in a matte grey, form-fitting fabric suit. The rounded head features two small, dark, circular eyes. Large, white-and-grey robotic hands with articulated fingers are held in a stylized, geometric pose across its chest. Its feet are covered in bulky, rounded grey footwear matching the suit."
  }, {
    "id": "person_2",
    "bbox": [350, 620, 920, 920],
    "desc": "A man with fair skin and short dark hair. He wears a black t-shirt and loose-fitting blue jeans. He has a slumped posture with his left arm resting across his lap, looking downward. His right hand holds a glass of liquid."
  }, {
    "id": "glass_2",
    "bbox": [640, 680, 720, 750],
    "desc": "A clear glass tumbler containing amber liquid, held low over the lap in the right hand of the man on the right."
  }],
  "hidden": []
}, {
  "key": "forest-signs",
  "title": "Cabin, Sauna",
  "image": "https://cdn.sanity.io/images/2gpum2i6/production/d78185f6a0cc1639c2493b30d4779aefd03edb5d-1400x927.webp",
  "width": 1400,
  "height": 927,
  "aspect_ratio": "3:2",
  "caption": "Digital composite image featuring a dense, sunlit forest <forest_1> as the background, shot at eye level. Centered in the foreground is a large, semi-transparent rectangular graphic overlay. Its upper section <region_4> is a subtle clear tint over the canopy. The middle section of the overlay is divided horizontally into two bands. The top band <region_1> consists of vertical stripes alternating between clear transparency and translucent chartreuse yellow, ending in a solid chartreuse square on the far right that contains a black directional sign <En_Text_1>. The lower band <region_2> mirrors this structure with alternating clear and chartreuse stripes, ending in a solid chartreuse square on the far left that holds another black directional sign <En_Text_2>. Below these striped bands, the overlay continues downwards as a dark, slightly distorted filter <region_3> covering the lower forest foliage, creating a sharp contrast between the organic textures of the woods and the crisp, straight edges of the rectangle.",
  "rows": [{
    "id": "forest_1",
    "bbox": [0, 0, 1000, 1000],
    "desc": "A dense forest scene with tall, rough-barked tree trunks flanking the sides, a canopy of lush green leaves above, and a floor densely carpeted with green ferns. Dappled natural sunlight filters through the trees, creating bright highlights against earthy brown and deep green shadows."
  }, {
    "id": "region_4",
    "bbox": [100, 300, 350, 700],
    "desc": "The upper section of a geometric rectangular overlay, appearing as a lightly tinted, semi-transparent pane of glass that slightly shifts the color and contrast of the forest canopy behind it."
  }, {
    "id": "region_1",
    "bbox": [350, 300, 450, 700],
    "desc": "A horizontal band divided into vertical stripes that alternate between clear transparency and translucent chartreuse yellow. On the far right edge, a solid chartreuse yellow square anchors the band."
  }, {
    "id": "En_Text_1",
    "bbox": [365, 615, 435, 685],
    "desc": "A thin, black, right-pointing arrow centered above the word \"Cabin\" in a clean, sans-serif black font."
  }, {
    "id": "region_2",
    "bbox": [450, 300, 550, 700],
    "desc": "A horizontal band directly below the first, featuring the same vertical stripes alternating between clear transparency and translucent chartreuse yellow. On the far left edge, a solid chartreuse yellow square anchors the band."
  }, {
    "id": "En_Text_2",
    "bbox": [465, 315, 535, 385],
    "desc": "A thin, black, left-pointing arrow centered above the word \"Sauna\" in a clean, sans-serif black font."
  }, {
    "id": "region_3",
    "bbox": [550, 300, 900, 700],
    "desc": "The lower section of the rectangular overlay, functioning as a dark, slightly distorted semi-transparent filter that overlays the ferns on the forest floor, dimming the greens and browns beneath its crisp geometric edges."
  }],
  "hidden": ["forest_1"]
}, {
  "key": "moodboard",
  "title": "Fashion moodboard",
  "image": "/images/flux3-image/layouts/moodboard.webp",
  "width": 1050,
  "height": 1400,
  "aspect_ratio": "3:4",
  "caption": "Formal digital collage serving as a fashion mood board, structured into rectangular panels separated by thin white borders against a stark white background canvas. In the upper left, a square panel <panel_1> sits beside a taller rectangular panel <panel_2> in the upper middle, with another square panel <panel_3> on the upper right. Running vertically down the left margin is a text block <En_Text_1>. The middle section is dominated by a large, wide panel <panel_4>. Below this, a horizontal row contains four smaller detail panels: the first <panel_5> on the left, the second <panel_6> next to it, the third <panel_7> in the mid-right, and the fourth <panel_8> on the far right, which contains a visible woven label <En_Text_4>. Along the bottom edge, a block of sans-serif text <En_Text_2> sits on the left, while a large script signature <En_Text_3> spans the bottom right.",
  "rows": [{
    "id": "panel_1",
    "bbox": [40, 80, 320, 360],
    "desc": "A 4x4 grid containing sixteen repetitive portraits of a female model with long dark hair and fair skin. Each sub-frame shows her in a neutral gray top, with slight variations in her head tilt and the sharp, high-contrast studio lighting casting deep shadows on her face."
  }, {
    "id": "panel_2",
    "bbox": [40, 380, 460, 660],
    "desc": "A crisp, full-length fashion photograph. A model in a saturated mustard-yellow corduroy suit with wide-leg trousers and a heavy jacket walks toward the camera. They step across a dark, highly reflective studio floor."
  }, {
    "id": "panel_3",
    "bbox": [40, 680, 320, 960],
    "desc": "A close-up shot from behind of a male model with a shaved head wearing a dark blue, heavy denim jacket. A stark white, rectangular fabric tag is stitched onto the upper back yoke of the denim."
  }, {
    "id": "panel_4",
    "bbox": [480, 80, 740, 960],
    "desc": "A grainy, high-contrast behind-the-scenes photograph. In the dark foreground, the black silhouette of a photographer holding a camera is visible. Beyond them, a female model moves rapidly, her long dark hair whipping across her face. She wears a shimmering, pale lavender blazer. The background is a hazy, backlit gray studio space with visible rafters and softboxes above."
  }, {
    "id": "panel_5",
    "bbox": [760, 80, 880, 280],
    "desc": "A waist-up portrait of a model with olive skin looking off-camera, wearing a translucent, light purple button-down shirt. The soft lighting catches the sheer, wrinkled texture of the fabric."
  }, {
    "id": "panel_6",
    "bbox": [760, 300, 880, 500],
    "desc": "A tight crop of a model's torso and shoulders. They are wearing a saturated burnt orange ribbed tank top, set against a deep black background."
  }, {
    "id": "panel_7",
    "bbox": [760, 520, 880, 720],
    "desc": "A macro detail shot focusing on layered garments. A glossy brown leather-like jacket is partially unzipped, revealing a bright lime green top underneath."
  }, {
    "id": "panel_8",
    "bbox": [760, 740, 880, 960],
    "desc": "A tight close-up of a dark indigo denim shirt collar. Sewn into the inside neckline is a white fabric label."
  }, {
    "id": "En_Text_4",
    "bbox": [800, 780, 830, 920],
    "desc": "Black, clean sans-serif typography printed on the white label reading \"BIANCA SAUNDERS\"."
  }, {
    "id": "En_Text_1",
    "bbox": [360, 20, 740, 60],
    "desc": "Clean, black, sans-serif text oriented vertically, reading from bottom to top: \"LONDON STUDIO SHOOT\\nPHOTOGRAPHY: JAMIE SHIPSTON-MOURNE\\nSTYLING: NATHAN KLEIN\\nBTS: TYLER MATTHIAS\"."
  }, {
    "id": "En_Text_2",
    "bbox": [900, 80, 960, 500],
    "desc": "Clean, black, sans-serif typography arranged in a left-aligned block reading \"BIANCA SAUNDERS X THE MIDNIGHT CLUB\\nMEET YOU BEFORE SUNRISE\\nSS27 COLLECTION\", followed by two lines of smaller, tightly tracked production credits."
  }, {
    "id": "En_Text_3",
    "bbox": [900, 600, 980, 960],
    "desc": "A large, sweeping black script signature reading \"Meet You Before Sunrise.\"."
  }]
}, {
  "key": "picnic",
  "title": "Picnic in the park",
  "image": "/images/flux3-image/layouts/picnic.webp",
  "width": 1400,
  "height": 927,
  "aspect_ratio": "3:2",
  "caption": "Full-color outdoor photograph with a slight film grain and shallow depth of field, captured from a ground-level, low-angle perspective in an urban park. Warm, directional late-afternoon sunlight filters through a dense canopy of deciduous trees <trees_1> in the background. Occupying the center and extending to the left is a white picnic blanket with thin red horizontal stripes <blanket_1>. A young girl of East Asian descent <girl_1> lies prone on the blanket, leaning forward on her elbows. Her left hand rests near her chest with fingers slightly curled, while her right hand extends toward the right edge of the frame. Just off the blanket on the green grass <grass_1> stands a small brown sparrow <sparrow_1> facing her. In the lower right foreground, a second sparrow <sparrow_2> is partially visible, heavily blurred by the shallow depth of field. Scattered on the left side of the blanket are several picnic items: a clear plastic water bottle with a blue cap <bottle_1>, a red cardboard box <box_1> displaying white text <En_Text_1>, scattered papers <papers_1>, and a small open snack container <container_1>. In the blurred background, a black lamppost <lamppost_1> stands among the trees, and several distant, out-of-focus figures <figures_1> are visible walking and sitting on benches.",
  "rows": [{
    "id": "trees_1",
    "bbox": [0, 0, 400, 1000],
    "desc": "Soft bokeh masses of green and golden-green foliage forming a dense deciduous canopy in the upper background, pierced by warm patches of sunlight."
  }, {
    "id": "blanket_1",
    "bbox": [450, 50, 950, 750],
    "desc": "A white fabric picnic blanket featuring thin, horizontal red stripes, spread across the ground and slightly wrinkled from use."
  }, {
    "id": "girl_1",
    "bbox": [250, 200, 850, 700],
    "desc": "A young girl of East Asian descent with fair skin and dark hair styled in pigtails with front bangs. She wears a white t-shirt featuring a faint, slightly faded pastel rainbow graphic across the chest. She is lying on her stomach, propped up on her elbows. Her expression shows quiet concentration, eyes fixed forward. Her left hand is near her collarbone with curled fingers; her right arm reaches out toward the right side."
  }, {
    "id": "grass_1",
    "bbox": [400, 600, 950, 1000],
    "desc": "A manicured lawn of bright green grass bordering the blanket, illuminated by patches of warm, directional sunlight revealing individual blades."
  }, {
    "id": "sparrow_1",
    "bbox": [650, 720, 800, 850],
    "desc": "A small, sharp-focused brown and grey sparrow standing on the grass, facing left toward the girl's extended hand."
  }, {
    "id": "sparrow_2",
    "bbox": [800, 850, 1000, 1000],
    "desc": "A heavily blurred brown sparrow in the extreme lower right foreground, only partially visible as a soft brown mass with no fine details."
  }, {
    "id": "bottle_1",
    "bbox": [600, 80, 700, 250],
    "desc": "A clear plastic water bottle with a blue plastic screw-on cap, half full of water, lying on its side on the blanket."
  }, {
    "id": "box_1",
    "bbox": [500, 150, 620, 350],
    "desc": "A rectangular red cardboard box sitting on the blanket, angled slightly, with white text printed on its visible side."
  }, {
    "id": "En_Text_1",
    "bbox": [540, 160, 590, 340],
    "desc": "The word \"MONOPOLY\" printed in bold, white capital letters along the side of the red cardboard box."
  }, {
    "id": "papers_1",
    "bbox": [680, 100, 780, 280],
    "desc": "A few loose, slightly crumpled white papers resting flat on the striped blanket."
  }, {
    "id": "container_1",
    "bbox": [720, 250, 820, 380],
    "desc": "A small, translucent plastic snack container holding a few round crackers."
  }, {
    "id": "lamppost_1",
    "bbox": [150, 750, 450, 800],
    "desc": "A tall, classic black metal park lamppost, rendered as a soft, blurred vertical shape in the background."
  }, {
    "id": "figures_1",
    "bbox": [300, 100, 450, 900],
    "desc": "Several unidentifiable blurred figures in casual clothing, appearing as soft shapes of color sitting on park benches and walking in the distant background."
  }]
}, {
  "key": "alphabet",
  "title": "Alphabet poster",
  "image": "/images/flux3-image/layouts/alphabet.webp",
  "width": 1400,
  "height": 1400,
  "aspect_ratio": "1:1",
  "caption": "Digital graphic design mockup shot straight-on with a top-down view under flat, even studio-style lighting. A flat, neutral gray background <background_1> fills the frame. Centered in the composition is a vertical, rectangular black poster <poster_1>, appearing to hover just above the surface due to a soft, diffuse drop shadow extending along its left and bottom edges. The poster displays the complete English alphabet rendered in stark white with a geometric glitch aesthetic, featuring horizontal shifts and missing angular slices. The letters are arranged systematically across five horizontal rows: the first row <En_Text_1>, the second row <En_Text_2>, the third row <En_Text_3>, the fourth row <En_Text_4>, and the fifth row <En_Text_5>. Centered near the bottom edge of the poster is a logo <graphic_1>. Immediately below this emblem, a small line of text <En_Text_6> completes the design.",
  "rows": [{
    "id": "background_1",
    "bbox": [0, 0, 1000, 1000],
    "desc": "A flat, neutral gray background filling the entire frame, completely devoid of surface glare or texture."
  }, {
    "id": "poster_1",
    "bbox": [100, 250, 900, 750],
    "desc": "A vertical, rectangular black poster centered in the frame with perfectly straight, undistorted edges. A soft, diffuse drop shadow extends along its left and bottom edges, creating a hovering illusion."
  }, {
    "id": "En_Text_1",
    "bbox": [150, 300, 250, 700],
    "desc": "Stark white, uppercase letters \"A B C D E F\" featuring a geometric glitch aesthetic with horizontal shifts, staggered alignments, and missing angular slices mimicking digital distortion."
  }, {
    "id": "En_Text_2",
    "bbox": [280, 300, 380, 700],
    "desc": "Stark white, uppercase letters \"G H I J K L\" featuring a geometric glitch aesthetic with horizontal shifts, staggered alignments, and missing angular slices mimicking digital distortion."
  }, {
    "id": "En_Text_3",
    "bbox": [410, 320, 510, 680],
    "desc": "Stark white, uppercase letters \"M N O P Q\" featuring a geometric glitch aesthetic with horizontal shifts, staggered alignments, and missing angular slices mimicking digital distortion."
  }, {
    "id": "En_Text_4",
    "bbox": [540, 320, 640, 680],
    "desc": "Stark white, uppercase letters \"R S T U V\" featuring a geometric glitch aesthetic with horizontal shifts, staggered alignments, and missing angular slices mimicking digital distortion."
  }, {
    "id": "En_Text_5",
    "bbox": [670, 350, 770, 650],
    "desc": "Stark white, uppercase letters \"W X Y Z\" featuring a geometric glitch aesthetic with horizontal shifts, staggered alignments, and missing angular slices mimicking digital distortion."
  }, {
    "id": "graphic_1",
    "bbox": [800, 460, 830, 540],
    "desc": "A minimalist logo depicting a stylized letter \"M\" constructed from overlapping, thin white triangular outlines."
  }, {
    "id": "En_Text_6",
    "bbox": [840, 450, 860, 550],
    "desc": "The text \"MIKE NESS\" printed in a very small, clean, white sans-serif typeface."
  }]
}, {
  "key": "arches",
  "title": "Concrete arches",
  "image": "/images/flux3-image/layouts/arches.webp",
  "width": 1400,
  "height": 1400,
  "aspect_ratio": "1:1",
  "caption": "Full-color architectural photograph shot on 35mm film from a low-angle perspective at ground level, featuring bright, direct sunlight and visible film grain. Under a clear, pale blue sky <sky_1>, a Brutalist concrete structure <building_1> dominates the right and center of the frame. The building features three clusters of tall, nested parabolic arches. At the base of the central section, a flat concrete overhang <overhang_1> shelters a small, dark entrance <entrance_1>. Mounted on the overhang is a large, rectangular red sign <sign_1> displaying a circular emblem <emblem_1> on the left, a line of Georgian script <Ka_Text_1> on top, and English text <En_Text_1> below. Along the ledge behind the sign, several small flags on thin poles <flags_1> are visible. To the left stands a portion of an older, traditional building <building_2> with a slender, tiered tower topped by a metallic spire and a five-pointed star. In the foreground on the far left, a dark green coniferous tree <tree_1> partially obscures the lower levels of a glass-fronted building <building_3>. The structures sit behind a wide set of shallow concrete steps <steps_1> that lead down to a paved plaza made of grey stone blocks <plaza_1> filling the bottom of the frame.",
  "rows": [{
    "id": "sky_1",
    "bbox": [0, 0, 400, 1000],
    "desc": "A clear, pale blue sky filling the upper background, with a slight gradient toward white near the horizon and a faint film grain visible."
  }, {
    "id": "building_1",
    "bbox": [150, 350, 750, 950],
    "desc": "A Brutalist concrete structure featuring three distinct clusters of tall, nested parabolic arches, with the central cluster reaching the highest. The raw, weathered concrete shows subtle variations in grey tones, vertical water streaking, and deep, sharp shadows cast within the recesses."
  }, {
    "id": "overhang_1",
    "bbox": [650, 500, 700, 750],
    "desc": "A flat, thick concrete overhang protruding from the base of the central arched section, casting a harsh, dark shadow beneath it."
  }, {
    "id": "entrance_1",
    "bbox": [700, 550, 750, 700],
    "desc": "A small, dark entrance area recessed beneath the concrete overhang, its interior details lost in deep shadow."
  }, {
    "id": "sign_1",
    "bbox": [640, 520, 690, 730],
    "desc": "A large, rectangular red sign mounted securely to the front face of the concrete overhang, bearing yellow text and a circular emblem."
  }, {
    "id": "emblem_1",
    "bbox": [645, 525, 685, 555],
    "desc": "A circular yellow emblem positioned on the left side of the red sign, featuring abstract geometric inner markings."
  }, {
    "id": "Ka_Text_1",
    "bbox": [645, 560, 660, 720],
    "desc": "Yellow Georgian script reading \"საქართველოს ქრისტიან-დემოკრატიული კავშირი\" printed along the upper section of the red sign in a bold, sans-serif font."
  }, {
    "id": "En_Text_1",
    "bbox": [665, 560, 685, 720],
    "desc": "Yellow, bold sans-serif typography reading \"CHRISTIAN DEMOCRATIC UNION OF GEORGIA\" arranged across two lines on the lower portion of the red sign."
  }, {
    "id": "flags_1",
    "bbox": [590, 520, 640, 730],
    "desc": "Several small, slightly drooping flags attached to thin, mismatched metal poles positioned along the ledge just behind the red sign."
  }, {
    "id": "building_2",
    "bbox": [100, 100, 550, 320],
    "desc": "A portion of an older, traditional building featuring a tall, slender tower topped with a metallic spire and a five-pointed star. It has a classic, tiered design with arched windows, decorative stonework, and uneven weathering on its pale facade."
  }, {
    "id": "tree_1",
    "bbox": [450, 0, 850, 280],
    "desc": "A dark green coniferous tree with dense, textured branches, standing in the foreground and partially obscuring the lower levels of the glass building."
  }, {
    "id": "building_3",
    "bbox": [400, 0, 700, 200],
    "desc": "A modern, glass-fronted building with dark, reflective windows, partially visible behind the foreground tree."
  }, {
    "id": "steps_1",
    "bbox": [750, 300, 820, 1000],
    "desc": "A set of shallow concrete steps spanning the width of the arched structure, showing minor edge wear and a few scattered dry leaves."
  }, {
    "id": "plaza_1",
    "bbox": [820, 0, 1000, 1000],
    "desc": "A wide, paved plaza occupying the foreground, constructed of grey stone blocks with slightly uneven seams and a few scuff marks visible under the bright, direct lighting."
  }]
}, {
  "key": "garden-dinner",
  "idea": "Night at a Japanese restaurant: two diners in red light at the table, a lit pine garden outside.",
  "title": "Dinner by the garden",
  "image": "/images/flux3-image/layouts/garden-dinner.webp",
  "width": 1400,
  "height": 927,
  "aspect_ratio": "3:2",
  "caption": "High-angle, full-color 35mm indoor-outdoor film photograph captured at night, featuring visible grain, deep shadows, and a shallow depth of field that renders the foreground in an atmospheric blur. The composition divides a dimly lit interior dining area on the right from an illuminated exterior garden on the left. In the blurred foreground, bathed in deep, monochromatic red light, two silhouetted figures sit at a dining table <table_1>. A young child with dark hair <person_1> faces the camera as an out-of-focus red shape, while the profile of an adult <person_2> occupies the right edge. Between them, the table holds blurred dishes <dishes_1> and a small candle <candle_1> that provides a warm orange point of light. Through a large window on the left, the sharp exterior scene is set against a pitch-black night sky <sky_1>. A Japanese pine tree <tree_1> is illuminated by a cool, artificial green light, resolving its textured bark and dense needle clusters. Below the tree, a low bamboo fence <fence_1> runs horizontally. Further back, a stone-paved path <path_1> leads into the dark garden, dotted with a few scattered warm-toned lights <lights_1>.",
  "rows": [{
    "id": "table_1",
    "bbox": [700, 200, 1000, 1000],
    "desc": "A blurred, dark dining table occupying the lower foreground, reflecting patches of red and orange light."
  }, {
    "id": "person_1",
    "bbox": [500, 350, 950, 650],
    "desc": "An out-of-focus silhouette of a young child with dark hair, rendered as a soft mass of deep red light and shadow facing the camera."
  }, {
    "id": "person_2",
    "bbox": [400, 700, 1000, 1000],
    "desc": "A heavily blurred silhouette of an adult in profile, bathed in monochromatic red light, occupying the right edge of the frame."
  }, {
    "id": "dishes_1",
    "bbox": [800, 400, 1000, 900],
    "desc": "A collection of heavily blurred plates and bowls, appearing as indistinct dark and red shapes on the table."
  }, {
    "id": "candle_1",
    "bbox": [750, 600, 820, 650],
    "desc": "A small, out-of-focus candle flame forming a bright, warm orange point of light amidst the red foreground."
  }, {
    "id": "sky_1",
    "bbox": [0, 0, 500, 600],
    "desc": "A pitch-black night sky filling the upper left background behind the garden foliage."
  }, {
    "id": "tree_1",
    "bbox": [100, 50, 750, 550],
    "desc": "A sharply focused Japanese pine tree illuminated by cool, vibrant emerald green light. The trunk features textured bark, supporting dense, layered clusters of needle-like foliage."
  }, {
    "id": "fence_1",
    "bbox": [700, 0, 850, 600],
    "desc": "A traditional low bamboo fence running horizontally across the garden, composed of thin, vertically aligned bamboo stalks tied with dark twine."
  }, {
    "id": "path_1",
    "bbox": [750, 100, 950, 400],
    "desc": "A stone-paved path or bridge in the deep background, slightly obscured by shadows, leading back into the dark garden."
  }, {
    "id": "lights_1",
    "bbox": [600, 100, 750, 500],
    "desc": "A few small, distant points of warm-toned light scattered across the dark landscaping in the background."
  }]
}, {
  "key": "tools",
  "idea": "A magazine cover called Tools: a tower of wooden Kapla planks under big blue serif type.",
  "title": "Tools, the magazine",
  "image": "/images/flux3-image/layouts/tools.webp",
  "width": 1050,
  "height": 1400,
  "aspect_ratio": "3:4",
  "caption": "Studio photograph of a publication cover set against a seamless, stark white background. Centered in the vertical frame is a tall architectural structure <structure_1> built from small, uniform wooden planks. Bright, even softbox lighting casts soft, subtle shadows at the base of the construction and within its gaps. Dominating the upper third of the composition is a large title <En_Text_1>, its lower edge partially obscured by the top of the wooden structure. At the bottom of the frame, a smaller subtitle <En_Text_2> stretches horizontally. Tucked into the bottom-left corner is a vertical barcode <barcode_1> accompanied by stacked price markings <En_Text_3>.",
  "rows": [{
    "id": "structure_1",
    "bbox": [180, 250, 850, 750],
    "desc": "A vertical architectural structure assembled from hundreds of small, uniform wooden planks. The wood is light, natural pine with visible grain patterns and a warm, golden-yellow hue. The structure is composed of three main vertical columns of stacked horizontal planks, creating a lattice-like effect with rectangular voids. The top features slanted planks mimicking gabled rooflines and a central chimney-like protrusion."
  }, {
    "id": "En_Text_1",
    "bbox": [80, 150, 220, 850],
    "desc": "Large, bright blue serif typography reading \"Tools\". The bottom edges of the letters are visually cut off where the wooden structure overlaps them."
  }, {
    "id": "En_Text_2",
    "bbox": [880, 150, 920, 850],
    "desc": "A single line of smaller text in a clean, bright blue serif font reading \"Technique and Savoir-faire in Art, Design, Craft, Industry.\""
  }, {
    "id": "barcode_1",
    "bbox": [860, 50, 960, 90],
    "desc": "A vertical black-and-white barcode graphic consisting of parallel lines of varying thickness."
  }, {
    "id": "En_Text_3",
    "bbox": [860, 100, 960, 140],
    "desc": "Small black text displaying the price markings \"25€\\n22£\" in a clean font, stacked vertically."
  }]
}, {
  "key": "layout-grid",
  "idea": "A 4x4 sheet of minimalist poster layouts in sage green and black, each using the letters CFHKNP.",
  "title": "Sixteen layouts",
  "image": "/images/flux3-image/layouts/layout-grid.webp",
  "width": 927,
  "height": 1400,
  "aspect_ratio": "2:3",
  "caption": "Flat, two-dimensional graphic design layout on a plain white background, presenting a four-by-four grid of sixteen rectangular wireframe panels separated by even white margins. The minimalist study explores spatial relationships using a strictly limited palette of white, black, and muted sage green. The top row features four distinct compositions: a panel <panel_1> with a green circle and a central typographic anchor <En_Text_1>, a panel <panel_2> containing a green square and vertical text <En_Text_2>, a panel <panel_3> centered on an organic wavy blob beneath curved text <En_Text_3>, and a panel <panel_4> displaying a sage-green bottle silhouette beside spaced lettering <En_Text_4>. In the second row, a panel <panel_5> with an upward triangle and bottom-right text <En_Text_5> sits next to a panel <panel_6> holding twin rectangles and vertical text <En_Text_6>. Beside them, a panel <panel_7> splits a circle around central text <En_Text_7>, while the row ends with a panel <panel_8> balancing a rotated square above its text <En_Text_8>. The third row begins with a panel <panel_9> featuring a tall rectangular sidebar and top-right text <En_Text_9>, followed by a panel <panel_10> with a lower blob and vertical text <En_Text_10>. A panel <panel_11> pairs a top-right circle with downward-curving text <En_Text_11>, and a panel <panel_12> anchors a wide bottom rectangle under top-aligned text <En_Text_12>. The bottom row completes the grid with a panel <panel_13> pointing a triangle rightward beside vertical text <En_Text_13>, a panel <panel_14> centering a large rectangle and overlaid text <En_Text_14>, a panel <panel_15> with a bottom half-circle and top-aligned text <En_Text_15>, and a final panel <panel_16> presenting a tiny grid of squares next to vertical text <En_Text_16>. In every panel, varied densities of black horizontal lines simulate body text, interacting dynamically with the shapes and typography to create a balanced structural design.",
  "rows": [{
    "id": "panel_1",
    "bbox": [40, 40, 250, 250],
    "desc": "A rectangular layout panel outlined with a thin black border against the white background. It contains a large solid sage-green circle in the upper half and two distinct columns of black horizontal lines simulating body text in the lower half."
  }, {
    "id": "En_Text_1",
    "bbox": [130, 60, 150, 230],
    "desc": "The exact text string \"CFHKNP\" rendered in a black serif font, placed horizontally across the center of the panel between the circle and the line columns."
  }, {
    "id": "panel_2",
    "bbox": [40, 280, 250, 490],
    "desc": "A rectangular layout panel featuring a solid sage-green square in the top left corner. Black horizontal lines of varying widths wrap around the square and fill the lower left area."
  }, {
    "id": "En_Text_2",
    "bbox": [60, 440, 230, 470],
    "desc": "The exact text string \"CFHKNP\" rendered in a black serif font, oriented vertically along the right edge of the panel."
  }, {
    "id": "panel_3",
    "bbox": [40, 520, 250, 730],
    "desc": "A rectangular layout panel with an organic, wavy sage-green blob centered in the middle. Dense blocks of black horizontal lines anchor the bottom third of the composition."
  }, {
    "id": "En_Text_3",
    "bbox": [60, 560, 100, 690],
    "desc": "The exact text string \"CFHKNP\" rendered in a black serif font, curved along an upward arc above the sage-green blob."
  }, {
    "id": "panel_4",
    "bbox": [40, 760, 250, 970],
    "desc": "A rectangular layout panel containing a solid sage-green bottle silhouette on the right side. The left side features sparse, staggered black horizontal lines."
  }, {
    "id": "En_Text_4",
    "bbox": [60, 780, 90, 950],
    "desc": "The exact text string \"CFHKNP\" rendered in a black serif font, placed horizontally with wide letter-spacing across the top edge."
  }, {
    "id": "panel_5",
    "bbox": [280, 40, 490, 250],
    "desc": "A rectangular layout panel displaying a large sage-green triangle pointing upwards in the center. A narrow column of black horizontal lines sits on the far left."
  }, {
    "id": "En_Text_5",
    "bbox": [440, 120, 470, 230],
    "desc": "The exact text string \"CFHKNP\" rendered in a black serif font, positioned horizontally in the bottom right corner."
  }, {
    "id": "panel_6",
    "bbox": [280, 280, 490, 490],
    "desc": "A rectangular layout panel with two tall, thin sage-green rectangles side-by-side in the center. A dense block of black lines occupies the top right quadrant."
  }, {
    "id": "En_Text_6",
    "bbox": [300, 300, 470, 330],
    "desc": "The exact text string \"CFHKNP\" rendered in a black serif font, oriented vertically along the left edge."
  }, {
    "id": "panel_7",
    "bbox": [280, 520, 490, 730],
    "desc": "A rectangular layout panel featuring a sage-green circle split horizontally into two halves with a gap between them. Black horizontal lines fill the top and bottom margins."
  }, {
    "id": "En_Text_7",
    "bbox": [370, 550, 400, 700],
    "desc": "The exact text string \"CFHKNP\" rendered in a black serif font, placed horizontally directly within the gap between the two circle halves."
  }, {
    "id": "panel_8",
    "bbox": [280, 760, 490, 970],
    "desc": "A rectangular layout panel showing a sage-green square rotated forty-five degrees into a diamond shape in the upper center. Short black horizontal lines cluster in the top left corner."
  }, {
    "id": "En_Text_8",
    "bbox": [420, 780, 450, 950],
    "desc": "The exact text string \"CFHKNP\" rendered in a black serif font, spaced out horizontally across the bottom third of the panel."
  }, {
    "id": "panel_9",
    "bbox": [520, 40, 730, 250],
    "desc": "A rectangular layout panel containing a tall sage-green rectangle acting as a left sidebar. The remaining space is filled with evenly spaced black horizontal lines."
  }, {
    "id": "En_Text_9",
    "bbox": [540, 120, 570, 230],
    "desc": "The exact text string \"CFHKNP\" rendered in a black serif font, placed horizontally in the top right corner."
  }, {
    "id": "panel_10",
    "bbox": [520, 280, 730, 490],
    "desc": "A rectangular layout panel with a small organic sage-green blob resting at the bottom. Flanking blocks of black horizontal lines frame the central vertical axis."
  }, {
    "id": "En_Text_10",
    "bbox": [550, 370, 700, 400],
    "desc": "The exact text string \"CFHKNP\" rendered in a black serif font, placed vertically down the center of the panel."
  }, {
    "id": "panel_11",
    "bbox": [520, 520, 730, 730],
    "desc": "A rectangular layout panel featuring a sage-green circle in the top right corner. A single wide column of black horizontal lines dominates the left side."
  }, {
    "id": "En_Text_11",
    "bbox": [650, 580, 700, 700],
    "desc": "The exact text string \"CFHKNP\" rendered in a black serif font, curved in a downward arc beneath the sage-green circle."
  }, {
    "id": "panel_12",
    "bbox": [520, 760, 730, 970],
    "desc": "A rectangular layout panel displaying a wide sage-green rectangle spanning the bottom edge. Three narrow columns of black horizontal lines sit above it."
  }, {
    "id": "En_Text_12",
    "bbox": [540, 780, 570, 950],
    "desc": "The exact text string \"CFHKNP\" rendered in a black serif font, placed horizontally across the top edge."
  }, {
    "id": "panel_13",
    "bbox": [760, 40, 970, 250],
    "desc": "A rectangular layout panel with a sage-green triangle pointing to the right in the center. Black horizontal lines are arranged in staggered blocks at the top and bottom."
  }, {
    "id": "En_Text_13",
    "bbox": [780, 60, 950, 90],
    "desc": "The exact text string \"CFHKNP\" rendered in a black serif font, oriented vertically along the far left edge."
  }, {
    "id": "panel_14",
    "bbox": [760, 280, 970, 490],
    "desc": "A rectangular layout panel featuring a large sage-green rectangle in the center. A dense block of black lines sits just above it."
  }, {
    "id": "En_Text_14",
    "bbox": [850, 300, 880, 470],
    "desc": "The exact text string \"CFHKNP\" rendered in a black serif font, placed horizontally across the middle of the sage-green rectangle."
  }, {
    "id": "panel_15",
    "bbox": [760, 520, 970, 730],
    "desc": "A rectangular layout panel containing a sage-green half-circle resting flat against the bottom edge. A dense block of black horizontal lines occupies the center."
  }, {
    "id": "En_Text_15",
    "bbox": [780, 550, 810, 700],
    "desc": "The exact text string \"CFHKNP\" rendered in a black serif font, placed horizontally at the very top."
  }, {
    "id": "panel_16",
    "bbox": [760, 760, 970, 970],
    "desc": "A rectangular layout panel showing a small two-by-two grid of four tiny sage-green squares in the top left. The lower left contains sparse black horizontal lines."
  }, {
    "id": "En_Text_16",
    "bbox": [780, 920, 950, 950],
    "desc": "The exact text string \"CFHKNP\" rendered in a black serif font, placed vertically along the right edge."
  }]
}];

export const PixelDiff = ({examples = [], mediaBase = ""}) => {
  const [index, setIndex] = useState(0);
  const [view, setView] = useState("edited");
  const ex = examples[index];
  if (!ex) return null;
  const pick = i => {
    setIndex(i);
    setView("edited");
  };
  return <section className="not-prose pixel-diff" aria-label="Pixel difference viewer">
      <style>{`
.pixel-diff{margin:1.5rem 0 2rem;border:1px solid rgba(128,128,128,.25);border-radius:1rem;overflow:hidden;background:rgba(127,127,127,.04)}
.pixel-diff button{font:inherit}
.pixel-diff .pd-picker{display:flex;gap:.4rem;flex-wrap:wrap;padding:.85rem;border-bottom:1px solid rgba(128,128,128,.2)}
.pixel-diff .pd-pill{font-size:.8rem;line-height:1;padding:.5rem .75rem;border-radius:999px;border:1px solid rgba(128,128,128,.35);background:transparent;color:inherit;cursor:pointer}
.pixel-diff .pd-pill[aria-pressed="true"]{background:var(--aspen-evergreen,#486a58);border-color:var(--aspen-evergreen,#486a58);color:#fff}
.pixel-diff .pd-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1rem;padding:1.1rem;align-items:start}
.pixel-diff .pd-tag{margin:0 0 .45rem;font-size:.8rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;opacity:.75}
.pixel-diff .pd-stage{position:relative;border-radius:.6rem;overflow:hidden;background:#111}
.pixel-diff .pd-stage img{display:block;width:100%;height:auto;margin:0}
.pixel-diff .pd-stage img.pd-layer{position:absolute;inset:0;height:100%;transition:opacity .3s}
.pixel-diff .pd-seg{display:inline-flex;margin-top:.6rem;border:1px solid rgba(128,128,128,.35);border-radius:.5rem;overflow:hidden}
.pixel-diff .pd-seg button{padding:.4rem .8rem;font-size:.8rem;background:transparent;border:0;color:inherit;cursor:pointer}
.pixel-diff .pd-seg button[aria-pressed="true"]{background:var(--aspen-evergreen,#486a58);color:#fff}
.pixel-diff .pd-change{margin:0;padding:0 1.1rem 1.1rem;font-size:.85rem;line-height:1.55;opacity:.85}
@media (max-width:720px){.pixel-diff .pd-body{grid-template-columns:minmax(0,1fr)}}
@media (prefers-reduced-motion:reduce){.pixel-diff *{transition:none!important}}
      `}</style>

      <div className="pd-picker" role="group" aria-label="Edits">
        {examples.map((e, i) => <button key={e.key} type="button" className="pd-pill" aria-pressed={i === index ? "true" : "false"} onClick={() => pick(i)}>
            {e.title}
          </button>)}
      </div>

      <div className="pd-body">
        <figure style={{
    margin: 0
  }}>
          <p className="pd-tag">Input</p>
          <div className="pd-stage">
            <img src={mediaBase + ex.input} alt={ex.title + ": input image"} width={ex.width} height={ex.height} />
          </div>
        </figure>
        <figure style={{
    margin: 0
  }}>
          <p className="pd-tag">{view === "mask" ? "Changed pixels" : "Edited"}</p>
          <div className="pd-stage">
            <img src={mediaBase + ex.edited} alt={ex.title + ": edited image"} width={ex.width} height={ex.height} />
            <img className="pd-layer" src={mediaBase + ex.mask} alt={ex.title + ": difference map; bright areas changed, black areas did not"} style={{
    opacity: view === "mask" ? 1 : 0
  }} aria-hidden={view === "mask" ? undefined : "true"} />
          </div>
          <div className="pd-seg" role="group" aria-label="Show image">
            <button type="button" aria-pressed={view === "edited" ? "true" : "false"} onClick={() => setView("edited")}>Edited</button>
            <button type="button" aria-pressed={view === "mask" ? "true" : "false"} onClick={() => setView("mask")}>Changed pixels</button>
          </div>
        </figure>
      </div>
      <p className="pd-change">
        {ex.change}. In Changed pixels, bright areas changed and black areas match the input.
      </p>
    </section>;
};

export const EditExplorer = ({examples = [], mediaBase = ""}) => {
  const KIND = {
    new: {
      label: "New",
      color: "#e0708a",
      note: "Generate at tgt_bbox"
    },
    move: {
      label: "Move",
      color: "#6fb3d9",
      note: "Move from src_bbox to tgt_bbox"
    },
    anchor: {
      label: "Anchor",
      color: "#9fb0c8",
      note: "Keep at the same position"
    }
  };
  const [index, setIndex] = useState(0);
  const [view, setView] = useState("after");
  const [anchors, setAnchors] = useState(false);
  const [active, setActive] = useState(null);
  const [copied, setCopied] = useState(false);
  const [loaded, setLoaded] = useState({});
  const [failed, setFailed] = useState({});
  const ex = examples[index];
  if (!ex) return null;
  const before = mediaBase + ex.before, after = mediaBase + ex.after;
  const ready = loaded[before] && loaded[after];
  const reveal = async (image, key) => {
    try {
      await image.decode();
      setLoaded(current => ({
        ...current,
        [key]: true
      }));
    } catch {
      setFailed(current => ({
        ...current,
        [key]: true
      }));
    }
  };
  const pct = ([y0, x0, y1, x1]) => ({
    top: y0 / 10 + "%",
    left: x0 / 10 + "%",
    height: (y1 - y0) / 10 + "%",
    width: (x1 - x0) / 10 + "%"
  });
  const wire = ex.rows.map(({id, from, src_bbox, tgt_bbox, desc}) => ({
    id,
    from,
    src_bbox,
    tgt_bbox,
    desc
  }));
  const body = {
    prompt: ex.record + " " + JSON.stringify(wire),
    images: [typeof window === "undefined" ? mediaBase + ex.before : new URL(mediaBase + ex.before, window.location.href).href]
  };
  const changed = ex.rows.filter(r => r.kind !== "anchor");
  const shown = anchors ? ex.rows : changed;
  const parts = ex.record.split(/(<[A-Za-z0-9_]+>)/g).filter(Boolean);
  const kindOf = id => (ex.rows.find(r => r.id === id) || ({})).kind;
  const pick = i => {
    setCopied(false);
    setIndex(i);
    setView("after");
    setActive(null);
  };
  const copy = async () => {
    try {
      await navigator.clipboard.writeText(JSON.stringify(body, null, 2));
      setCopied(true);
      setTimeout(() => setCopied(false), 1800);
    } catch (e) {
      setCopied(false);
    }
  };
  const hot = id => ({
    onMouseEnter: () => setActive(id),
    onMouseLeave: () => setActive(null),
    onFocus: () => setActive(id),
    onBlur: () => setActive(null)
  });
  return <section className="not-prose edit-explorer" aria-label="Box edit explorer">
      <style>{`
.edit-explorer{container-type:inline-size;margin:1.5rem 0 2rem;border:1px solid rgba(128,128,128,.25);border-radius:1rem;overflow:hidden;background:rgba(127,127,127,.04)}
.edit-explorer .ex-picker{display:flex;align-items:center;font-size:.85rem;gap:.4rem;flex-wrap:wrap;padding:.85rem;border-bottom:1px solid rgba(128,128,128,.2)}
.edit-explorer .ex-pills{display:flex;flex-wrap:wrap;gap:.4rem}
.edit-explorer .ex-pills button{font:inherit;font-size:.8rem;padding:.3rem .75rem;border:1px solid rgba(128,128,128,.35);border-radius:999px;background:transparent;color:inherit;cursor:pointer}
.edit-explorer .ex-pills button:hover{border-color:var(--aspen-evergreen,#486a58)}
.edit-explorer .ex-pills button[aria-pressed="true"]{background:var(--aspen-evergreen,#486a58);border-color:var(--aspen-evergreen,#486a58);color:#fff}
.edit-explorer button{font:inherit}
.edit-explorer .ex-body{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:1.25rem;padding:1.1rem}
.edit-explorer .ex-stage{position:relative;overflow:hidden;border-radius:.6rem;background:#111}
.edit-explorer .ex-visual{opacity:0;transition:opacity .18s ease}
.edit-explorer .ex-visual.is-ready{opacity:1}
.edit-explorer .ex-loading{position:absolute;inset:0;display:grid;place-items:center;color:#ccc;font-size:.8rem;padding:1rem;text-align:center}
.edit-explorer summary{font-size:.85rem;cursor:pointer;padding:.3rem 0}
.edit-explorer details[open] summary{margin-bottom:.4rem}
.edit-explorer .ex-stage img{display:block;width:100%;height:auto;margin:0}
.edit-explorer .ex-stage img.ex-top{position:absolute;inset:0;height:100%;transition:opacity .35s}
.edit-explorer .ex-box{position:absolute;border:2px solid var(--c);border-radius:3px;pointer-events:none;transition:opacity .2s}
.edit-explorer .ex-box.is-src{border-style:dashed;opacity:.85}
.edit-explorer .ex-box.is-dim{opacity:.2}
.edit-explorer .ex-box.is-hot{border-width:3px;background:color-mix(in srgb,var(--c) 20%,transparent)}
.edit-explorer .ex-box span{position:absolute;left:-2px;bottom:100%;background:var(--c);color:#141414;font:600 10px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace;padding:1px 5px;border-radius:3px 3px 0 0;white-space:nowrap}
.edit-explorer .ex-box.is-inside span{bottom:auto;top:0;border-radius:0 0 3px 0}
.edit-explorer .ex-seg{display:inline-flex;border:1px solid rgba(128,128,128,.35);border-radius:.5rem;overflow:hidden}
.edit-explorer .ex-seg button{padding:.4rem .8rem;font-size:.8rem;background:transparent;border:0;color:inherit;cursor:pointer}
.edit-explorer .ex-seg button[aria-pressed="true"]{background:var(--aspen-evergreen,#486a58);color:#fff}
.edit-explorer .ex-tools{display:flex;gap:.75rem;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-top:.6rem;font-size:.8rem}
.edit-explorer .ex-tools label{display:flex;gap:.4rem;align-items:center;cursor:pointer;opacity:.85}
.edit-explorer .ex-side{display:flex;flex-direction:column;gap:.9rem;min-width:0}
.edit-explorer .ex-h{font:600 .7rem/1 system-ui,sans-serif;letter-spacing:.08em;text-transform:uppercase;opacity:.6;margin:0 0 .4rem}
.edit-explorer .ex-ask{margin:0;font-size:.95rem;font-weight:600}
.edit-explorer .ex-record{margin:0;font-size:.85rem;line-height:1.6}
.edit-explorer .ex-token{font:600 .72rem ui-monospace,SFMono-Regular,Menlo,monospace;padding:.05rem .3rem;margin:0 .1rem;border-radius:.3rem;border:1px solid var(--c);background:color-mix(in srgb,var(--c) 14%,transparent)}
.edit-explorer .ex-token.is-hot{background:var(--c);color:#141414}
.edit-explorer .ex-rows{list-style:none;margin:0;padding:0 .25rem 0 0;display:flex;flex-direction:column;gap:.35rem;max-height:22rem;overflow-y:auto}
.edit-explorer .ex-row{padding:.45rem .6rem;border-radius:.5rem;background:rgba(127,127,127,.07);border:1px solid transparent;font-size:.78rem;outline:none}
.edit-explorer .ex-row.is-hot,.edit-explorer .ex-row:focus-visible{border-color:var(--c)}
.edit-explorer .ex-row header{display:flex;gap:.5rem;align-items:center;justify-content:space-between}
.edit-explorer .ex-row b{font:600 .66rem system-ui,sans-serif;letter-spacing:.06em;text-transform:uppercase;padding:.15rem .4rem;border-radius:.3rem;background:var(--c);color:#141414}
.edit-explorer .ex-row code{font-size:.72rem;background:none;padding:0}
.edit-explorer .ex-row .ex-desc{margin:.25rem 0 0;opacity:.8;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.edit-explorer .ex-copy{align-self:flex-start;font-size:.78rem;font-weight:600;padding:.45rem .8rem;border-radius:.45rem;cursor:pointer;background:var(--aspen-evergreen,#486a58);border:1px solid var(--aspen-evergreen,#486a58);color:#fff}
@container (max-width:760px){.edit-explorer .ex-body{grid-template-columns:minmax(0,1fr)}}
@media (prefers-reduced-motion:reduce){.edit-explorer *{transition:none!important}}
      `}</style>

      {examples.length > 1 ? <div className="ex-picker">
        <div className="ex-pills" role="group" aria-label="Example">
          {examples.map((example, i) => <button key={example.key} type="button" aria-pressed={i === index} onClick={() => pick(i)}>{example.title}</button>)}
        </div>
      </div> : null}

      <div className="ex-body">
        <div>
          <div className="ex-stage" aria-busy={!ready} style={{
    aspectRatio: `${ex.width} / ${ex.height}`
  }}>
            {!ready && <div className="ex-loading" role="status">{failed[before] || failed[after] ? "Image unavailable. Choose another example or reload to retry." : "Loading example…"}</div>}
            <div className={ready ? "ex-visual is-ready" : "ex-visual"} aria-hidden={!ready}>
            <img key={before} src={before} onLoad={event => reveal(event.currentTarget, before)} onError={() => setFailed(current => ({
    ...current,
    [before]: true
  }))} alt={ex.title + ": the image before the edit"} width={ex.width} height={ex.height} />
            <img key={after} className="ex-top" src={after} onLoad={event => reveal(event.currentTarget, after)} onError={() => setFailed(current => ({
    ...current,
    [after]: true
  }))} alt={ex.title + ": the image after the edit"} style={{
    opacity: view === "after" ? 1 : 0
  }} />
            {shown.map(r => {
    const c = KIND[r.kind].color;
    const cls = (...extra) => {
      const list = ["ex-box", ...extra];
      if (active && active !== r.id) list.push("is-dim");
      if (active === r.id) list.push("is-hot");
      return list.join(" ");
    };
    const boxes = [];
    if (r.kind === "move" && view === "before") boxes.push(<div key={r.id + "-src"} className={cls("is-src")} style={{
      ...pct(r.src_bbox),
      "--c": c
    }}><span>{r.id} · src_bbox</span></div>);
    if (r.tgt_bbox && !(r.kind === "move" && view === "before")) boxes.push(<div key={r.id} className={r.tgt_bbox[0] < 40 ? cls("is-inside") : cls()} style={{
      ...pct(r.tgt_bbox),
      "--c": c
    }}><span>{r.kind === "move" ? r.id + " · tgt_bbox" : r.id}</span></div>);
    return boxes;
  })}
            </div>
          </div>
          <div className="ex-tools">
            <div className="ex-seg" role="group" aria-label="Show image">
              <button type="button" aria-pressed={view === "before" ? "true" : "false"} onClick={() => setView("before")}>Before</button>
              <button type="button" aria-pressed={view === "after" ? "true" : "false"} onClick={() => setView("after")}>After</button>
            </div>
            <label>
              <input type="checkbox" checked={anchors} onChange={e => setAnchors(e.target.checked)} />
              Show anchor boxes
            </label>
          </div>
        </div>

        <div className="ex-side">
          <div>
            <p className="ex-h">The change</p>
            <p className="ex-ask">{ex.instruction}</p>
          </div>
          <details>
            <summary>Full prompt</summary>
            <p className="ex-record">
              {parts.map((part, i) => {
    const m = part.match(/^<([A-Za-z0-9_]+)>$/);
    if (!m) return <span key={i}>{part}</span>;
    const kind = kindOf(m[1]);
    if (!kind) return <code key={i} className="ex-token" style={{
      "--c": "#bbb"
    }}>{part}</code>;
    return <code key={i} tabIndex={0} className={active === m[1] ? "ex-token is-hot" : "ex-token"} style={{
      "--c": KIND[kind].color
    }} {...hot(m[1])}>{part}</code>;
  })}
            </p>
          </details>
          <div>
            <p className="ex-h">Elements</p>
            <ul className="ex-rows">
              {shown.map(r => <li key={r.id} tabIndex={0} className={active === r.id ? "ex-row is-hot" : "ex-row"} style={{
    "--c": KIND[r.kind].color
  }} {...hot(r.id)}>
                  <header>
                    <code>{r.id}</code>
                    <b title={KIND[r.kind].note}>{KIND[r.kind].label}</b>
                  </header>
                  <code>from: {JSON.stringify(r.from)} · src: {JSON.stringify(r.src_bbox)} · tgt: {JSON.stringify(r.tgt_bbox)}</code>
                  <div className="ex-desc">{r.desc}</div>
                </li>)}
            </ul>
          </div>
          <button type="button" className="ex-copy" onClick={copy} aria-live="polite">
            {copied ? "Copied" : "Copy request body"}
          </button>
        </div>
      </div>
    </section>;
};

export const LayoutExplorer = ({examples = [], mediaBase = "", initial = 0}) => {
  const COLORS = ["#e8b04a", "#6fb3d9", "#e0708a", "#8fcf7a", "#b99af0", "#f08b5b", "#5fd0c0", "#d9d36f", "#9fb0c8", "#f2a3c7", "#7aa0f0", "#c7e07a"];
  const [index, setIndex] = useState(initial);
  const [active, setActive] = useState(null);
  const [showBoxes, setShowBoxes] = useState(true);
  const [cursor, setCursor] = useState(null);
  const [copied, setCopied] = useState(false);
  const [expanded, setExpanded] = useState(false);
  const stage = useRef(null);
  const [loaded, setLoaded] = useState({});
  const [failedSource, setFailedSource] = useState("");
  const ex = examples[index];
  if (!ex) return null;
  const source = mediaBase + ex.image;
  const ready = Boolean(loaded[source]);
  const reveal = async (image, key) => {
    try {
      await image.decode();
      setLoaded(current => ({
        ...current,
        [key]: true
      }));
    } catch {
      setFailedSource(key);
    }
  };
  const preload = example => {
    const image = new Image();
    image.src = mediaBase + example.image;
  };
  const hidden = new Set(ex.hidden || []);
  const color = id => COLORS[ex.rows.findIndex(r => r.id === id) % COLORS.length];
  const pct = ([y0, x0, y1, x1]) => ({
    top: y0 / 10 + "%",
    left: x0 / 10 + "%",
    height: (y1 - y0) / 10 + "%",
    width: (x1 - x0) / 10 + "%"
  });
  const prompt = ex.caption + " " + JSON.stringify(ex.rows.map(({id, bbox, desc}) => ({
    id,
    bbox,
    desc
  })));
  const pick = i => {
    setCopied(false);
    setIndex(i);
    setActive(null);
    setExpanded(false);
  };
  const copy = async () => {
    try {
      await navigator.clipboard.writeText(JSON.stringify({
        prompt,
        aspect_ratio: ex.aspect_ratio
      }, null, 2));
      setCopied(true);
      setTimeout(() => setCopied(false), 1800);
    } catch (e) {
      setCopied(false);
    }
  };
  const onMove = e => {
    const r = stage.current.getBoundingClientRect();
    const k = v => Math.max(0, Math.min(1000, Math.round(v * 1000)));
    setCursor([k((e.clientY - r.top) / r.height), k((e.clientX - r.left) / r.width)]);
  };
  const parts = ex.caption.split(/(<[A-Za-z0-9_]+>)/g).filter(Boolean);
  const rows = expanded ? ex.rows : ex.rows.slice(0, 6);
  const hot = id => ({
    onMouseEnter: () => setActive(id),
    onMouseLeave: () => setActive(null),
    onFocus: () => setActive(id),
    onBlur: () => setActive(null)
  });
  return <section className="not-prose layout-explorer" aria-label="Layout prompt explorer">
      <style>{`
.layout-explorer{container-type:inline-size;margin:1.5rem 0 2rem;border:1px solid rgba(128,128,128,.25);border-radius:1rem;overflow:hidden;background:rgba(127,127,127,.04)}
.layout-explorer .lx-picker{display:flex;align-items:center;font-size:.85rem;gap:.4rem;flex-wrap:wrap;padding:.85rem;border-bottom:1px solid rgba(128,128,128,.2)}
.layout-explorer .lx-pills{display:flex;flex-wrap:wrap;gap:.4rem}
.layout-explorer .lx-pills button{font:inherit;font-size:.8rem;padding:.3rem .75rem;border:1px solid rgba(128,128,128,.35);border-radius:999px;background:transparent;color:inherit;cursor:pointer}
.layout-explorer .lx-pills button:hover{border-color:var(--aspen-evergreen,#486a58)}
.layout-explorer .lx-pills button[aria-pressed="true"]{background:var(--aspen-evergreen,#486a58);border-color:var(--aspen-evergreen,#486a58);color:#fff}
.layout-explorer .lx-body{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:1.25rem;padding:1.1rem}
.layout-explorer .lx-stage{position:relative;overflow:hidden;border-radius:.6rem;background:#111;cursor:crosshair;align-self:start}
.layout-explorer .lx-visual{opacity:0;transition:opacity .18s ease}
.layout-explorer .lx-visual.is-ready{opacity:1}
.layout-explorer .lx-loading{position:absolute;inset:0;display:grid;place-items:center;color:#ccc;font-size:.8rem;padding:1rem;text-align:center}
.layout-explorer .lx-stage img{display:block;width:100%;height:auto;margin:0}
.layout-explorer .lx-box{position:absolute;border:2px solid var(--c);border-radius:3px;background:transparent;transition:background .15s,opacity .2s,border-width .15s;pointer-events:none}
.layout-explorer .lx-box span{position:absolute;left:-2px;top:-2px;transform:translateY(-100%);background:var(--c);color:#141414;font:600 10px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace;padding:1px 5px;border-radius:3px 3px 0 0;white-space:nowrap;max-width:14rem;overflow:hidden;text-overflow:ellipsis}
.layout-explorer .lx-box.is-inside span{transform:none;border-radius:0 0 3px 0}
.layout-explorer .lx-box.is-dim{opacity:.18}
.layout-explorer .lx-box.is-hot{border-width:3px;background:color-mix(in srgb,var(--c) 22%,transparent);opacity:1;z-index:2}
.layout-explorer .lx-readout{position:absolute;right:.5rem;bottom:.5rem;font:500 11px ui-monospace,SFMono-Regular,Menlo,monospace;background:rgba(0,0,0,.72);color:#f2f2f2;padding:.25rem .5rem;border-radius:.35rem;pointer-events:none}
.layout-explorer .lx-tools{display:flex;gap:.5rem;align-items:center;justify-content:space-between;margin-top:.6rem;font-size:.8rem;opacity:.85}
.layout-explorer .lx-tools label{display:flex;gap:.4rem;align-items:center;cursor:pointer}
.layout-explorer summary{font-size:.85rem;cursor:pointer;padding:.3rem 0}
.layout-explorer details[open] summary{margin-bottom:.4rem}
.layout-explorer .lx-side{display:flex;flex-direction:column;gap:.9rem;min-width:0}
.layout-explorer .lx-h{font:600 .7rem/1 system-ui,sans-serif;letter-spacing:.08em;text-transform:uppercase;opacity:.6;margin:0 0 .4rem}
.layout-explorer .lx-caption{font-size:.88rem;line-height:1.65;margin:0}
.layout-explorer .lx-token{display:inline;font:600 .75rem ui-monospace,SFMono-Regular,Menlo,monospace;padding:.05rem .35rem;margin:0 .1rem;border-radius:.3rem;border:1px solid var(--c);background:color-mix(in srgb,var(--c) 14%,transparent);color:inherit;cursor:default}
.layout-explorer .lx-token.is-hot{background:var(--c);color:#141414}
.layout-explorer .lx-rows{display:flex;flex-direction:column;gap:.35rem;margin:0;padding:0;list-style:none}
.layout-explorer .lx-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.2rem .6rem;padding:.45rem .6rem;border-radius:.5rem;border:1px solid transparent;background:rgba(127,127,127,.07);outline:none}
.layout-explorer .lx-row.is-hot,.layout-explorer .lx-row:focus-visible{border-color:var(--c)}
.layout-explorer .lx-row code{font-size:.72rem;background:none;padding:0}
.layout-explorer .lx-row .lx-id{display:flex;align-items:center;gap:.35rem;font-weight:600}
.layout-explorer .lx-row .lx-id i{width:.6rem;height:.6rem;border-radius:2px;background:var(--c);display:inline-block}
.layout-explorer .lx-row .lx-bbox{justify-self:end;opacity:.7}
.layout-explorer .lx-row .lx-desc{grid-column:1/-1;margin:0;font-size:.78rem;line-height:1.45;opacity:.8;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.layout-explorer .lx-row.is-hot .lx-desc{-webkit-line-clamp:unset}
.layout-explorer .lx-more,.layout-explorer .lx-copy{align-self:flex-start;font-size:.78rem;font-weight:600;padding:.45rem .8rem;border-radius:.45rem;cursor:pointer}
.layout-explorer .lx-more{background:transparent;border:1px solid rgba(128,128,128,.35);color:inherit}
.layout-explorer .lx-copy{background:var(--aspen-evergreen,#486a58);border:1px solid var(--aspen-evergreen,#486a58);color:#fff}
.layout-explorer .lx-idea p:last-child{margin:.25rem 0 0;font-size:.9rem;line-height:1.5}
.layout-explorer .lx-actions{display:flex;gap:.5rem;flex-wrap:wrap}
@container (max-width:760px){.layout-explorer .lx-body{grid-template-columns:minmax(0,1fr)}}
@media (prefers-reduced-motion:reduce){.layout-explorer *{transition:none!important}}
      `}</style>

      {examples.length > 1 ? <div className="lx-picker">
        <div className="lx-pills" role="group" aria-label="Example" onFocus={() => examples.forEach(preload)} onMouseEnter={() => examples.forEach(preload)}>
          {examples.map((example, i) => <button key={example.key} type="button" aria-pressed={i === index} onClick={() => pick(i)}>{example.title}</button>)}
        </div>
      </div> : null}

      <div className="lx-body">
        <div>
          <div className="lx-stage" style={{
    aspectRatio: `${ex.width} / ${ex.height}`
  }} aria-busy={!ready} ref={stage} onPointerMove={onMove} onPointerLeave={() => setCursor(null)}>
            {!ready && <div className="lx-loading" role="status">{failedSource === source ? "Image unavailable. Choose another example or reload to retry." : "Loading example…"}</div>}
            <div className={ready ? "lx-visual is-ready" : "lx-visual"} aria-hidden={!ready}>
            <img key={source} src={source} onLoad={event => reveal(event.currentTarget, source)} onError={() => setFailedSource(source)} alt={ex.title + ", generated with FLUX 3 from the layout shown alongside"} width={ex.width} height={ex.height} />
            {showBoxes && ex.rows.map(r => {
    if (hidden.has(r.id) && active !== r.id) return null;
    const cls = ["lx-box"];
    if (r.bbox[0] < 40) cls.push("is-inside");
    if (active && active !== r.id) cls.push("is-dim");
    if (active === r.id) cls.push("is-hot");
    return <div key={r.id} className={cls.join(" ")} style={{
      ...pct(r.bbox),
      "--c": color(r.id)
    }}>
                  <span>{r.id}</span>
                </div>;
  })}
            </div>
            {ready && cursor && <div className="lx-readout">y {cursor[0]} · x {cursor[1]}</div>}
          </div>
          <div className="lx-tools">
            <label>
              <input type="checkbox" checked={showBoxes} onChange={e => setShowBoxes(e.target.checked)} />
              Show boxes
            </label>
            <span>{ex.rows.length} boxes · {ex.aspect_ratio}</span>
          </div>
        </div>

        <div className="lx-side">
          {ex.idea && <div className="lx-idea">
              <p className="lx-h">Short prompt</p>
              <p>{ex.idea}</p>
            </div>}
          <details>
            <summary>Full prompt</summary>
            <p className="lx-caption">
              {parts.map((part, i) => {
    const m = part.match(/^<([A-Za-z0-9_]+)>$/);
    if (!m) return <span key={i}>{part}</span>;
    const id = m[1];
    return <span key={i} tabIndex={0} className={active === id ? "lx-token is-hot" : "lx-token"} style={{
      "--c": color(id)
    }} {...hot(id)}>
                    {"<" + id + ">"}
                  </span>;
  })}
            </p>
          </details>
          <div>
            <p className="lx-h">Elements</p>
            <ul className="lx-rows">
              {rows.map(r => <li key={r.id} tabIndex={0} className={active === r.id ? "lx-row is-hot" : "lx-row"} style={{
    "--c": color(r.id)
  }} {...hot(r.id)}>
                  <code className="lx-id"><i aria-hidden="true" />{r.id}</code>
                  <code className="lx-bbox">[{r.bbox.join(", ")}]</code>
                  <div className="lx-desc">{r.desc}</div>
                </li>)}
            </ul>
          </div>
          <div className="lx-actions">
            {ex.rows.length > 6 && <button type="button" className="lx-more" onClick={() => setExpanded(!expanded)}>
                {expanded ? "Show fewer rows" : "Show all " + ex.rows.length + " rows"}
              </button>}
            <button type="button" className="lx-copy" onClick={copy} aria-live="polite">
              {copied ? "Copied" : "Copy request body"}
            </button>
          </div>
        </div>
      </div>
    </section>;
};

export const BboxCapabilities = () => {
  const IMG = "https://cdn.sanity.io/images/2gpum2i6/production/";
  const TILES = [{
    title: "Place every element",
    text: "Each subject lands in the box you give it.",
    href: "#generate-a-layout",
    w: 1400,
    h: 927,
    before: IMG + "c09c527456f5197586d179ca9522c4afc556b4a2-1400x927.webp",
    alt: "Four men in dark suits cross a sunlit rooftop above a busy avenue, each placed in his own box.",
    boxes: [{
      id: "person_1",
      box: [500, 500, 750, 600],
      c: "#e8b04a"
    }, {
      id: "person_2",
      box: [520, 620, 770, 720],
      c: "#6fb3d9",
      label: false
    }, {
      id: "person_3",
      box: [540, 740, 790, 840],
      c: "#e0708a",
      label: false
    }, {
      id: "person_4",
      box: [560, 860, 810, 960],
      c: "#8fcf7a",
      label: false
    }, {
      id: "street_1",
      box: [100, 0, 1000, 450],
      c: "#b99af0"
    }]
  }, {
    title: "Set text in place",
    text: "Give each line of text its own box.",
    href: "#tips-and-limits",
    w: 1400,
    h: 1400,
    fit: "contain",
    bg: "#7d7d7e",
    labels: "side",
    before: "/images/flux3-image/layouts/alphabet.webp",
    alt: "A black poster with the alphabet in white stencil letters, each of its five lines inside its own box.",
    boxes: [{
      id: "En_Text_1",
      box: [150, 300, 250, 700],
      c: "#e8b04a"
    }, {
      id: "En_Text_2",
      box: [280, 300, 380, 700],
      c: "#6fb3d9"
    }, {
      id: "En_Text_3",
      box: [410, 320, 510, 680],
      c: "#e0708a"
    }, {
      id: "En_Text_4",
      box: [540, 320, 640, 680],
      c: "#8fcf7a"
    }, {
      id: "En_Text_5",
      box: [670, 350, 770, 650],
      c: "#b99af0"
    }]
  }, {
    title: "Recolor",
    text: "Rewrite a box’s description to change only that element.",
    href: "#edit-by-box",
    w: 1360,
    h: 768,
    before: IMG + "b6476b163e11444d6d5490ac1fa1e610d4eab85e-1360x768.webp",
    after: IMG + "3c884e72074d330bd62f27e8d222b294b855eb74-1360x768.webp",
    alt: "A tiger and a butterfly on a snowy log; the edit turns both pink and leaves the scene unchanged.",
    boxes: [{
      id: "animal_1",
      box: [250, 50, 850, 650],
      c: "#e0708a"
    }, {
      id: "insect_1",
      box: [650, 680, 750, 750],
      c: "#e0708a"
    }]
  }, {
    title: "Move",
    text: "Give an element a new target box to move or resize it.",
    href: "#move-an-element",
    w: 1360,
    h: 768,
    before: IMG + "aa7b28af831835fcef86e770262c8c30fa308c2c-1360x768.webp",
    after: IMG + "18ea13b9dc6a33d255071ed0e78962629caafdbd-1360x768.webp",
    alt: "A crocheted knight climbing a yarn cliff; the edit moves it up and to the left.",
    boxes: [{
      id: "knight_1",
      box: [500, 150, 850, 350],
      c: "#6fb3d9",
      ghost: true
    }, {
      id: "knight_1",
      box: [194, 55, 544, 255],
      c: "#6fb3d9"
    }]
  }, {
    title: "Several edits at once",
    text: "Change three elements in one request.",
    href: "#edit-by-box",
    w: 1360,
    h: 768,
    before: IMG + "fa34bced7273bdc735dad58a65c225d8d5ff63e6-1360x768.webp",
    after: IMG + "2954729279a1bf4838c24b7ff66f024c32bd38f7-1360x768.webp",
    alt: "A misty bamboo forest; one request replaces a wolf, a log, and a bird.",
    boxes: [{
      id: "wolf_1",
      box: [817, 120, 950, 167],
      c: "#e0708a"
    }, {
      id: "log_1",
      box: [850, 600, 950, 850],
      c: "#e8b04a"
    }, {
      id: "bird_1",
      box: [450, 500, 480, 530],
      c: "#8fcf7a"
    }]
  }, {
    title: "Remove",
    text: "Set the target box to null and the element disappears.",
    href: "#remove-an-element",
    w: 1600,
    h: 898,
    before: IMG + "8fc2d013a3912a101e10aa116841adae9b930f74-1600x898.webp",
    after: IMG + "cfd2c6cf8f18a212d053b5efe0e18ea7eb1e3c5b-1600x898.webp",
    alt: "Three cats around a fire in an igloo; the edit removes the orange cat.",
    boxes: [{
      id: "cat_1",
      box: [265, 40, 855, 400],
      c: "#f08b5b"
    }]
  }];
  const FRAME = 16 / 10;
  const [seen, setSeen] = useState({});
  const [flipped, setFlipped] = useState({});
  const observer = useRef(null);
  const watch = el => {
    if (!el) return;
    if (typeof IntersectionObserver === "undefined") {
      setSeen(s => s[el.dataset.i] ? s : {
        ...s,
        [el.dataset.i]: true
      });
      return;
    }
    if (!observer.current) {
      observer.current = new IntersectionObserver(entries => {
        entries.forEach(entry => {
          if (!entry.isIntersecting) return;
          const i = entry.target.dataset.i;
          setSeen(s => s[i] ? s : {
            ...s,
            [i]: true
          });
          observer.current.unobserve(entry.target);
        });
      }, {
        threshold: 0.35
      });
    }
    observer.current.observe(el);
  };
  const crop = t => {
    const ar = t.w / t.h;
    if (t.fit === "contain") {
      if (ar > FRAME) {
        const sy = FRAME / ar;
        return {
          sx: 1,
          sy,
          ox: 0,
          oy: (1 - sy) / 2
        };
      }
      const sx = ar / FRAME;
      return {
        sx,
        sy: 1,
        ox: (1 - sx) / 2,
        oy: 0
      };
    }
    if (ar > FRAME) {
      const sx = FRAME / ar;
      return {
        sx,
        sy: 1,
        ox: (1 - sx) / 2,
        oy: 0
      };
    }
    const sy = ar / FRAME;
    return {
      sx: 1,
      sy,
      ox: 0,
      oy: t.cropTop === undefined ? (1 - sy) / 2 : t.cropTop / 1000
    };
  };
  const place = ([y0, x0, y1, x1], t) => {
    if (t.fit === "contain") {
      const {sx, sy, ox, oy} = crop(t);
      const f = (v, s, o) => (v / 1000 * s + o) * 100;
      return {
        top: f(y0, sy, oy) + "%",
        left: f(x0, sx, ox) + "%",
        height: (y1 - y0) / 10 * sy + "%",
        width: (x1 - x0) / 10 * sx + "%"
      };
    }
    const {sx, sy, ox, oy} = crop(t);
    const clamp = v => Math.max(0, Math.min(100, v));
    const top = clamp((y0 / 1000 - oy) / sy * 100), bottom = clamp((y1 / 1000 - oy) / sy * 100);
    const left = clamp((x0 / 1000 - ox) / sx * 100), right = clamp((x1 / 1000 - ox) / sx * 100);
    return {
      top: top + "%",
      left: left + "%",
      height: bottom - top + "%",
      width: right - left + "%"
    };
  };
  const flip = (i, value) => setFlipped(f => ({
    ...f,
    [i]: value === undefined ? !f[i] : value
  }));
  return <div className="not-prose bbox-caps">
      <style>{`
.bbox-caps{container-type:inline-size;margin:1.75rem 0 2.5rem}
.bbox-caps .bc-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}
.bbox-caps .bc-tile{display:flex;flex-direction:column;border:1px solid rgba(128,128,128,.22);border-radius:1rem;overflow:hidden;background:rgba(127,127,127,.04);color:inherit;text-decoration:none;transition:border-color .2s,transform .25s cubic-bezier(.2,.7,.2,1),box-shadow .25s}
.bbox-caps .bc-tile:hover,.bbox-caps .bc-tile:focus-within{border-color:var(--aspen-evergreen,#486a58);transform:translateY(-2px);box-shadow:0 18px 40px -28px rgba(22,49,38,.55)}
.bbox-caps .bc-media{position:relative;aspect-ratio:16/10;overflow:hidden;background:#111;margin:0;padding:0;border:0;width:100%;cursor:pointer;display:block}
.bbox-caps .bc-media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;margin:0;border-radius:0;transition:opacity .45s ease}
.bbox-caps .bc-media img.bc-after{opacity:0}
.bbox-caps .is-flipped img.bc-after{opacity:1}
.bbox-caps .bc-box{position:absolute;border:2px solid var(--c);border-radius:3px;pointer-events:none;opacity:0;transform:scale(.92);transition:opacity .4s ease,transform .5s cubic-bezier(.2,.7,.2,1),border-color .3s;transition-delay:var(--d)}
.bbox-caps .is-seen .bc-box{opacity:1;transform:none}
.bbox-caps .bc-box.is-ghost{border-style:dashed;opacity:0}
.bbox-caps .is-seen .bc-box.is-ghost{opacity:.55}
.bbox-caps .bc-box span{position:absolute;left:-2px;top:-2px;transform:translateY(-100%);background:var(--c);color:#141414;font:600 10px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace;padding:1px 5px;border-radius:3px 3px 0 0;white-space:nowrap}
.bbox-caps .bc-box.is-top span{transform:none;border-radius:0 0 3px 0}
.bbox-caps .is-side .bc-box span{top:50%;left:-6px;transform:translate(-100%,-50%);border-radius:3px}
.bbox-caps .is-flipped .bc-box{opacity:.0}
.bbox-caps .is-flipped .bc-box.is-target{opacity:1}
.bbox-caps .bc-state{position:absolute;left:.6rem;bottom:.6rem;z-index:2;display:inline-flex;gap:2px;padding:2px;border-radius:999px;background:rgba(8,18,13,.62);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);font:600 10.5px/1 system-ui,sans-serif;letter-spacing:.02em}
.bbox-caps .bc-state i{font-style:normal;padding:.32rem .55rem;border-radius:999px;color:rgba(255,255,255,.7);transition:background .25s,color .25s}
.bbox-caps .bc-state i.is-on{background:#f6f1e7;color:#141414}
.bbox-caps .bc-body{display:flex;flex-direction:column;gap:.3rem;padding:.9rem 1rem 1rem}
.bbox-caps .bc-body a{display:inline-flex;align-items:center;gap:.35rem;font:600 .95rem/1.3 "Instrument Sans",system-ui,sans-serif;color:inherit;text-decoration:none;border:0}
.bbox-caps .bc-body a::after{content:"→";opacity:.45;transition:transform .2s,opacity .2s}
.bbox-caps .bc-tile:hover .bc-body a::after{transform:translateX(3px);opacity:.9}
.bbox-caps .bc-body p{margin:0;font-size:.85rem;line-height:1.5;opacity:.72}
@container (max-width:760px){.bbox-caps .bc-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@container (max-width:460px){.bbox-caps .bc-grid{grid-template-columns:minmax(0,1fr)}}
@media (prefers-reduced-motion:reduce){.bbox-caps *{transition:none!important}}
      `}</style>
      <div className="bc-grid">
      {TILES.map((t, i) => {
    const edit = Boolean(t.after);
    const cls = ["bc-media"];
    if (t.labels === "side") cls.push("is-side");
    if (seen[i]) cls.push("is-seen");
    if (flipped[i]) cls.push("is-flipped");
    const media = <>
            <img src={t.before} alt={t.alt} loading="lazy" style={t.fit === "contain" ? {
      objectFit: "contain"
    } : {
      objectPosition: `50% ${t.cropTop === undefined ? 50 : crop(t).oy / (1 - crop(t).sy) * 100}%`
    }} />
            {edit && <img className="bc-after" src={t.after} alt="" aria-hidden="true" loading="lazy" />}
            {t.boxes.map((b, k) => {
      const bc = ["bc-box"];
      if (b.ghost) bc.push("is-ghost"); else if (t.title === "Move") bc.push("is-target");
      const pos = place(b.box, t);
      if (parseFloat(pos.top) < 7) bc.push("is-top");
      return <div key={k} className={bc.join(" ")} style={{
        ...pos,
        "--c": b.c,
        "--d": 120 + k * 110 + "ms"
      }}>
                  {!b.ghost && b.label !== false && <span>{b.id}</span>}
                </div>;
    })}
            {edit && <span className="bc-state" aria-hidden="true">
                <i className={flipped[i] ? "" : "is-on"}>Before</i>
                <i className={flipped[i] ? "is-on" : ""}>After</i>
              </span>}
          </>;
    return <article key={i} className="bc-tile">
            {edit ? <button type="button" ref={watch} data-i={i} className={cls.join(" ")} aria-pressed={Boolean(flipped[i])} aria-label={`${t.title}: show ${flipped[i] ? "before" : "after"}`} onClick={() => flip(i)} onMouseEnter={() => flip(i, true)} onMouseLeave={() => flip(i, false)}>
                {media}
              </button> : <div ref={watch} data-i={i} className={cls.join(" ")} style={t.bg ? {
      background: t.bg
    } : undefined}>{media}</div>}
            <div className="bc-body">
              <a href={t.href}>{t.title}</a>
              <p>{t.text}</p>
            </div>
          </article>;
  })}
      </div>
    </div>;
};

<div className="flux3-overview-page flux3-page flux3-toc-page">
  <div className="not-prose flux3-overview-copy">
    <p className="flux3-overview-copy__eyebrow">FLUX 3 Image</p>
    <h1>Bounding boxes</h1>
    <p>Tell FLUX 3 where each element goes. Draw a box, describe what belongs in it, and the model composes the image around your layout. Edit the same way: change one box, and everything outside it stays as it was.</p>
  </div>

  ## What you can do with boxes

  Every image below was made or edited with FLUX 3 from a prompt that contains
  boxes. Hover or tap an edit to compare it with its source.

  <BboxCapabilities />

  Boxes need no extra parameter. They are written into `prompt` as a JSON array,
  next to a description of the image. This tutorial builds that prompt step by
  step: first for a new image, then for an edit.

  <Info>
    Every box is **`[top, left, bottom, right]`** in integers from **0 to 1000**,
    measured from the top-left corner. `[0, 0, 500, 500]` is the top-left
    quarter of the image, whatever its size or aspect ratio.
  </Info>

  ## Generate a layout

  You'll recreate the image below: a running figure, centered on a flat
  chartreuse background. It has two elements, so its layout prompt is short.

  <Steps>
    <Step title="Describe the image and name each element">
      Write one paragraph about the whole image. Where an element appears, give
      it an id in angle brackets, such as `<silhouette_1>`. Use lowercase names
      with a number, so you can add `silhouette_2` later.

      ```text Caption theme={null}
      Minimalist graphic illustration featuring a black silhouette of a person <silhouette_1> centered against a solid, vibrant chartreuse background <background_1>. The figure is captured in a dynamic, mid-stride running pose, facing toward the left side of the frame.
      ```
    </Step>

    <Step title="Give each element a box and a description">
      Add one row per id. `bbox` says where the element sits, and `desc` says
      what it looks like. The background fills the frame, and the runner takes
      the middle 70% of it.

      ```json Element table theme={null}
      [
        {"id": "background_1", "bbox": [0, 0, 1000, 1000], "desc": "A flat field of neon yellow-green with a subtle paper texture and fine, organic grain."},
        {"id": "silhouette_1", "bbox": [150, 150, 850, 850], "desc": "A black silhouette of a person in motion, made of dense stippled ink. The leading edges are solid; the trailing arm and leg dissolve into coarse square pixels and scattered dots."}
      ]
      ```
    </Step>

    <Step title="Join them in one prompt and send it">
      Put the caption first, then a space, then the JSON array. Send the result
      as `prompt`, with the aspect ratio you designed the boxes for.

      ```python Python theme={null}
      import json
      import os
      import time

      import requests

      API_KEY = os.environ["BFL_API_KEY"]

      caption = (
          "Minimalist graphic illustration featuring a black silhouette of a person "
          "<silhouette_1> centered against a solid, vibrant chartreuse background "
          "<background_1>. The figure is captured in a dynamic, mid-stride running "
          "pose, facing toward the left side of the frame."
      )
      rows = [
          {"id": "background_1", "bbox": [0, 0, 1000, 1000],
           "desc": "A flat field of neon yellow-green with a subtle paper texture and fine, organic grain."},
          {"id": "silhouette_1", "bbox": [150, 150, 850, 850],
           "desc": "A black silhouette of a person in motion, made of dense stippled ink. The leading "
                   "edges are solid; the trailing arm and leg dissolve into coarse square pixels and scattered dots."},
      ]


      def generate(payload, name):
          submit = requests.post("https://api.bfl.ai/v1/flux-3-image",
                                 headers={"x-key": API_KEY}, json=payload, timeout=60)
          submit.raise_for_status()
          polling_url = submit.json()["polling_url"]

          while True:
              time.sleep(1.5)
              result = requests.get(polling_url, headers={"x-key": API_KEY}, timeout=60).json()
              if result["status"] not in ("Pending", "Reasoning", "Generating"):
                  break
          if result["status"] != "Ready":
              raise RuntimeError(result)

          image = requests.get(result["result"]["sample"], timeout=120)
          with open(name + ".png", "wb") as f:
              f.write(image.content)
          return name + ".png"


      print(generate({"prompt": caption + " " + json.dumps(rows), "aspect_ratio": "1:1"}, "runner"))
      ```

      The script saves `runner.png` and prints its path.
    </Step>
  </Steps>

  Hover an id in the prompt or a row in the table to find its box. The cursor
  readout shows grid coordinates, so you can measure positions for your own layouts.

  <LayoutExplorer examples={FLUX3_LAYOUT_EXAMPLES.filter((example) => example.key === "runner")} />

  <Tip>
    A layout is easiest to write when a language model drafts it. Send it your
    short idea and the aspect ratio, and ask for the caption and element table.
    [Start from a short prompt](/guides/prompting_layout#start-from-a-short-prompt)
    has an instruction you can reuse.
  </Tip>

  <span id="edit-by-box" />

  ## Edit an image box by box

  To edit, send the image as a reference and describe it with the same kind of
  element table. Each row now says where an element comes from and where it
  should end up, so the model knows what to keep, what to move, and what to make
  new.

  | Row | `from` | `src_bbox` | `tgt_bbox` | Effect |
  | - | - | - | - | - |
  | Keep | `"ref_image_0"` | Its box | The same box | Stays exactly where it is |
  | Move | `"ref_image_0"` | Its box | A new box | Moves or resizes the element |
  | New | `null` | `null` | Its box | Generates `desc` in the box: adds, replaces, or recolors |
  | Remove | `"ref_image_0"` | Its box | `null` | Removes the element |

  `ref_image_0` is the first image in `images`; the second is `ref_image_1`.

  <span id="move-an-element" />

  ### Move an element

  This edit moves a crocheted knight up the cliff and leaves the rest of the
  scene alone.

  <Steps>
    <Step title="List the elements of the source image">
      Start from the element table of the source. If you generated the image with
      boxes, reuse that table. Otherwise, ask a vision model to list the main
      elements with their boxes.
    </Step>

    <Step title="Change only the rows you want to edit">
      Keep every row as a *Keep* row, with `src_bbox` and `tgt_bbox` equal. Then
      give the knight a new `tgt_bbox`:

      ```json Move row theme={null}
      {"id": "knight_1", "from": "ref_image_0", "src_bbox": [500, 150, 850, 350], "tgt_bbox": [194, 55, 544, 255], "desc": "A miniature amigurumi knight crocheted from thick grey woolen yarn."}
      ```
    </Step>

    <Step title="Write the edit as an instruction">
      Refer to the image as `<ref_image_0>`, say what changes, and name what
      stays the same:

      ```text Instruction theme={null}
      In <ref_image_0>, move the miniature grey amigurumi knight figure <knight_1> upwards and to the left along the yarn cliff <cliff_1>. Keep the rest of the image completely unchanged, preserving the blurred yarn backdrop <backdrop_1>, the large knitted dragon <dragon_1>, and the fiery orange thread <fire_1>.
      ```
    </Step>

    <Step title="Send the image and the prompt">
      Pass the source in `images`, and join the instruction and rows into
      `prompt` as before. This uses `generate()` from the layout example:

      ```python Python theme={null}
      instruction = (
          "In <ref_image_0>, move the miniature grey amigurumi knight figure <knight_1> "
          "upwards and to the left along the yarn cliff <cliff_1>. Keep the rest of the "
          "image completely unchanged, preserving the blurred yarn backdrop <backdrop_1>, "
          "the large knitted dragon <dragon_1>, and the fiery orange thread <fire_1>."
      )


      def keep(element_id, box, desc):
          return {"id": element_id, "from": "ref_image_0", "src_bbox": box, "tgt_bbox": box, "desc": desc}


      rows = [
          {"id": "knight_1", "from": "ref_image_0", "src_bbox": [500, 150, 850, 350],
           "tgt_bbox": [194, 55, 544, 255],
           "desc": "A miniature amigurumi knight crocheted from thick grey woolen yarn."},
          keep("backdrop_1", [0, 0, 1000, 1000], "A soft, out-of-focus backdrop of cream and indigo knitted yarn."),
          keep("cliff_1", [300, 0, 1000, 450], "A steep cliff of stacked yarn skeins in mustard, terracotta, and indigo."),
          keep("needle_1", [420, 250, 550, 450], "An oversized polished steel tapestry needle."),
          keep("dragon_1", [100, 600, 950, 1000], "A large, fluffy knitted dragon in terracotta and mustard yarn."),
          keep("fire_1", [350, 400, 650, 650], "Curled puffs of fiery orange angora thread suspended in mid-air."),
      ]

      payload = {
          "prompt": instruction + " " + json.dumps(rows),
          "images": ["https://cdn.sanity.io/images/2gpum2i6/production/aa7b28af831835fcef86e770262c8c30fa308c2c-1360x768.webp"],
      }
      print(generate(payload, "knight_moved"))
      ```

      `aspect_ratio` defaults to `auto`, which keeps the shape of the first
      reference.
    </Step>
  </Steps>

  Switch between Before and After, and show the anchors to see every row of
  this request. **Copy request body** gives you the complete JSON.

  <EditExplorer examples={FLUX3_EDIT_EXAMPLES.filter((example) => example.key === "knight-after")} />

  ### Replace or recolor

  To change what an element looks like, make its row a *New* row and describe
  the result in `desc`. Several *New* rows in one request change several
  elements at once:

  ```json New rows theme={null}
  [
    {"id": "wolf_1", "from": null, "src_bbox": null, "tgt_bbox": [817, 120, 950, 167], "desc": "a cyberpunk dog"},
    {"id": "log_1", "from": null, "src_bbox": null, "tgt_bbox": [850, 600, 950, 850], "desc": "a fallen bamboo leaf made out of gold"},
    {"id": "bird_1", "from": null, "src_bbox": null, "tgt_bbox": [450, 500, 480, 530], "desc": "a bird made out of a robot"}
  ]
  ```

  <EditExplorer examples={FLUX3_EDIT_EXAMPLES.filter((example) => ["bamboo-multi", "tiger-after", "cliff-after"].includes(example.key))} />

  <span id="remove-an-element" />

  ### Remove an element

  Set `tgt_bbox` to `null` and say in the instruction what to remove. The
  model fills the area with what was behind the element:

  ```json Remove row theme={null}
  {"id": "cat_1", "from": "ref_image_0", "src_bbox": [265, 40, 855, 400], "tgt_bbox": null, "desc": "An orange tabby cat sitting on a folded blanket."}
  ```

  Pixels outside the edited boxes usually stay identical. Switch to **Changed
  pixels** to see which areas this removal touched:

  <PixelDiff examples={FLUX3_PIXEL_EXAMPLES.filter((example) => example.key === "cats")} />

  ## Format

  Write a description using `<id>` to name each element, then append a JSON
  array of rows. This all goes in `prompt`, with no separate box parameter.

  <span id="coordinates" />

  Every box is **`[top, left, bottom, right]`**, in integers from **0 to 1000**.
  For example, `[0, 0, 500, 500]` covers the top-left quarter of the image.

  | Field | Generation | Editing |
  | - | - | - |
  | `id` | Element name used as `<id>` in the prompt | Same |
  | `desc` | What the element looks like | What it should look like after the edit |
  | `bbox` | Position in the output | Use `src_bbox` and `tgt_bbox` instead |
  | `from` | Not used | Source reference, such as `ref_image_0`; `null` to generate the element at `tgt_bbox` (to add, replace, or recolor it) |
  | `src_bbox` | Not used | Position in the source; `null` with `from: null` |
  | `tgt_bbox` | Not used | Position in the output; `null` to remove an element |

  ## Examples

  More layouts and edits from the FLUX 3 launch. Choose an example, inspect its
  boxes, and copy the request body.
  Boxes guide placement; they are not clipping masks.

  <span id="edit-an-image" />

  <Tabs>
    <Tab title="Generate">
      <LayoutExplorer examples={FLUX3_LAYOUT_EXAMPLES} />
    </Tab>

    <Tab title="Edit">
      <EditExplorer examples={FLUX3_EDIT_EXAMPLES} />
    </Tab>
  </Tabs>

  <span id="tips-and-limits" />

  ## Tips and limits

  <CardGroup cols={2}>
    <Card title="Boxes guide, they don't clip" icon="vector-square">
      An element can extend slightly past its box. Boxes set placement and
      scale, not a hard mask.
    </Card>

    <Card title="Keep the aspect ratio" icon="crop">
      The 0–1000 grid stretches with the frame. Send the aspect ratio you
      designed the boxes for.
    </Card>

    <Card title="Give text its own box" icon="text">
      Put each line of text in its own row, and quote the exact words in
      `desc`, such as `text reading "Sauna"`.
    </Card>

    <Card title="Don't make boxes too small" icon="minimize">
      In our tests, a new element in a box of about 40 × 25 pixels often did
      not appear. Give new elements room.
    </Card>

    <Card title="Say it twice for edits" icon="pen">
      State additions and removals in the instruction as well as in the rows.
      The instruction and the table should agree.
    </Card>

    <Card title="Anchor what must not move" icon="anchor">
      Add a *Keep* row for each element that has to stay put. Unlisted areas
      usually hold, but anchors make it explicit.
    </Card>
  </CardGroup>

  To convert pixel coordinates to the grid:

  ```python Python theme={null}
  def to_bbox(left, top, right, bottom, width, height):
      return [round(top / height * 1000), round(left / width * 1000),
              round(bottom / height * 1000), round(right / width * 1000)]

  to_bbox(384, 108, 1536, 972, 1920, 1080)  # [100, 200, 900, 800]
  ```

  ## Keep exploring

  <CardGroup cols={2}>
    <Card title="FLUX 3 Image Editing" icon="table-list" href="/flux_3/flux3_image_layout">
      The full field reference and more layouts and edits to copy.
    </Card>

    <Card title="Layout prompts" icon="pen-ruler" href="/guides/prompting_layout">
      Write captions and element tables that hold, or let a model draft them.
    </Card>

    <Card title="FLUX 3 Text to Image" icon="wand-magic-sparkles" href="/flux_3/flux3_image_generate">
      Complete clients, edits by instruction, and multi-reference requests.
    </Card>

    <Card title="API reference" icon="code" href="/api-reference/utility/generate-an-image-with-flux-3">
      The full request schema, limits, and response codes.
    </Card>
  </CardGroup>
</div>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.