falImage to imageComing soon
fal-ai/flux-general/image-to-image
fal-ai/flux-general/image-to-image is an image to image tool from fal that runs in the background and returns images. Coming soon: listed with its price, not yet open to runs.
This tool is listed but not yet available to run.
Priced by usagePricing
$0.0975 per megapixel. Each image_size preset counts as 1 MP, and a custom width × height rounds up to whole megapixels. Billed on num_images, default 1. The final charge comes from usage.
Limits
- Runs
- In the background
- Returns
- image
- Longest queue wait
- 3600s
- Run deadline
- 1800s
- Largest inline input
- 1024 KB
- Largest input file
- 500 MB
- Largest output
- 4768 MB
- Outputs per run
- 16
Input
| Field | Kind | Default | Description |
|---|---|---|---|
prompt required | text | — | The prompt to generate an image from. |
image_size | JSON | — | The size of the generated image. |
num_inference_steps | number (whole) 1 to 50 | 28 | The number of inference steps to perform. |
seed | number (whole) | — | The same seed and the same prompt given to the same version of the model will output the same image every time. |
loras | JSON | [] | The LoRAs to use for the image generation. You can use any number of LoRAs and they will be merged together to generate the final image. |
control_loras | JSON | [] | The LoRAs to use for the image generation which use a control image. You can use any number of LoRAs and they will be merged together to generate the final image. |
controlnets | JSON | [] | The controlnets to use for the image generation. Only one controlnet is supported at the moment. |
controlnet_unions | JSON | [] | The controlnet unions to use for the image generation. Only one controlnet is supported at the moment. |
ip_adapters | JSON | [] | IP-Adapter to use for image generation. |
easycontrols | JSON | [] | EasyControl Inputs to use for image generation. |
fill_image | JSON | — | Use an image input to influence the generation. Can be used to fill images in masked areas. |
guidance_scale | number 0 to 20 | 3.5 | The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. |
real_cfg_scale | number 0 to 5 | 3.5 | The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. |
use_real_cfg | true or false | false | Uses classical CFG as in SD1.5, SDXL, etc. Increases generation times and price when set to be true. If using XLabs IP-Adapter v1, this will be turned on!. |
use_cfg_zero | true or false | false | Uses CFG-zero init sampling as in https://arxiv.org/abs/2503.18886. |
num_images | number (whole) 1 to 10 | 1 | The number of images to generate. This is always set to 1 for streaming output. |
reference_image_url | text | — | URL of Image for Reference-Only |
reference_strength | number -3 to 3 | 0.65 | Strength of reference_only generation. Only used if a reference image is provided. |
reference_start | number 0 to 1 | 0 | The percentage of the total timesteps when the reference guidance is to bestarted. |
reference_end | number 0 to 1 | 1 | The percentage of the total timesteps when the reference guidance is to be ended. |
base_shift | number 0.01 to 5 | 0.5 | Base shift for the scheduled timesteps |
max_shift | number 0.01 to 5 | 1.15 | Max shift for the scheduled timesteps |
output_format | one of jpeg, png | png | The format of the generated image. |
use_beta_schedule | true or false | false | Specifies whether beta sigmas ought to be used. |
sigma_schedule | text | — | Sigmas schedule for the denoising process. |
scheduler | one of euler, dpmpp_2m | euler | Scheduler for the denoising process. |
negative_prompt | text | Negative prompt to steer the image generation away from unwanted features. By default, we will be using NAG for processing the negative prompt. | |
nag_scale | number … to 10 | 3 | The scale for NAG. Higher values will result in a image that is more distant to the negative prompt. |
nag_tau | number | 2.5 | The tau for NAG. Controls the normalization of the hidden state. Higher values will result in a less aggressive normalization, but may also lead to unexpected changes with respect to the original image. Not recommended to change this value. |
nag_alpha | number … to 1 | 0.25 | The alpha value for NAG. This value is used as a final weighting factor for steering the normalized guidance (positive and negative prompts) in the direction of the positive prompt. Higher values will result in less steering on the normalized guidance where lower values will result in considering the positive prompt guidance more. |
nag_end | number … to 1 | 0.25 | The proportion of steps to apply NAG. After the specified proportion of steps has been iterated, the remaining steps will use original attention processors in FLUX. |
image_url required | URL or file | — | URL of image to use for inpainting. or img2img |
strength | number 0.01 to 1 | 0.85 | The strength to use for inpainting/image-to-image. Only used if the image_url is provided. 1.0 is completely remakes the image while 0.0 preserves the original. |
Same request in code
curl https://api.spiral.ai/v1/runs \
-H "Authorization: Bearer $SPIRAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"provider": "fal",
"model": "fal-ai/flux-general/image-to-image",
"input": {
"prompt": "A photo of a lion sitting on a stone bench",
"image_url": "https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png"
}
}'