Skip to main content
POST
/
v1
/
flux-tools
/
outpainting-v1
Outpaint or extend an image
curl --request POST \
  --url https://api.bfl.ai/v1/flux-tools/outpainting-v1 \
  --header 'Content-Type: application/json' \
  --header 'x-key: <api-key>' \
  --data '
{
  "input_image": "<string>",
  "width": 65,
  "height": 65,
  "auto_crop": false,
  "output_format": "png",
  "prompt": "<string>",
  "reference_offset_x": 123,
  "reference_offset_y": 123
}
'
{
  "id": "<string>",
  "polling_url": "<string>",
  "cost": 123,
  "input_mp": 123,
  "output_mp": 123
}

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.

Authorizations

x-key
string
header
required

Body

application/json

Public contract for /v1/flux-tools/outpainting-v1.

input_image
string
required

Base64-encoded input (reference) image.

width
integer
required

Target output width.

Required range: x >= 64
height
integer
required

Target output height.

Required range: x >= 64
auto_crop
boolean
default:false

If True, crop the input image to the canvas bounds when it extends beyond the edges. If False, an error is raised instead.

output_format
enum<string> | null
default:png
Available options:
jpeg,
png,
webp
prompt
string | null

Experimental: optional text guidance for the outpainted region. The model may not strictly follow this prompt; the visual content of the input image is the primary signal. Leave unset for default behavior.

reference_offset_x
integer | null

Left offset (px) of the reference image's top-left corner on the output canvas. Negative values are allowed. None = center horizontally.

reference_offset_y
integer | null

Top offset (px) of the reference image's top-left corner on the output canvas. Negative values are allowed. None = center vertically.

Response

Successful Response

id
string
required
polling_url
string
required
cost
number | null

Cost in credits for this request

input_mp
number | null

Input megapixels (2 decimal places)

output_mp
number | null

Output megapixels (2 decimal places)