# Black Forest Labs (FLUX)

> Generate images and videos, edit images with FLUX tools, and inspect generation results, credits and fine-tunes.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/black-forest-labs

## Actions

### Deblur image

Sharpen a blurry image while keeping its scene, objects, composition and lighting. No prompt is needed.

**Inputs**

- User (`user`, text): Opaque identifier for the end user supplied by the calling platform.
- Image (`image`, text, required): Base64-encoded input image or HTTP(S) image URL.
- Seed (`seed`, number): Optional seed for reproducibility.
- Safety tolerance (`safety_tolerance`, number): Harm moderation tolerance from 0 to 7, with 0 the strictest. The route and organization determine the approved maximum and per-category ceilings. Unapproved levels return 422 with approved levels. From 0.0 to 7.0. Default: `2`.
- Output format (`output_format`, text): Output format. One of: `jpeg`, `png`, `webp`. Default: `png`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "cost": 1.0,
    "id": "example",
    "input_mp": 1.0,
    "output_mp": 1.0,
    "polling_url": "example"
  }
}
```

### Erase object

Remove an object or area from an image, using a mask that marks what to erase.

**Inputs**

- User (`user`, text): Opaque identifier for the end user supplied by the calling platform.
- Image (`image`, text, required): Base64-encoded input image or HTTP(S) image URL.
- Mask (`mask`, text, required): Base64-encoded black/white mask or HTTP(S) image URL. White pixels indicate the object to remove; black pixels are preserved. Must have the same dimensions as the input image.
- Dilate pixels (`dilate_pixels`, number): Number of pixels to dilate the mask by before removal. Dilation helps cover object edges. Maximum is 25 pixels. From 0.0 to 25.0. Default: `10`.
- Seed (`seed`, number): Optional seed for reproducibility.
- Safety tolerance (`safety_tolerance`, number): Harm moderation tolerance from 0 to 7, with 0 the strictest. The route and organization determine the approved maximum and per-category ceilings. Unapproved levels return 422 with approved levels. From 0.0 to 7.0. Default: `2`.
- Output format (`output_format`, text): Output format. One of: `jpeg`, `png`, `webp`. Default: `png`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "cost": 1.0,
    "id": "example",
    "input_mp": 1.0,
    "output_mp": 1.0,
    "polling_url": "example"
  }
}
```

### Generate flux 2 flex

Generate or edit an image with FLUX.2 [flex], which is best at typography, text and preserving small details. Works from a text prompt or from input images.

**Inputs**

- User (`user`, text): Opaque identifier for the end user supplied by the calling platform.
- Prompt (`prompt`, text, required): Text prompt for image generation.
- Prompt upsampling (`prompt_upsampling`, true/false): Whether to use prompt upsampling. Default: `true`.
- Input image (`input_image`, text): Path to the input image.
- Input image 2 (`input_image_2`, text): Path to the second input image.
- Input image 3 (`input_image_3`, text): Path to the third input image.
- Input image 4 (`input_image_4`, text): Path to the fourth input image.
- Input image 5 (`input_image_5`, text): Path to the fifth input image.
- Input image 6 (`input_image_6`, text): Path to the sixth input image.
- Input image 7 (`input_image_7`, text): Path to the seventh input image.
- Input image 8 (`input_image_8`, text): Path to the eighth input image.
- Input image blob path (`input_image_blob_path`, text): Blob path to the input image.
- Seed (`seed`, number): Optional seed for reproducibility.
- Width (`width`, number): Width of the image. At least 64.0.
- Height (`height`, number): Height of the image. At least 64.0.
- Guidance (`guidance`, number): Guidance scale for image generation. High guidance scales improve prompt adherence at the cost of reduced realism. From 1.5 to 10.0. Default: `5.0`.
- Steps (`steps`, number): Number of steps for image generation. Higher steps lead to more detailed and realistic images. From 1.0 to 50.0. Default: `50`.
- Safety tolerance (`safety_tolerance`, number): Harm moderation tolerance from 0 to 7, with 0 the strictest. The route and organization determine the approved maximum and per-category ceilings. Unapproved levels return 422 with approved levels. From 0.0 to 7.0. Default: `2`.
- Output format (`output_format`, text): Output format. One of: `jpeg`, `png`, `webp`. Default: `jpeg`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "cost": 1.0,
    "id": "example",
    "input_mp": 1.0,
    "output_mp": 1.0,
    "polling_url": "example"
  }
}
```

### Generate flux 2 klein 4b

Generate or edit an image with FLUX.2 [klein] 4B, the fastest and lightest FLUX.2 model.

**Inputs**

- User (`user`, text): Opaque identifier for the end user supplied by the calling platform.
- Prompt (`prompt`, text, required): Text prompt for image generation.
- Input image (`input_image`, text): Path to the input image.
- Input image 2 (`input_image_2`, text): Path to the second input image.
- Input image 3 (`input_image_3`, text): Path to the third input image.
- Input image 4 (`input_image_4`, text): Path to the fourth input image.
- Seed (`seed`, number): Optional seed for reproducibility.
- Width (`width`, number): Width of the image. At least 64.0.
- Height (`height`, number): Height of the image. At least 64.0.
- Safety tolerance (`safety_tolerance`, number): Harm moderation tolerance from 0 to 7, with 0 the strictest. The route and organization determine the approved maximum and per-category ceilings. Unapproved levels return 422 with approved levels. From 0.0 to 7.0. Default: `2`.
- Output format (`output_format`, text): Output format. One of: `jpeg`, `png`, `webp`. Default: `jpeg`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "cost": 1.0,
    "id": "example",
    "input_mp": 1.0,
    "output_mp": 1.0,
    "polling_url": "example"
  }
}
```

