Black Forest Labs (FLUX)
App · 25 actions
Generate images and videos, edit images with FLUX tools, and inspect generation results, credits and fine-tunes.
Actions
| Action | What it does |
|---|---|
| Deblur image | Sharpen a blurry image while keeping its scene, objects, composition and lighting. |
| Erase object | Remove an object or area from an image, using a mask that marks what to erase. |
| Generate flux 2 flex | Generate or edit an image with FLUX.2 [flex], which is best at typography, text and preserving small details. |
| Generate flux 2 klein 4b | Generate or edit an image with FLUX.2 [klein] 4B, the fastest and lightest FLUX.2 model. |
| 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. |
| 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. |
| 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. |
| Generate flux 2 pro | Generate or edit an image with FLUX.2 [pro], the recommended default model for both. |
| 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. |
| Generate flux 3 image | Generate an image with FLUX 3. |
| Generate flux 3 image klein | Generate an image from a text prompt, or edit an image, with FLUX 3 Image Klein. |
| Generate flux 3 video | Generate a video from a text prompt with FLUX 3, with optional synchronized audio. |
| Generate flux dev | Generate an image with FLUX.1 [dev]. |
| Generate flux kontext max | Create an image with FLUX.1 Kontext [max]. |
| Generate flux kontext pro | Create an image with FLUX.1 Kontext [pro]. |
| 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. |
| 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. |
| Generate flux pro 1 1 | Generate an image with FLUX1.1 [pro]. |
| Generate flux pro 1 1 ultra | Generate an image with FLUX1.1 [pro] in ultra mode, with an optional raw mode. |
| Get credits | Get your account's remaining credits. |
| Get finetune | Get the training settings and other details of one of your fine-tunes. |
| Get result | Get the status and result of a generation task. |
| List finetunes | List the IDs of the fine-tunes you have created. |
| 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. |
| 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. |
Deblur image
Sharpen a blurry image while keeping its scene, objects, composition and lighting. No prompt is needed.
Inputs
- User
usertext - Opaque identifier for the end user supplied by the calling platform.
- Image
imagetextRequired - Base64-encoded input image or HTTP(S) image URL.
- Seed
seednumber - Optional seed for reproducibility.
- Safety tolerance
safety_tolerancenumber - 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_formattext - Output format.One of:
jpeg,png,webp. Default:png.
Outputs
dataobject- Response.
Example output
{
"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
usertext - Opaque identifier for the end user supplied by the calling platform.
- Image
imagetextRequired - Base64-encoded input image or HTTP(S) image URL.
- Mask
masktextRequired - 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_pixelsnumber - 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
seednumber - Optional seed for reproducibility.
- Safety tolerance
safety_tolerancenumber - 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_formattext - Output format.One of:
jpeg,png,webp. Default:png.
Outputs
dataobject- Response.
Example output
{
"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
usertext - Opaque identifier for the end user supplied by the calling platform.
- Prompt
prompttextRequired - Text prompt for image generation.
- Prompt upsampling
prompt_upsamplingtrue/false - Whether to use prompt upsampling.Default:
true. - Input image
input_imagetext - Path to the input image.
- Input image 2
input_image_2text - Path to the second input image.
- Input image 3
input_image_3text - Path to the third input image.
- Input image 4
input_image_4text - Path to the fourth input image.
- Input image 5
input_image_5text - Path to the fifth input image.
- Input image 6
input_image_6text - Path to the sixth input image.
- Input image 7
input_image_7text - Path to the seventh input image.
- Input image 8
input_image_8text - Path to the eighth input image.
- Input image blob path
input_image_blob_pathtext - Blob path to the input image.
- Seed
seednumber - Optional seed for reproducibility.
- Width
widthnumber - Width of the imageAt least 64.0.
- Height
heightnumber - Height of the imageAt least 64.0.
- Guidance
guidancenumber - 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
stepsnumber - 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_tolerancenumber - 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_formattext - Output format.One of:
jpeg,png,webp. Default:jpeg.
Outputs
dataobject- Response.
Example output
{
"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
usertext - Opaque identifier for the end user supplied by the calling platform.
- Prompt
prompttextRequired - Text prompt for image generation.
- Input image
input_imagetext - Path to the input image.
- Input image 2
input_image_2text - Path to the second input image.
- Input image 3
input_image_3text - Path to the third input image.
- Input image 4
input_image_4text - Path to the fourth input image.
- Seed
seednumber - Optional seed for reproducibility.
- Width
widthnumber - Width of the imageAt least 64.0.
- Height
heightnumber - Height of the imageAt least 64.0.
- Safety tolerance
safety_tolerancenumber - 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_formattext - Output format.One of:
jpeg,png,webp. Default:jpeg.
Outputs
dataobject- Response.
Example output
{
"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
usertext - Opaque identifier for the end user supplied by the calling platform.
- Prompt
prompttextRequired - Text prompt for image generation.
- Input image
input_imagetext - Path to the input image.
- Input image 2
input_image_2text - Path to the second input image.
- Input image 3
input_image_3text - Path to the third input image.
- Input image 4
input_image_4text - Path to the fourth input image.
- Seed
seednumber - Optional seed for reproducibility.
- Width
widthnumber - Width of the imageAt least 64.0.
- Height
heightnumber - Height of the imageAt least 64.0.
- Safety tolerance
safety_tolerancenumber - 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_formattext - Output format.One of:
jpeg,png,webp. Default:jpeg.
Outputs
dataobject- Response.
Example output
{
"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
usertext - Opaque identifier for the end user supplied by the calling platform.
- Prompt
prompttextRequired - Text prompt for image generation.
- Input image
input_imagetext - Path to the input image.
- Input image 2
input_image_2text - Path to the second input image.
- Input image 3
input_image_3text - Path to the third input image.
- Input image 4
input_image_4text - Path to the fourth input image.
- Seed
seednumber - Optional seed for reproducibility.
- Width
widthnumber - Width of the imageAt least 64.0.
- Height
heightnumber - Height of the imageAt least 64.0.
- Safety tolerance
safety_tolerancenumber - 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_formattext - Output format.One of:
jpeg,png,webp. Default:jpeg.
Outputs
dataobject- Response.
Example output
{
"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
usertext - Opaque identifier for the end user supplied by the calling platform.
- Prompt
prompttextRequired - Text prompt for image generation.
- Disable pup
disable_puptrue/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_imagetext - Path to the input image.
- Input image 2
input_image_2text - Path to the second input image.
- Input image 3
input_image_3text - Path to the third input image.
- Input image 4
input_image_4text - Path to the fourth input image.
- Input image 5
input_image_5text - Path to the fifth input image.
- Input image 6
input_image_6text - Path to the sixth input image.
- Input image 7
input_image_7text - Path to the seventh input image.
- Input image 8
input_image_8text - Path to the eighth input image.
- Seed
seednumber - Optional seed for reproducibility.
- Width
widthnumber - Width of the imageAt least 64.0.
- Height
heightnumber - Height of the imageAt least 64.0.
- Safety tolerance
safety_tolerancenumber - 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_formattext - Output format.One of:
jpeg,png,webp. Default:jpeg.
Outputs
dataobject- Response.
Example output
{
"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
usertext - Opaque identifier for the end user supplied by the calling platform.
- Prompt
prompttextRequired - Text prompt for image generation.
- Disable pup
disable_puptrue/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_imagetext - Path to the input image.
- Input image 2
input_image_2text - Path to the second input image.
- Input image 3
input_image_3text - Path to the third input image.
- Input image 4
input_image_4text - Path to the fourth input image.
- Input image 5
input_image_5text - Path to the fifth input image.
- Input image 6
input_image_6text - Path to the sixth input image.
- Input image 7
input_image_7text - Path to the seventh input image.
- Input image 8
input_image_8text - Path to the eighth input image.
- Seed
seednumber - Optional seed for reproducibility.
- Width
widthnumber - Width of the imageAt least 64.0.
- Height
heightnumber - Height of the imageAt least 64.0.
- Safety tolerance
safety_tolerancenumber - 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_formattext - Output format.One of:
jpeg,png,webp. Default:jpeg.
Outputs
dataobject- Response.
Example output
{
"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
usertext - Opaque identifier for the end user supplied by the calling platform.
- Prompt
prompttextRequired - Text prompt for image generation.
- Disable pup
disable_puptrue/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_imagetext - Path to the input image.
- Input image 2
input_image_2text - Path to the second input image.
- Input image 3
input_image_3text - Path to the third input image.
- Input image 4
input_image_4text - Path to the fourth input image.
- Input image 5
input_image_5text - Path to the fifth input image.
- Input image 6
input_image_6text - Path to the sixth input image.
- Input image 7
input_image_7text - Path to the seventh input image.
- Input image 8
input_image_8text - Path to the eighth input image.
- Seed
seednumber - Optional seed for reproducibility.
- Width
widthnumber - Width of the imageAt least 64.0.
- Height
heightnumber - Height of the imageAt least 64.0.
- Safety tolerance
safety_tolerancenumber - 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_formattext - Output format.One of:
jpeg,png,webp. Default:jpeg.
Outputs
dataobject- Response.
Example output
{
"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
usertext - Opaque identifier for the end user supplied by the calling platform.
- Prompt
prompttextRequired - Free-form prompt describing the image.
- Images
imagestext - 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_ratiotext - 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
resolutiontext - 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
widthnumber - Exact output width in pixels, [256, 6256]; set together with height. Overrides resolution and aspect_ratio.
- Height
heightnumber - Exact output height in pixels, [256, 6256]; width x height at most 16822272 pixels, and at most 4194304 with reference images.
- Safety tolerance
safety_tolerancenumber - 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
groundingtrue/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
versiontext - 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
dataobject- Response.
Example output
{
"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
usertext - Opaque identifier for the end user supplied by the calling platform.
- Prompt
prompttextRequired - Free-form prompt describing the image.
- Images
imagestext - 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_ratiotext - 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
resolutiontext - 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
widthnumber - Exact output width in pixels, [64, 6256]; set together with height. Overrides resolution and aspect_ratio.
- Height
heightnumber - Exact output height in pixels, [64, 6256]; width x height at most 16822272 pixels (16.8 MP, the largest 4k bin).
- Seed
seednumber - Seed for reproducibility; random when omitted.From 0.0 to 4294967295.0.
- Safety tolerance
safety_tolerancenumber - 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_formattext - Output image format: `jpeg` (default) or `png`.One of:
jpeg,png. Default:jpeg. - Steps
stepsnumber - Denoising steps (default 16).From 1.0 to 16.0.
Outputs
dataobject- Response.
Example output
{
"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
usertext - Opaque identifier for the end user supplied by the calling platform.
- Prompt
prompttextRequired - Free-form prompt describing the video.
- Aspect ratio
aspect_ratiotext - Output aspect ratio.One of:
21:9,2:1,16:9,4:3,1:1,3:4,9:16,9:21. - Duration
durationnumber - 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
resolutiontext - 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
versiontext - 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_audiotrue/false - Generate synchronized audio alongside the video.Default:
true. - Safety tolerance
safety_tolerancenumber - 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
drafttrue/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
modetext - Mode.One of:
t2v. Default:t2v.
Outputs
dataobject- Response.
Example output
{
"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
usertext - Opaque identifier for the end user supplied by the calling platform.
- Prompt
prompttextRequired - Text prompt for image generation.
- Image prompt
image_prompttext - Optional base64 encoded image to use as a prompt for generation.
- Width
widthnumber - Width of the generated image in pixels. Must be a multiple of 32.From 256.0 to 1440.0. Default:
1024. - Height
heightnumber - Height of the generated image in pixels. Must be a multiple of 32.From 256.0 to 1440.0. Default:
768. - Steps
stepsnumber - Number of steps for the image generation process.From 1.0 to 50.0. Default:
28. - Prompt upsampling
prompt_upsamplingtrue/false - Whether to perform upsampling on the prompt. If active, automatically modifies the prompt for more creative generation.Default:
false. - Seed
seednumber - Optional seed for reproducibility.
- Guidance
guidancenumber - 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_tolerancenumber - 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_formattext - Output format for the generated image. Can be 'jpeg', 'png', or 'webp'.One of:
jpeg,png,webp. Default:jpeg.
Outputs
dataobject- Response.
Example output
{
"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
usertext - Opaque identifier for the end user supplied by the calling platform.
- Prompt
prompttextRequired - Text prompt for image generation.
- Input image
input_imagetext - Base64 encoded image or URL to use with Kontext.
- Input image 2
input_image_2text - Base64 encoded image or URL to use with Kontext. *Experimental Multiref*
- Input image 3
input_image_3text - Base64 encoded image or URL to use with Kontext. *Experimental Multiref*
- Input image 4
input_image_4text - Base64 encoded image or URL to use with Kontext. *Experimental Multiref*
- Seed
seednumber - Optional seed for reproducibility.
- Aspect ratio
aspect_ratiotext - Aspect ratio of the image between 21:9 and 9:21
- Output format
output_formattext - Output format for the generated image. Can be 'jpeg', 'png', or 'webp'.One of:
jpeg,png,webp. Default:png. - Prompt upsampling
prompt_upsamplingtrue/false - Whether to perform upsampling on the prompt. If active, automatically modifies the prompt for more creative generation.Default:
false. - Safety tolerance
safety_tolerancenumber - 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
dataobject- Response.
Example output
{
"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
usertext - Opaque identifier for the end user supplied by the calling platform.
- Prompt
prompttextRequired - Text prompt for image generation.
- Input image
input_imagetext - Base64 encoded image or URL to use with Kontext.
- Input image 2
input_image_2text - Base64 encoded image or URL to use with Kontext. *Experimental Multiref*
- Input image 3
input_image_3text - Base64 encoded image or URL to use with Kontext. *Experimental Multiref*
- Input image 4
input_image_4text - Base64 encoded image or URL to use with Kontext. *Experimental Multiref*
- Seed
seednumber - Optional seed for reproducibility.
- Aspect ratio
aspect_ratiotext - Aspect ratio of the image between 21:9 and 9:21
- Output format
output_formattext - Output format for the generated image. Can be 'jpeg', 'png', or 'webp'.One of:
jpeg,png,webp. Default:png. - Prompt upsampling
prompt_upsamplingtrue/false - Whether to perform upsampling on the prompt. If active, automatically modifies the prompt for more creative generation.Default:
false. - Safety tolerance
safety_tolerancenumber - 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
dataobject- Response.
Example output
{
"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
usertext - Opaque identifier for the end user supplied by the calling platform.
- Image
imagetextRequired - A Base64-encoded string representing the image you wish to expand.
- Top
topnumber - Number of pixels to expand at the top of the imageFrom 0.0 to 2048.0. Default:
0. - Bottom
bottomnumber - Number of pixels to expand at the bottom of the imageFrom 0.0 to 2048.0. Default:
0. - Left
leftnumber - Number of pixels to expand on the left side of the imageFrom 0.0 to 2048.0. Default:
0. - Right
rightnumber - Number of pixels to expand on the right side of the imageFrom 0.0 to 2048.0. Default:
0. - Prompt
prompttextRequired - 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
stepsnumber - Number of steps for the image generation processFrom 15.0 to 50.0. Default:
50. - Prompt upsampling
prompt_upsamplingtrue/false - Whether to perform upsampling on the prompt. If active, automatically modifies the prompt for more creative generationDefault:
false. - Seed
seednumber - Optional seed for reproducibility
- Guidance
guidancenumber - Guidance strength for the image generation processFrom 1.5 to 100.0. Default:
60. - Output format
output_formattext - Output format for the generated image. Can be 'jpeg', 'png', or 'webp'.One of:
jpeg,png,webp. Default:jpeg. - Safety tolerance
safety_tolerancenumber - 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
dataobject- Response.
Example output
{
"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
usertext - Opaque identifier for the end user supplied by the calling platform.
- Image
imagetextRequired - A Base64-encoded string representing the image you wish to modify. Can contain alpha mask if desired.
- Mask
masktext - 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
prompttextRequired - 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
stepsnumber - Number of steps for the image generation processFrom 15.0 to 50.0. Default:
50. - Prompt upsampling
prompt_upsamplingtrue/false - Whether to perform upsampling on the prompt. If active, automatically modifies the prompt for more creative generationDefault:
false. - Seed
seednumber - Optional seed for reproducibility
- Guidance
guidancenumber - Guidance strength for the image generation processFrom 1.5 to 100.0. Default:
60. - Output format
output_formattext - Output format for the generated image. Can be 'jpeg', 'png', or 'webp'.One of:
jpeg,png,webp. Default:jpeg. - Safety tolerance
safety_tolerancenumber - 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
dataobject- Response.
Example output
{
"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
usertext - Opaque identifier for the end user supplied by the calling platform.
- Prompt
prompttextRequired - Text prompt for image generation.
- Image prompt
image_prompttext - Optional base64 encoded image to use with Flux Redux.
- Width
widthnumber - Width of the generated image in pixels. Must be a multiple of 32.From 256.0 to 1440.0. Default:
1024. - Height
heightnumber - Height of the generated image in pixels. Must be a multiple of 32.From 256.0 to 1440.0. Default:
768. - Prompt upsampling
prompt_upsamplingtrue/false - Whether to perform upsampling on the prompt. If active, automatically modifies the prompt for more creative generation.Default:
false. - Seed
seednumber - Optional seed for reproducibility.
- Safety tolerance
safety_tolerancenumber - 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_formattext - Output format for the generated image. Can be 'jpeg', 'png', or 'webp'.One of:
jpeg,png,webp. Default:jpeg.
Outputs
dataobject- Response.
Example output
{
"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
usertext - Opaque identifier for the end user supplied by the calling platform.
- Prompt
prompttextRequired - The prompt to use for image generation.
- Prompt upsampling
prompt_upsamplingtrue/false - Whether to perform upsampling on the prompt. If active, automatically modifies the prompt for more creative generation.Default:
false. - Seed
seednumber - Optional seed for reproducibility. If not provided, a random seed will be used.
- Aspect ratio
aspect_ratiotext - Aspect ratio of the image between 21:9 and 9:21Default:
16:9. - Safety tolerance
safety_tolerancenumber - 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_formattext - Output format for the generated image. Can be 'jpeg', 'png', or 'webp'.One of:
jpeg,png,webp. Default:jpeg. - Raw
rawtrue/false - Generate less processed, more natural-looking imagesDefault:
false. - Image prompt
image_prompttext - Optional image to remix in base64 format
- Image prompt strength
image_prompt_strengthnumber - Blend between the prompt and the image promptFrom 0.0 to 1.0. Default:
0.1.
Outputs
dataobject- Response.
Example output
{
"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
dataobject- Response.
Example output
{
"data": {
"credits": 1.0
}
}Get finetune
Get the training settings and other details of one of your fine-tunes.
Inputs
- Finetune id
finetune_idtextRequired - finetune_id.
Outputs
dataobject- Response.
Example output
{
"data": {
"finetune_details": {}
}
}Get result
Get the status and result of a generation task.
Inputs
- Id
idtextRequired - id.
Outputs
dataobject- Response.
Example output
{
"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
dataobject- Response.
Example output
{
"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
usertext - Opaque identifier for the end user supplied by the calling platform.
- Input image
input_imagetextRequired - Base64-encoded input (reference) image or HTTP(S) image URL.
- Width
widthnumberRequired - Target output width.At least 64.0.
- Height
heightnumberRequired - Target output height.At least 64.0.
- Auto crop
auto_croptrue/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_tolerancenumber - 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_formattext - Output format.One of:
jpeg,png,webp. Default:png. - Prompt
prompttext - 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_xnumber - 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_ynumber - Top offset (px) of the reference image's top-left corner on the output canvas. Negative values are allowed. None = center vertically.
- Mode
modetext - 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_puptrue/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
dataobject- Response.
Example output
{
"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
usertext - Opaque identifier for the end user supplied by the calling platform.
- Prompt
prompttextRequired - Text prompt for VTO generation.
- Person
persontextRequired - Person image (maps internally to input_image).
- Garment
garmenttextRequired - Image of one more garments (maps internally to input_image_2).
- Seed
seednumber - Optional seed for reproducibility.
- Safety tolerance
safety_tolerancenumber - 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_formattext - Output format.One of:
jpeg,png,webp. Default:jpeg.
Outputs
dataobject- Response.
Example output
{
"data": {
"cost": 1.0,
"id": "example",
"input_mp": 1.0,
"output_mp": 1.0,
"polling_url": "example"
}
}