Skip to content

Google - Nano Banana 2.1 ​

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) ​

ParameterTypeRequiredDescription
modelstringYesThe model name to use for generation. Required field.
- Must be nano-banana-2-1 for this endpoint Default:"nano-banana-2-1"。 Allowed values:nano-banana-2-1。 Example:nano-banana-2-1。
promptstringYesPrompt 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_inputarray&lt;string&gt;NoInput images to transform or use as reference (supports up to 10 images) (File URL after upload, not file content; Accepted types: image/jpeg, image/png, image/webp; Max size: 30.0MB) maxItems: 10.
aspect_ratiostringNoAspect ratio of the generated image Default:"auto"。 Allowed values:1:1 / 2:3 / 3:2 / 1:4 / 4:1 / 3:4 / 4:3 / 4:5 / 5:4 / 1:8 / 8:1 / 9:16 / 16:9 / 21:9 / auto。 Example:1:1。
resolutionstringNoResolution of the generated image Default:"1K"。 Allowed values:1K / 2K / 4K。 Example:1K。
output_formatstringNoFormat of the output image Default:"jpg"。 Allowed values:png / jpg。 Example:jpg。

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-2-1",
  "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": "auto",
  "resolution": "1K",
  "output_format": "jpg"
}'
json
{
  "model": "nano-banana-2-1",
  "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": "auto",
  "resolution": "1K",
  "output_format": "jpg"
}

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": {}
}

ModelFold — one API for all the best AI models.