### Generate flux 2 klein 9b

Generate or edit an image with FLUX.2 [klein] 9B, which balances quality and speed and generates in under a second.

**Inputs**

- User (`user`, text): Opaque identifier for the end user supplied by the calling platform.
- Prompt (`prompt`, text, required): Text prompt for image generation.
- Input image (`input_image`, text): Path to the input image.
- Input image 2 (`input_image_2`, text): Path to the second input image.
- Input image 3 (`input_image_3`, text): Path to the third input image.
- Input image 4 (`input_image_4`, text): Path to the fourth input image.
- Seed (`seed`, number): Optional seed for reproducibility.
- Width (`width`, number): Width of the image. At least 64.0.
- Height (`height`, number): Height of the image. At least 64.0.
- Safety tolerance (`safety_tolerance`, number): Harm moderation tolerance from 0 to 7, with 0 the strictest. The route and organization determine the approved maximum and per-category ceilings. Unapproved levels return 422 with approved levels. From 0.0 to 7.0. Default: `2`.
- Output format (`output_format`, text): Output format. One of: `jpeg`, `png`, `webp`. Default: `jpeg`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "cost": 1.0,
    "id": "example",
    "input_mp": 1.0,
    "output_mp": 1.0,
    "polling_url": "example"
  }
}
```

### Generate flux 2 klein 9b preview

Generate or edit an image with the preview version of FLUX.2 [klein] 9B, which gets the latest quality and speed improvements first. For steady production use, choose FLUX.2 [klein] 9B.

**Inputs**

- User (`user`, text): Opaque identifier for the end user supplied by the calling platform.
- Prompt (`prompt`, text, required): Text prompt for image generation.
- Input image (`input_image`, text): Path to the input image.
- Input image 2 (`input_image_2`, text): Path to the second input image.
- Input image 3 (`input_image_3`, text): Path to the third input image.
- Input image 4 (`input_image_4`, text): Path to the fourth input image.
- Seed (`seed`, number): Optional seed for reproducibility.
- Width (`width`, number): Width of the image. At least 64.0.
- Height (`height`, number): Height of the image. At least 64.0.
- Safety tolerance (`safety_tolerance`, number): Harm moderation tolerance from 0 to 7, with 0 the strictest. The route and organization determine the approved maximum and per-category ceilings. Unapproved levels return 422 with approved levels. From 0.0 to 7.0. Default: `2`.
- Output format (`output_format`, text): Output format. One of: `jpeg`, `png`, `webp`. Default: `jpeg`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "cost": 1.0,
    "id": "example",
    "input_mp": 1.0,
    "output_mp": 1.0,
    "polling_url": "example"
  }
}
```

### Generate flux 2 max

Generate or edit an image with FLUX.2 [max], the highest quality FLUX.2 model, with the strongest editing consistency and prompt following.

**Inputs**

