ApiframeApiframe Docs
Image GenerationNano Banana

Nano Banana 2 Lite

Google's fastest, most cost-efficient Nano Banana image model, built for high-volume 1K generation.

POST /v2/images/generatemodel: "nano-banana-2-lite"

Google's fastest and cheapest Nano Banana model, built on Gemini 3.1 Flash Lite Image. It delivers text-to-image outputs in roughly 4 seconds while keeping the character consistency and text rendering of the Nano Banana family. Outputs are generated at 1K resolution across 14 aspect ratios, making it ideal for prototyping, real-time apps, and high-volume workflows at scale.

See Image Generation overview for common request fields, response format, and error codes.

Model-specific parameters

ParameterTypeDescription
nanoBananaParams.aspect_ratiostring"match_input_image" or "W:H" format (e.g. "16:9")
nanoBananaParams.output_formatstring"jpg" (default) or "png"
nanoBananaParams.image_inputstring[]Up to 14 reference image URLs
nanoBananaParams.google_searchbooleanUse Google Web Search grounding for real-time information
nanoBananaParams.image_searchbooleanUse Google Image Search for visual context

Nano Banana 2 Lite generates at 1K resolution only — there is no resolution parameter.

Credit cost

7 credits per generation.

Example result

Once the job is COMPLETED, the result object on GET /v2/jobs/:id looks like:

{
  "images": [
    "https://cdn2.apiframe.ai/images/a1b2c3d4-e5f6-7890-abcd-ef1234567890-1.png"
  ]
}

See Result format for field details.

Code examples

Text-to-image

curl -X POST https://api.apiframe.ai/v2/images/generate \
  -H "X-API-Key: afk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "a photorealistic cityscape at golden hour",
    "model": "nano-banana-2-lite",
    "nanoBananaParams": {
      "aspect_ratio": "16:9",
      "output_format": "png"
    }
  }'
import requests

response = requests.post(
    "https://api.apiframe.ai/v2/images/generate",
    headers={
        "X-API-Key": "afk_your_api_key_here",
        "Content-Type": "application/json",
    },
    json={
        "prompt": "a photorealistic cityscape at golden hour",
        "model": "nano-banana-2-lite",
        "nanoBananaParams": {
            "aspect_ratio": "16:9",
            "output_format": "png",
        },
    },
)
print(response.json())
const response = await fetch("https://api.apiframe.ai/v2/images/generate", {
  method: "POST",
  headers: {
    "X-API-Key": "afk_your_api_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    prompt: "a photorealistic cityscape at golden hour",
    model: "nano-banana-2-lite",
    nanoBananaParams: {
      aspect_ratio: "16:9",
      output_format: "png",
    },
  }),
});
console.log(await response.json());

Image-to-image

curl -X POST https://api.apiframe.ai/v2/images/generate \
  -H "X-API-Key: afk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "restyle this photo as a watercolor painting",
    "model": "nano-banana-2-lite",
    "nanoBananaParams": {
      "image_input": ["https://example.com/photo.jpg"],
      "aspect_ratio": "match_input_image"
    }
  }'
import requests

response = requests.post(
    "https://api.apiframe.ai/v2/images/generate",
    headers={
        "X-API-Key": "afk_your_api_key_here",
        "Content-Type": "application/json",
    },
    json={
        "prompt": "restyle this photo as a watercolor painting",
        "model": "nano-banana-2-lite",
        "nanoBananaParams": {
            "image_input": ["https://example.com/photo.jpg"],
            "aspect_ratio": "match_input_image",
        },
    },
)
const response = await fetch("https://api.apiframe.ai/v2/images/generate", {
  method: "POST",
  headers: {
    "X-API-Key": "afk_your_api_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    prompt: "restyle this photo as a watercolor painting",
    model: "nano-banana-2-lite",
    nanoBananaParams: {
      image_input: ["https://example.com/photo.jpg"],
      aspect_ratio: "match_input_image",
    },
  }),
});

Try it

POST/v2/images/generateTry it

On this page