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.
FLUX Outpainting extends an image naturally in any direction, filling new regions with contextually coherent content in a single call. Useful for aspect-ratio changes, banner generation, social media reformatting, or giving a composition more room to breathe.
Example output
Drag the slider to compare the input image padded onto the target canvas (left) with the outpainted result (right). No prompt was used β the model extended the scene on its own.Endpoint
Submit an outpainting job:Quick start
The API uses an asynchronous workflow:Submit an outpainting request
POST your input image (base64) and the target canvas dimensions to the endpoint. The model extends the existing scene naturally β no prompt is needed.
Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input_image | base64 string | Yes | Reference image to expand |
width | integer | Yes | Target canvas width in pixels (>=64) |
height | integer | Yes | Target canvas height in pixels (>=64) |
reference_offset_x | integer | No | Left offset (px) of the reference imageβs top-left corner on the canvas. Negative values allowed. None = center horizontally |
reference_offset_y | integer | No | Top offset (px) of the reference imageβs top-left corner on the canvas. Negative values allowed. None = center vertically |
auto_crop | boolean | No | If true, crop the reference image to the canvas bounds when it extends beyond the edges. Defaults to false (out-of-bounds placements return 422) |
output_format | string | No | png (default) or jpeg |
Image placement
reference_offset_x and reference_offset_y set the top-left corner of the reference image on the output canvas. Drag the reference below to see how the offsets relate to the canvas:
You have two options for placing the reference image on the output canvas:
- Centered (default) β provide the image, set
widthandheight, and leavereference_offset_x/reference_offset_yasNone. The image is centered automatically. - Custom position β set
reference_offset_xandreference_offset_yto control exactly where the top-left corner of the reference image lands on the canvas. Negative values are allowed; if any part of the reference falls outside the canvas, either setauto_crop: trueor the request will return422.
Response format
Initial response
Polling response (success)
status is "Ready", use result.sample.
Tips for best results
- The model extends the existing scene naturally. The endpoint is tuned to continue the input imageβs content, lighting, and composition on its own.
- The model was trained on green, blue, and magenta fill colors and performs best with those internally β no caller action needed; the server handles fill colors automatically.
- Keep total output dimensions reasonable. Very large canvases or extreme aspect ratios may reduce quality.
Troubleshooting
403 Forbiddenβ your API key is missing or your project doesnβt have access to this endpoint.422/ validation errors β check base64 encoding and thatwidth/heightare present and at least64. The endpoint rejects unknown fields: usereference_offset_x/reference_offset_y(not the olderbbox_x1/bbox_y1).- Visible seams β give the model more canvas room around the reference image.