- User (`user`, text): Opaque identifier for the end user supplied by the calling platform.
- Prompt (`prompt`, text, required): Text prompt for image generation.
- Disable pup (`disable_pup`, true/false): Disable automatic prompt upsampling for this request. FLUX.2 [pro] and [max] apply prompt upsampling by default; set this to true to generate from your prompt exactly as written. Default: `false`.
- Input image (`input_image`, text): Path to the input image.
- Input image 2 (`input_image_2`, text): Path to the second input image.
- Input image 3 (`input_image_3`, text): Path to the third input image.
- Input image 4 (`input_image_4`, text): Path to the fourth input image.
- Input image 5 (`input_image_5`, text): Path to the fifth input image.
- Input image 6 (`input_image_6`, text): Path to the sixth input image.
- Input image 7 (`input_image_7`, text): Path to the seventh input image.
- Input image 8 (`input_image_8`, text): Path to the eighth input image.
- Seed (`seed`, number): Optional seed for reproducibility.
- Width (`width`, number): Width of the image. At least 64.0.
- Height (`height`, number): Height of the image. At least 64.0.
- Safety tolerance (`safety_tolerance`, number): Harm moderation tolerance from 0 to 7, with 0 the strictest. The route and organization determine the approved maximum and per-category ceilings. Unapproved levels return 422 with approved levels. From 0.0 to 7.0. Default: `2`.
- Output format (`output_format`, text): Output format. One of: `jpeg`, `png`, `webp`. Default: `jpeg`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "cost": 1.0,
    "id": "example",
    "input_mp": 1.0,
    "output_mp": 1.0,
    "polling_url": "example"
  }
}
```

### Generate flux 2 pro

Generate or edit an image with FLUX.2 [pro], the recommended default model for both. Works from a text prompt or from input images.

**Inputs**

- User (`user`, text): Opaque identifier for the end user supplied by the calling platform.
- Prompt (`prompt`, text, required): Text prompt for image generation.
- Disable pup (`disable_pup`, true/false): Disable automatic prompt upsampling for this request. FLUX.2 [pro] and [max] apply prompt upsampling by default; set this to true to generate from your prompt exactly as written. Default: `false`.
- Input image (`input_image`, text): Path to the input image.
- Input image 2 (`input_image_2`, text): Path to the second input image.
- Input image 3 (`input_image_3`, text): Path to the third input image.
- Input image 4 (`input_image_4`, text): Path to the fourth input image.
- Input image 5 (`input_image_5`, text): Path to the fifth input image.
- Input image 6 (`input_image_6`, text): Path to the sixth input image.
- Input image 7 (`input_image_7`, text): Path to the seventh input image.
- Input image 8 (`input_image_8`, text): Path to the eighth input image.
- Seed (`seed`, number): Optional seed for reproducibility.
- Width (`width`, number): Width of the image. At least 64.0.
- Height (`height`, number): Height of the image. At least 64.0.
- Safety tolerance (`safety_tolerance`, number): Harm moderation tolerance from 0 to 7, with 0 the strictest. The route and organization determine the approved maximum and per-category ceilings. Unapproved levels return 422 with approved levels. From 0.0 to 7.0. Default: `2`.
- Output format (`output_format`, text): Output format. One of: `jpeg`, `png`, `webp`. Default: `jpeg`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "cost": 1.0,
    "id": "example",
    "input_mp": 1.0,
    "output_mp": 1.0,
    "polling_url": "example"
  }
}
```

### Generate flux 2 pro preview

Generate or edit an image with the preview version of FLUX.2 [pro], which gets the latest quality and speed improvements first. For steady production use, choose FLUX.2 [pro].

**Inputs**

