Google - Nano Banana Pro
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 nano-banana-pro for this endpoint Default:"nano-banana-pro"。 Allowed values:nano-banana-pro。 Example:nano-banana-pro。 |
prompt | string | Yes | Prompt required by the ModelFold gateway; at most 2000 characters. A text description of the image you want to generate (Max length: 20000 characters) maxLength: 2000. Example:Comic poster: cool banana hero in shades leaps from sci-fi pad. Six panels: 1) 4K mountain landscape, 2) banana holds page of long multilingual text with auto translation, 3) Gemini 3 hologram for search/knowledge/reasoning, 4) camera UI sliders for angle focus color, 5) frame trio 1:1-9:16, 6) consistent banana poses. Footer shows Google icons. Tagline: Nano Banana Pro now on ModelFold AI.。 |
image_input | array<string> | No | Input images to transform or use as reference (supports up to 8 images) (File URL after upload, not file content; Accepted types: image/jpeg, image/png, image/webp; Max size: 30.0MB) maxItems: 8. |
aspect_ratio | string | No | Aspect ratio of the generated image Default:"1:1"。 Allowed values:1:1 / 2:3 / 3:2 / 3:4 / 4:3 / 4:5 / 5:4 / 9:16 / 16:9 / 21:9 / auto。 Example:1:1。 |
resolution | string | No | Resolution of the generated image Default:"1K"。 Allowed values:1K / 2K / 4K。 Example:1K。 |
output_format | string | No | Output image format: png or jpg. Set this field explicitly. Allowed values:png / jpg。 Example:png。 |
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": "nano-banana-pro",
"prompt": "Comic poster: cool banana hero in shades leaps from sci-fi pad. Six panels: 1) 4K mountain landscape, 2) banana holds page of long multilingual text with auto translation, 3) Gemini 3 hologram for search/knowledge/reasoning, 4) camera UI sliders for angle focus color, 5) frame trio 1:1-9:16, 6) consistent banana poses. Footer shows Google icons. Tagline: Nano Banana Pro now on ModelFold AI.",
"aspect_ratio": "1:1",
"resolution": "1K"
}'json
{
"model": "nano-banana-pro",
"prompt": "Comic poster: cool banana hero in shades leaps from sci-fi pad. Six panels: 1) 4K mountain landscape, 2) banana holds page of long multilingual text with auto translation, 3) Gemini 3 hologram for search/knowledge/reasoning, 4) camera UI sliders for angle focus color, 5) frame trio 1:1-9:16, 6) consistent banana poses. Footer shows Google icons. Tagline: Nano Banana Pro now on ModelFold AI.",
"aspect_ratio": "1:1",
"resolution": "1K"
}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": {}
}