Skip to main content
When you call a model on fal, the arguments dict (Python) or input object (JavaScript) becomes the request body. Over HTTP, you send the same fields as the JSON body. Most fields are model inputs. fal also reads some fields as request metadata, such as the user safety identifier. Each model defines its own input schema. You can find that schema on the model’s API page, such as the Nano Banana 2 API. Many image generation models on fal share a set of common arguments that behave consistently across models. These are not platform-level controls (those are platform headers passed via the headers dict). They are model inputs that affect what the model generates and how. This page documents the most common ones for image generation so you don’t have to look them up on every model’s API page individually.

seed

Random seed for reproducible outputs. The same seed with the same inputs produces the same result. Useful for debugging, A/B testing, or letting users “lock” a generation they like and iterate on the prompt.

num_images

Number of images to generate per request. Higher values produce more results in a single call but increase processing time and cost proportionally.

image_size

Output image dimensions, used by models built with fal’s toolkit (such as FLUX models). You can pass a preset string for common aspect ratios, or a custom {width, height} object for precise control.

aspect_ratio

Some models (such as Nano Banana 2) use aspect_ratio instead of image_size. This accepts a ratio string and the model determines the output resolution internally.
Check the model’s API page to see whether it uses image_size or aspect_ratio. Passing the wrong one will have no effect.

user (safety identifier)

Provide a stable, privacy-preserving identifier for the end user who initiated the request. fal uses it as safety metadata to connect reported content to that end user. The identifier does not change model behavior or configure safety checks. Use the same value for the same end user across requests. Hash or pseudonymize the identifier before you send it. Do not include names, email addresses, or other personal information. For users who are not signed in, you can use a stable session identifier. fal includes the identifier in related safety reports. Keep a mapping in your system if you need it to investigate and take action.

enable_safety_checker

fal enables safety filtering by default. On models that expose enable_safety_checker, you can use this input to adjust the filter. fal must authorize your account before false can request relaxed filtering. Otherwise, fal keeps filtering on. Contact support to request authorization.
To request relaxed filtering, set the value to false:

enable_prompt_expansion

When enabled, fal runs your prompt through an LLM before passing it to the model. The LLM rewrites short or vague prompts into richer descriptions with detail on composition, textures, colors, lighting, and mood. For example, “a sunset” might become a detailed scene description with specific lighting conditions, color palettes, and framing. This typically improves output quality for brief prompts but may alter the result if your prompt is already detailed and precise. The expansion adds an LLM inference step before generation, so expect slightly higher latency per request. The expanded prompt is not returned in the response, so if you want to see what the model actually received, run the model with expansion disabled and handle prompt enhancement in your own pipeline.
Check the model’s API page for the exact parameter name. Some models use enable_prompt_expansion, others use expand_prompt.

output_format

Format of the generated image file. Choose based on your use case: jpeg for smaller file sizes with lossy compression, png for lossless quality with transparency support, or webp for a modern format that balances both.