- User (`user`, text): Opaque identifier for the end user supplied by the calling platform.
- Prompt (`prompt`, text, required): Text prompt for image generation.
- Disable pup (`disable_pup`, true/false): Disable automatic prompt upsampling for this request. FLUX.2 [pro] and [max] apply prompt upsampling by default; set this to true to generate from your prompt exactly as written. Default: `false`.
- Input image (`input_image`, text): Path to the input image.
- Input image 2 (`input_image_2`, text): Path to the second input image.
- Input image 3 (`input_image_3`, text): Path to the third input image.
- Input image 4 (`input_image_4`, text): Path to the fourth input image.
- Input image 5 (`input_image_5`, text): Path to the fifth input image.
- Input image 6 (`input_image_6`, text): Path to the sixth input image.
- Input image 7 (`input_image_7`, text): Path to the seventh input image.
- Input image 8 (`input_image_8`, text): Path to the eighth input image.
- Seed (`seed`, number): Optional seed for reproducibility.
- Width (`width`, number): Width of the image. At least 64.0.
- Height (`height`, number): Height of the image. At least 64.0.
- Safety tolerance (`safety_tolerance`, number): Harm moderation tolerance from 0 to 7, with 0 the strictest. The route and organization determine the approved maximum and per-category ceilings. Unapproved levels return 422 with approved levels. From 0.0 to 7.0. Default: `2`.
- Output format (`output_format`, text): Output format. One of: `jpeg`, `png`, `webp`. Default: `jpeg`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "cost": 1.0,
    "id": "example",
    "input_mp": 1.0,
    "output_mp": 1.0,
    "polling_url": "example"
  }
}
```

### Generate flux 3 image

Generate an image with FLUX 3.

**Inputs**

- User (`user`, text): Opaque identifier for the end user supplied by the calling platform.
- Prompt (`prompt`, text, required): Free-form prompt describing the image.
- Images (`images`, text): Optional reference image(s) the prompt edits or draws from; each is an http(s) URL or base64, one to 10 total.
- Aspect ratio (`aspect_ratio`, text): Output aspect ratio. Under `auto` a ratio the prompt asks for wins, otherwise the output keeps the first reference image's framing; without references the prompt decides, else 1:1. One of: `21:9`, `2:1`, `16:9`, `3:2`, `7:5`, `4:3`, `5:4`, `1:1`, `4:5`, `3:4`, and 5 more.
- Resolution (`resolution`, text): Image resolution class, an equal-pixel-area tier: `768sq`, `1k` (default), `1.5k`, `2k`, or `4k`. Exact dimensions vary with the aspect ratio. `match_input` (edits only): the output keeps the first reference's own size (shrunk to 4 MP when larger), or its nearest tier when aspect_ratio is set. Ignored when width and height are set. One of: `768sq`, `1k`, `1.5k`, `2k`, `4k`, `match_input` (Match input). Default: `1k`.
- Width (`width`, number): Exact output width in pixels, [256, 6256]; set together with height. Overrides resolution and aspect_ratio.
- Height (`height`, number): Exact output height in pixels, [256, 6256]; width x height at most 16822272 pixels, and at most 4194304 with reference images.
- Safety tolerance (`safety_tolerance`, number): Harm moderation tolerance from 0 to 7, with 0 the strictest. The route and organization determine the approved maximum and per-category ceilings. Unapproved levels return 422 with approved levels. From 0.0 to 7.0. Default: `2`.
- Grounding (`grounding`, true/false): When true (default) the prompt may be grounded in external research: web search and image search. When false, both are off. Default: `true`.
- Version (`version`, text): Endpoint version. `latest` (default) serves the current release; dated pinnable release tags are added here as they are published. One of: `latest`. Default: `latest`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "cost": 1.0,
    "id": "example",
    "input_mp": 1.0,
    "output_mp": 1.0,
    "polling_url": "example"
  }
}
```

### Generate flux 3 image klein

Generate an image from a text prompt, or edit an image, with FLUX 3 Image Klein.

**Inputs**

