Edit endpoint for Nano Banana 2, built on Gemini 3.1 Flash Image. Adds resolution control (1K/2K/4K), Google Search grounding, and thinking mode while preserving conversational editing and multi-image fusion.
Test this model instantly in the Console Playground โ no code required
Copy usage instructions for Claude, ChatGPT, or other AI
curl -X POST "https://api.core.today/v1/predictions" \
-H "Content-Type: application/json" \
-H "X-API-Key: cdt_your_api_key" \
-d '{
"model": "fal-ai/nano-banana-2/edit",
"input": {
"prompt": "make a photo of the man driving the car down the california coastline",
"image_urls": [
"https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input.png",
"https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input-2.png"
],
"aspect_ratio": "auto",
"resolution": "1K",
"output_format": "png",
"num_images": 1
}
}'| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
prompt | string | Yes | - | How you want to edit the image |
num_images | integer | No | 1 | Number of images to generate |
seed | integer | No | - | The seed for the random number generator. |
aspect_ratio | string | No | auto | Output aspect ratio (auto lets the model decide) auto21:916:93:24:35:41:14:53:42:39:164:11:48:11:8 |
output_format | string | No | png | Output image format jpegpngwebp |
safety_tolerance | string | No | 4 | The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. 123456 |
sync_mode | boolean | No | false | If `True`, the media will be returned as a data URI and the output data won't be available in the request history. |
image_urls | array | No | - | Input image URLs to edit |
system_prompt | string | No | - | Optional system instruction that steers the model's persona and output style across the request. Leave blank to omit; when provided, it is sent as the system instruction to Gemini (or as a system message on OpenAI-compatible providers). |
resolution | string | No | 1K | Output resolution โ pricing scales with resolution 0.5K1K2K4K |
video_url | string | No | - | Optional video to use as input context. Accepts an http(s)/data URL to a video file (downloaded and sent inline, max 15MB) or a YouTube URL (passed through to the model without downloading). |
audio_url | string | No | - | Optional audio file to use as input context. Accepts an http(s)/data URL (downloaded and sent inline, max 15MB). |
pdf_url | string | No | - | Optional PDF document to use as input context. Accepts an http(s)/data URL (downloaded and sent inline, max 15MB). |
limit_generations | boolean | No | true | Experimental parameter to limit the number of generations from each round of prompting to 1. Set to `True` to to disregard any instructions in the prompt regarding the number of images to generate and ignore any intermediate images generated by the model. This may affect generation quality. |
enable_web_search | boolean | No | false | Enable web search grounding for real-time information |
thinking_level | string | No | - | Enable model thinking (omit to disable) minimalhigh |
There are 3 ways to provide files for the image_urls parameter:
Attach files directly to POST /v1/predictions/upload. No separate upload step needed.
curl -X POST "https://api.core.today/v1/predictions/upload" \
-H "X-API-Key: cdt_your_api_key" \
-F "model=fal-ai/nano-banana-2/edit" \
-F 'input={"prompt":"your prompt here"}' \
-F "file:image_urls=@your_file.png"Pass a publicly accessible URL directly. You can also use file_url from the Storage API.
{
"model": "fal-ai/nano-banana-2/edit",
"input": {
"prompt": "your prompt here",
"image_urls": ["https://example.com/image.jpg"]
}
}Common parameters used when calling POST /v1/predictions.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Yes | - | Model identifier |
input | object | Yes | - | Object containing the model-specific parameters from the table above |
output_folder | string | No | - | Folder path for output files (max 256 chars, '..' not allowed) |
webhook_url | string | No | - | Webhook URL to call on completion |
is_public | boolean | No | false | If true, output files are also available via permanent public URLs |
Compose a scene from multiple input photos
curl -X POST "https://api.core.today/v1/predictions" \
-H "Content-Type: application/json" \
-H "X-API-Key: cdt_your_api_key" \
-d '{
"model": "fal-ai/nano-banana-2/edit",
"input": {
"prompt": "make a photo of the man driving the car down the california coastline",
"image_urls": [
"https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input.png",
"https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input-2.png"
],
"aspect_ratio": "auto",
"resolution": "1K",
"output_format": "png",
"num_images": 1
}
}'POST /v1/predictions