Sand AISand AI MAGI-2MAGI-2 is now on SandBase: 1080p video with native audioTry it now
Image to ImageBFL

Flux 3.1 Edit

API docs
bfl/flux-3.1/edit

FLUX 3.1 by Black Forest Labs edits up to 10 reference images from a text instruction, with optional bounding boxes for layout control, at 1K to 4K resolution tiers. Quality mode is best for typography and fine detail.

Try the model

Playground

Open playground
Input
The prompt to generate an image from.

PNG, JPEG, WebP, or GIF · 20 MiB maximum each · up to 10

Reference image URLs or data URIs, in image 1 through image 10 order. Each must be at least 256 pixels per dimension. Oversized images are automatically downscaled to at most 4 megapixels while preserving aspect ratio. The first controls auto aspect ratio.
Output resolution tier.
The aspect ratio of the generated image.
Advanced settings
The format of the generated image.
Optional layout, with (0, 0) at the top-left of each image: keep, move, resize or remove objects from the references, or place new ones. Name boxes in the prompt by label, e.g. `<dragon>`.

Fill in prompt, images to run

Per run$0.03
Result
Example
  1. c88b1370-aed4-477e-be26-449f37420c8c.jpg
    Open original

Examples

Select an example to load its inputs and result into the playground.

  • Input
    {
      "aspect_ratio": "16:9",
      "bounding_boxes": [
        {
          "box": {
            "x_max": 0.86,
            "x_min": 0.68,
            "y_max": 0.32,
            "y_min": 0.05
          },
          "description": "a small red and white striped hot-air balloon",
          "label": "balloon"
        }
      ],
      "images": [
        "https://static.sandbase.ai/examples/55c5f3f0-d26f-4aee-b7c2-cb30f55dc9b3/input/9f96f8b9-e7d4-4e9d-8e3d-b3fca81a882e.png"
      ],
      "prompt": "Add a small striped hot-air balloon <balloon> in the sky, keep everything else unchanged"
    }
    Open result ↗
  • Input
    {
      "aspect_ratio": "16:9",
      "images": [
        "https://static.sandbase.ai/examples/4b1a6a59-9070-4595-9c94-0cc8bf9ac1e1/input/490d6fd4-86b2-45d7-a961-09fb73e792e2.png"
      ],
      "prompt": "Turn the scene into a snowy winter evening with warm window light, keep the composition"
    }
    Open result ↗

Flux 3.1 Edit

FLUX 3.1 by Black Forest Labs edits up to 10 reference images from a text instruction, with optional bounding boxes for layout control, at 1K to 4K resolution tiers. Quality mode is best for typography and fine detail.

Fields

FieldTypeDefaultNotes
promptstring, required—Text instruction.
imagesimage URL[], required—Reference images, Image 1 to Image 10. Each side at least 256 px; images over 4 MP are downscaled.
resolution1k2k4k1kSize tier; sets the per-image rate.
aspect_ratio21:916:93:24:35:41:14:53:42:39:16—Output shape. Follows Image 1 when omitted.
output_formatjpeg / pngjpegOutput file format.
bounding_boxesobject[]—Optional layout boxes, with (0, 0) at the top-left. Keep, move, resize or remove objects from the references, or place new ones. Each box has a description, an optional label, and edges {x_min, y_min, x_max, y_max} as 0-1 fractions; use box for a new object, or source_image_index + source_box / target_box to move, resize or remove one. Write <label> in the prompt to tie it to a box.

Billing

BFL's official per-image price for FLUX 3.1 Image Quality: $0.03 at 1K, $0.06 at 2K, $0.28 at 4K. Reference images are included at no extra charge.

Request1k2k4k
One image$0.03$0.06$0.28

Failed runs are not charged.

Prompting

  • Quote any text that must appear and say where it goes.
  • Name a bounding box in the prompt by its label to control where that object goes.

Limits

  • One output image per request.
  • Maximum output size is 4 MP.

Also on SandBase

Other FLUX 3.1 endpoints: bfl/flux-3.1/text-to-image, bfl/flux-3.1/fast/text-to-image, bfl/flux-3.1/fast/edit. Previous generation: bfl/flux-3/text-to-image, bfl/flux-3/edit.