- User (`user`, text): Opaque identifier for the end user supplied by the calling platform.
- Prompt (`prompt`, text, required): Free-form prompt describing the image.
- Images (`images`, text): Optional reference image(s), each an http(s) URL or base64, one to 10 total. The first is the image being edited and sets the default output size.
- Aspect ratio (`aspect_ratio`, text): Output aspect ratio, as in flux-3-image. `auto` (default): for edits, the first reference's exact aspect; for text-to-image, a ratio picked from the prompt (prompt rewrite, else ratio keywords, else 16:9) at the requested tier. Ignored when width and height are set. One of: `21:9`, `2:1`, `16:9`, `3:2`, `7:5`, `4:3`, `5:4`, `1:1`, `4:5`, `3:4`, and 5 more.
- Resolution (`resolution`, text): Equal-area size tier, as in flux-3-image: `768sq`, `1k`, `1.5k`, `2k` or `4k`. Omitted: `1k` for text-to-image; for edits the first reference's own size, or its nearest tier when aspect_ratio is set. Ignored when width and height are set. One of: `768sq`, `1k`, `1.5k`, `2k`, `4k`.
- Width (`width`, number): Exact output width in pixels, [64, 6256]; set together with height. Overrides resolution and aspect_ratio.
- Height (`height`, number): Exact output height in pixels, [64, 6256]; width x height at most 16822272 pixels (16.8 MP, the largest 4k bin).
- Seed (`seed`, number): Seed for reproducibility; random when omitted. From 0.0 to 4294967295.0.
- Safety tolerance (`safety_tolerance`, number): Harm moderation tolerance from 0 to 7, with 0 the strictest. The route and organization determine the approved maximum and per-category ceilings. Unapproved levels return 422 with approved levels. From 0.0 to 7.0. Default: `2`.
- Output format (`output_format`, text): Output image format: `jpeg` (default) or `png`. One of: `jpeg`, `png`. Default: `jpeg`.
- Steps (`steps`, number): Denoising steps (default 16). From 1.0 to 16.0.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "cost": 1.0,
    "id": "example",
    "input_mp": 1.0,
    "output_mp": 1.0,
    "polling_url": "example"
  }
}
```

### Generate flux 3 video

Generate a video from a text prompt with FLUX 3, with optional synchronized audio. Draft mode makes a fast preview first, which can later be rendered at full quality.

**Inputs**

- User (`user`, text): Opaque identifier for the end user supplied by the calling platform.
- Prompt (`prompt`, text, required): Free-form prompt describing the video.
- Aspect ratio (`aspect_ratio`, text): Output aspect ratio. One of: `21:9`, `2:1`, `16:9`, `4:3`, `1:1`, `3:4`, `9:16`, `9:21`.
- Duration (`duration`, number): Video length in seconds, any whole number from 5 to 20, or auto to fit the content. From 5.0 to 20.0. Default: `auto`.
- Resolution (`resolution`, text): Video resolution: hd, or fhd, qhd or uhd for a higher-resolution result. Exact dimensions vary with the aspect ratio. One of: `hd`, `fhd`, `qhd`, `uhd`. Default: `hd`.
- Version (`version`, text): Endpoint version. `latest` (default) serves the current release; dated pinnable release tags are added here as they are published. One of: `latest`. Default: `latest`.
- Generate audio (`generate_audio`, true/false): Generate synchronized audio alongside the video. Default: `true`.
- Safety tolerance (`safety_tolerance`, number): Harm moderation tolerance from 0 to 7, with 0 the strictest. The route and organization determine the approved maximum and per-category ceilings. Unapproved levels return 422 with approved levels. From 0.0 to 7.0. Default: `2`.
- Draft (`draft`, true/false): Make a fast preview and return a link to a draft bundle in the result. Pass that bundle back later to render the full-quality version. Default: `false`.
- Mode (`mode`, text): Mode. One of: `t2v`. Default: `t2v`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "cost": 1.0,
    "id": "example",
    "input_mp": 1.0,
    "output_mp": 1.0,
    "polling_url": "example"
  }
}
```

### Generate flux dev

Generate an image with FLUX.1 [dev].

**Inputs**

- User (`user`, text): Opaque identifier for the end user supplied by the calling platform.
- Prompt (`prompt`, text, required): Text prompt for image generation.
- Image prompt (`image_prompt`, text): Optional base64 encoded image to use as a prompt for generation.
- Width (`width`, number): Width of the generated image in pixels. Must be a multiple of 32. From 256.0 to 1440.0. Default: `1024`.
- Height (`height`, number): Height of the generated image in pixels. Must be a multiple of 32. From 256.0 to 1440.0. Default: `768`.
- Steps (`steps`, number): Number of steps for the image generation process. From 1.0 to 50.0. Default: `28`.
- Prompt upsampling (`prompt_upsampling`, true/false): Whether to perform upsampling on the prompt. If active, automatically modifies the prompt for more creative generation. Default: `false`.
- Seed (`seed`, number): Optional seed for reproducibility.
- Guidance (`guidance`, number): Guidance scale for image generation. High guidance scales improve prompt adherence at the cost of reduced realism. From 1.5 to 5.0. Default: `3.0`.
- Safety tolerance (`safety_tolerance`, number): Tolerance level for input and output moderation. Between 0 and 6, 0 being most strict, 6 being least strict. From 0.0 to 6.0. Default: `2`.
- Output format (`output_format`, text): Output format for the generated image. Can be 'jpeg', 'png', or 'webp'. One of: `jpeg`, `png`, `webp`. Default: `jpeg`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "cost": 1.0,
    "id": "example",
    "input_mp": 1.0,
    "output_mp": 1.0,
    "polling_url": "example"
  }
}
```

### Generate flux kontext max

Create an image with FLUX.1 Kontext [max]. For editing images, FLUX.2 [pro] or FLUX.2 [flex] is recommended instead.

**Inputs**

- User (`user`, text): Opaque identifier for the end user supplied by the calling platform.
- Prompt (`prompt`, text, required): Text prompt for image generation.
- Input image (`input_image`, text): Base64 encoded image or URL to use with Kontext.
- Input image 2 (`input_image_2`, text): Base64 encoded image or URL to use with Kontext. *Experimental Multiref*
- Input image 3 (`input_image_3`, text): Base64 encoded image or URL to use with Kontext. *Experimental Multiref*
- Input image 4 (`input_image_4`, text): Base64 encoded image or URL to use with Kontext. *Experimental Multiref*
- Seed (`seed`, number): Optional seed for reproducibility.
- Aspect ratio (`aspect_ratio`, text): Aspect ratio of the image between 21:9 and 9:21
- Output format (`output_format`, text): Output format for the generated image. Can be 'jpeg', 'png', or 'webp'. One of: `jpeg`, `png`, `webp`. Default: `png`.
- Prompt upsampling (`prompt_upsampling`, true/false): Whether to perform upsampling on the prompt. If active, automatically modifies the prompt for more creative generation. Default: `false`.
- Safety tolerance (`safety_tolerance`, number): Tolerance level for input and output moderation. Between 0 and 6, 0 being most strict, 6 being least strict. From 0.0 to 6.0. Default: `2`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "cost": 1.0,
    "id": "example",
    "input_mp": 1.0,
    "output_mp": 1.0,
    "polling_url": "example"
  }
}
```

