Google - Nano Banana Edit
Endpoint
POST /images/generations
Full URL: https://modelfold.ai/v1/images/generations
Authentication: every request must include the
Authorization: Bearer <API_KEY>header.
Send model parameters directly in the JSON body. Do not wrap them in input. This request waits for generation to finish and returns data[].url; supported media models also offer async jobs, polling and callbacks. Replace example media URLs with your own publicly accessible files. See API gateway for billing and errors.
Input parameters for the generation task
Request Parameters
Body (application/json)
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | The model name to use for generation. Required field. - Must be google/nano-banana-edit for this endpoint Default:"google/nano-banana-edit"。 Allowed values:google/nano-banana-edit。 Example:google/nano-banana-edit。 |
prompt | string | Yes | Prompt required by the ModelFold gateway; at most 2000 characters. The prompt for image editing (Max length: 20000 characters) maxLength: 2000. Example:turn this photo into a character figure. Behind it, place a box with the character’s image printed on it, and a computer showing the Blender modeling process on its screen. In front of the box, add a round plastic base with the character figure standing on it. set the scene indoors if possible。 |
image_urls | array<string> | Yes | List of URLs of input images for editing,up to 10 images. (File URL after upload, not file content; Accepted types: image/jpeg, image/png, image/webp; Max size: 10.0MB) maxItems: 10. |
output_format | string | No | Output format for the images Default:"png"。 Allowed values:png / jpeg。 Example:png。 |
aspect_ratio | string | No | Aspect ratio of the output image. Set this field explicitly. Allowed values:1:1 / 9:16 / 16:9 / 3:4 / 4:3 / 3:2 / 2:3 / 5:4 / 4:5 / 21:9 / auto。 Example:1:1。 |
image_size | string | No | The aspect ratio of the generated image (this parameter has been replaced by aspect_ratio; please use the latest aspect_ratio parameter). Default:"1:1"。 Allowed values:1:1 / 9:16 / 16:9 / 3:4 / 4:3 / 3:2 / 2:3 / 5:4 / 4:5 / 21:9 / auto。 Example:1:1。 |
Request Example
bash
curl -X POST "https://modelfold.ai/v1/images/generations" \
-H "Authorization: Bearer $MODELFOLD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/nano-banana-edit",
"prompt": "turn this photo into a character figure. Behind it, place a box with the character’s image printed on it, and a computer showing the Blender modeling process on its screen. In front of the box, add a round plastic base with the character figure standing on it. set the scene indoors if possible",
"image_urls": [
"https://example.com/reference.png"
],
"output_format": "png",
"image_size": "1:1"
}'json
{
"model": "google/nano-banana-edit",
"prompt": "turn this photo into a character figure. Behind it, place a box with the character’s image printed on it, and a computer showing the Blender modeling process on its screen. In front of the box, add a round plastic base with the character figure standing on it. set the scene indoors if possible",
"image_urls": [
"https://example.com/reference.png"
],
"output_format": "png",
"image_size": "1:1"
}Response
200 — Generation completed. usage contains actual billing details; result URLs are illustrative.
json
{
"ok": true,
"created": 1792134000,
"data": [
{
"url": "https://modelfold.ai/uploads/outputs/result.png"
}
],
"usage": {}
}