---
title: "Outpaint or extend an image"
method: POST
path: "/v1/flux-tools/outpainting-v1"
tags: ["Models"]
---

# Outpaint or extend an image

`POST /v1/flux-tools/outpainting-v1`

Submits an outpainting task. The input image is placed on a (width, height) canvas at the given offset, and the surrounding region is generated by a FLUX outpainting model.

## Request body

- FluxOutpaintingInputs — Public contract for ``/v1/flux-tools/outpainting-v1``.
  - `input_image` string, required — Base64-encoded input (reference) image or HTTP(S) image URL.
  - `width` integer, required — Target output width.
  - `height` integer, required — Target output height.
  - `auto_crop` boolean — If True, crop the input image to the canvas bounds when it extends beyond the edges. If False, an error is raised instead.
  - `safety_tolerance` integer — Tolerance level for input and output moderation. Between 0 and 5, 0 being most strict, 5 being least strict. If you wish to increase the safety_tolerance beyond these levels please reach out to the team.
  - `output_format` 'jpeg' | 'png' | 'webp'
  - `prompt` string, nullable — 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, nullable — 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, nullable — Top offset (px) of the reference image's top-left corner on the output canvas. Negative values are allowed. None = center vertically.
  - `mode` 'high' | 'fast' — Quality/speed trade-off. 'high' (default): highest-fidelity results, recommended whenever fine detail, prompt adherence, or consistency with complex content in the source image matters; slower. 'fast': significantly faster and well-suited for naturally extending most scenes (landscapes, backgrounds, textures, products); may produce lower fidelity in the extended region than 'high'.
  - `disable_pup` boolean — Skip the image-aware prompt upsampler for lower latency. The prompt (or a default extension prompt) is sent directly to the generation model; quality in the extended region may be lower for scenes that benefit from semantic guidance. Applies to both modes.

## Response `200`

Successful Response

- union
  - AsyncResponse
    - `id` string, required
    - `polling_url` string, required
    - `cost` number, nullable — Cost in credits for this request
    - `input_mp` number, nullable — Input megapixels (2 decimal places)
    - `output_mp` number, nullable — Output megapixels (2 decimal places)
  - AsyncWebhookResponse
    - `id` string, required
    - `status` string, required
    - `webhook_url` string, required
    - `cost` number, nullable — Cost in credits for this request
    - `input_mp` number, nullable — Input megapixels (2 decimal places)
    - `output_mp` number, nullable — Output megapixels (2 decimal places)

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/bfl/apis/bfl-api.md) · [All operations](https://skmtc.net/bfl/apis/bfl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bfl/bfl-api/revisions/a0209bab18e1/schema)