### Generate flux kontext pro

Create an image with FLUX.1 Kontext [pro]. For editing images, FLUX.2 [pro] or FLUX.2 [flex] is recommended instead.

**Inputs**

- User (`user`, text): Opaque identifier for the end user supplied by the calling platform.
- Prompt (`prompt`, text, required): Text prompt for image generation.
- Input image (`input_image`, text): Base64 encoded image or URL to use with Kontext.
- Input image 2 (`input_image_2`, text): Base64 encoded image or URL to use with Kontext. *Experimental Multiref*
- Input image 3 (`input_image_3`, text): Base64 encoded image or URL to use with Kontext. *Experimental Multiref*
- Input image 4 (`input_image_4`, text): Base64 encoded image or URL to use with Kontext. *Experimental Multiref*
- Seed (`seed`, number): Optional seed for reproducibility.
- Aspect ratio (`aspect_ratio`, text): Aspect ratio of the image between 21:9 and 9:21
- Output format (`output_format`, text): Output format for the generated image. Can be 'jpeg', 'png', or 'webp'. One of: `jpeg`, `png`, `webp`. Default: `png`.
- Prompt upsampling (`prompt_upsampling`, true/false): Whether to perform upsampling on the prompt. If active, automatically modifies the prompt for more creative generation. Default: `false`.
- Safety tolerance (`safety_tolerance`, number): Tolerance level for input and output moderation. Between 0 and 6, 0 being most strict, 6 being least strict. From 0.0 to 6.0. Default: `2`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "cost": 1.0,
    "id": "example",
    "input_mp": 1.0,
    "output_mp": 1.0,
    "polling_url": "example"
  }
}
```

### Generate flux pro 1 0 expand

Expand an image by adding the number of pixels you choose to any of its sides, filling the new area to match the original.

**Inputs**

- User (`user`, text): Opaque identifier for the end user supplied by the calling platform.
- Image (`image`, text, required): A Base64-encoded string representing the image you wish to expand.
- Top (`top`, number): Number of pixels to expand at the top of the image. From 0.0 to 2048.0. Default: `0`.
- Bottom (`bottom`, number): Number of pixels to expand at the bottom of the image. From 0.0 to 2048.0. Default: `0`.
- Left (`left`, number): Number of pixels to expand on the left side of the image. From 0.0 to 2048.0. Default: `0`.
- Right (`right`, number): Number of pixels to expand on the right side of the image. From 0.0 to 2048.0. Default: `0`.
- Prompt (`prompt`, text, required): The description of the changes you want to make. This text guides the expansion process, allowing you to specify features, styles, or modifications for the expanded areas.
- Steps (`steps`, number): Number of steps for the image generation process. From 15.0 to 50.0. Default: `50`.
- Prompt upsampling (`prompt_upsampling`, true/false): Whether to perform upsampling on the prompt. If active, automatically modifies the prompt for more creative generation. Default: `false`.
- Seed (`seed`, number): Optional seed for reproducibility
- Guidance (`guidance`, number): Guidance strength for the image generation process. From 1.5 to 100.0. Default: `60`.
- Output format (`output_format`, text): Output format for the generated image. Can be 'jpeg', 'png', or 'webp'. One of: `jpeg`, `png`, `webp`. Default: `jpeg`.
- Safety tolerance (`safety_tolerance`, number): Tolerance level for input and output moderation. Between 0 and 6, 0 being most strict, 6 being least strict. From 0.0 to 6.0. Default: `2`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "cost": 1.0,
    "id": "example",
    "input_mp": 1.0,
    "output_mp": 1.0,
    "polling_url": "example"
  }
}
```

### Generate flux pro 1 0 fill

Fill in part of an image with FLUX.1 Fill [pro], using the image and a mask of the area to change. The mask can be the image's transparency or a separate image.

**Inputs**

- User (`user`, text): Opaque identifier for the end user supplied by the calling platform.
- Image (`image`, text, required): A Base64-encoded string representing the image you wish to modify. Can contain alpha mask if desired.
- Mask (`mask`, text): A Base64-encoded string representing a mask for the areas you want to modify in the image. The mask should be the same dimensions as the image and in black and white. Black areas (0%) indicate no modification, while white areas (100%) specify areas for inpainting. Optional if you provide an alpha mask in the original image. Validation: The endpoint verifies that the dimensions of the mask match the original image.
- Prompt (`prompt`, text, required): The description of the changes you want to make. This text guides the inpainting process, allowing you to specify features, styles, or modifications for the masked area.
- Steps (`steps`, number): Number of steps for the image generation process. From 15.0 to 50.0. Default: `50`.
- Prompt upsampling (`prompt_upsampling`, true/false): Whether to perform upsampling on the prompt. If active, automatically modifies the prompt for more creative generation. Default: `false`.
- Seed (`seed`, number): Optional seed for reproducibility
- Guidance (`guidance`, number): Guidance strength for the image generation process. From 1.5 to 100.0. Default: `60`.
- Output format (`output_format`, text): Output format for the generated image. Can be 'jpeg', 'png', or 'webp'. One of: `jpeg`, `png`, `webp`. Default: `jpeg`.
- Safety tolerance (`safety_tolerance`, number): Tolerance level for input and output moderation. Between 0 and 6, 0 being most strict, 6 being least strict. From 0.0 to 6.0. Default: `2`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "cost": 1.0,
    "id": "example",
    "input_mp": 1.0,
    "output_mp": 1.0,
    "polling_url": "example"
  }
}
```

### Generate flux pro 1 1

Generate an image with FLUX1.1 [pro].

**Inputs**

- User (`user`, text): Opaque identifier for the end user supplied by the calling platform.
- Prompt (`prompt`, text, required): Text prompt for image generation.
- Image prompt (`image_prompt`, text): Optional base64 encoded image to use with Flux Redux.
- Width (`width`, number): Width of the generated image in pixels. Must be a multiple of 32. From 256.0 to 1440.0. Default: `1024`.
- Height (`height`, number): Height of the generated image in pixels. Must be a multiple of 32. From 256.0 to 1440.0. Default: `768`.
- Prompt upsampling (`prompt_upsampling`, true/false): Whether to perform upsampling on the prompt. If active, automatically modifies the prompt for more creative generation. Default: `false`.
- Seed (`seed`, number): Optional seed for reproducibility.
- Safety tolerance (`safety_tolerance`, number): Tolerance level for input and output moderation. Between 0 and 6, 0 being most strict, 6 being least strict. From 0.0 to 6.0. Default: `2`.
- Output format (`output_format`, text): Output format for the generated image. Can be 'jpeg', 'png', or 'webp'. One of: `jpeg`, `png`, `webp`. Default: `jpeg`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "cost": 1.0,
    "id": "example",
    "input_mp": 1.0,
    "output_mp": 1.0,
    "polling_url": "example"
  }
}
```

### Generate flux pro 1 1 ultra

Generate an image with FLUX1.1 [pro] in ultra mode, with an optional raw mode.

**Inputs**

- User (`user`, text): Opaque identifier for the end user supplied by the calling platform.
- Prompt (`prompt`, text, required): The prompt to use for image generation.
- Prompt upsampling (`prompt_upsampling`, true/false): Whether to perform upsampling on the prompt. If active, automatically modifies the prompt for more creative generation. Default: `false`.
- Seed (`seed`, number): Optional seed for reproducibility. If not provided, a random seed will be used.
- Aspect ratio (`aspect_ratio`, text): Aspect ratio of the image between 21:9 and 9:21. Default: `16:9`.
- Safety tolerance (`safety_tolerance`, number): Tolerance level for input and output moderation. Between 0 and 6, 0 being most strict, 6 being least strict. From 0.0 to 6.0. Default: `2`.
- Output format (`output_format`, text): Output format for the generated image. Can be 'jpeg', 'png', or 'webp'. One of: `jpeg`, `png`, `webp`. Default: `jpeg`.
- Raw (`raw`, true/false): Generate less processed, more natural-looking images. Default: `false`.
- Image prompt (`image_prompt`, text): Optional image to remix in base64 format
- Image prompt strength (`image_prompt_strength`, number): Blend between the prompt and the image prompt. From 0.0 to 1.0. Default: `0.1`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "cost": 1.0,
    "id": "example",
    "input_mp": 1.0,
    "output_mp": 1.0,
    "polling_url": "example"
  }
}
```

### Get credits

Get your account's remaining credits.

**Inputs**: None.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "credits": 1.0
  }
}
```

### Get finetune

Get the training settings and other details of one of your fine-tunes.

**Inputs**

- Finetune id (`finetune_id`, text, required): finetune_id.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "finetune_details": {}
  }
}
```

### Get result

Get the status and result of a generation task.

**Inputs**

- Id (`id`, text, required): id.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "cost": 1.0,
    "details": {},
    "id": "example",
    "preview": {},
    "progress": 1.0,
    "result": {
      "sample": "example"
    },
    "status": "Task not found"
  }
}
```

### List finetunes

List the IDs of the fine-tunes you have created.

**Inputs**: None.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "finetunes": []
  }
}
```

### Outpaint image

Extend an image outward: it is placed on a canvas of the width and height you give, at the offset you choose, and the area around it is generated to match.

**Inputs**

- User (`user`, text): Opaque identifier for the end user supplied by the calling platform.
- Input image (`input_image`, text, required): Base64-encoded input (reference) image or HTTP(S) image URL.
- Width (`width`, number, required): Target output width. At least 64.0.
- Height (`height`, number, required): Target output height. At least 64.0.
- Auto crop (`auto_crop`, true/false): If True, crop the input image to the canvas bounds when it extends beyond the edges. If False, an error is raised instead. Default: `false`.
- Safety tolerance (`safety_tolerance`, number): Harm moderation tolerance from 0 to 7, with 0 the strictest. The route and organization determine the approved maximum and per-category ceilings. Unapproved levels return 422 with approved levels. From 0.0 to 7.0. Default: `2`.
- Output format (`output_format`, text): Output format. One of: `jpeg`, `png`, `webp`. Default: `png`.
- Prompt (`prompt`, text): 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 (`reference_offset_x`, number): 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 (`reference_offset_y`, number): Top offset (px) of the reference image's top-left corner on the output canvas. Negative values are allowed. None = center vertically.
- Mode (`mode`, text): 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'. One of: `high`, `fast`. Default: `high`.
- Disable pup (`disable_pup`, true/false): 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. Default: `false`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "cost": 1.0,
    "id": "example",
    "input_mp": 1.0,
    "output_mp": 1.0,
    "polling_url": "example"
  }
}
```

### Virtual try on

Show a garment on a person: give a photo of the person and one of the garment, and get an image of the person wearing it, at up to 4 megapixels. An editing instruction is worked out from the two images, and your prompt is used only as a fallback.

**Inputs**

- User (`user`, text): Opaque identifier for the end user supplied by the calling platform.
- Prompt (`prompt`, text, required): Text prompt for VTO generation.
- Person (`person`, text, required): Person image (maps internally to input_image).
- Garment (`garment`, text, required): Image of one more garments (maps internally to input_image_2).
- Seed (`seed`, number): Optional seed for reproducibility.
- Safety tolerance (`safety_tolerance`, number): Harm moderation tolerance from 0 to 7, with 0 the strictest. The route and organization determine the approved maximum and per-category ceilings. Unapproved levels return 422 with approved levels. From 0.0 to 7.0. Default: `2`.
- Output format (`output_format`, text): Output format. One of: `jpeg`, `png`, `webp`. Default: `jpeg`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "cost": 1.0,
    "id": "example",
    "input_mp": 1.0,
    "output_mp": 1.0,
    "polling_url": "example"
  }
}
```
