Nano Banana 2 Lite
Model Overview
Nano Banana 2 Lite is a cost-efficient text-to-image model from Google, a lighter and cheaper variant of Nano Banana 2 for high-volume image generation.
API Schema
The text prompt describing the content, style, or composition of the image to be generated.
List of URLs or local Base64 encoded images to edit.
The aspect ratio of the generated image. It is taken from this parameter or from the provided reference image. If the parameter is not set and no reference image is provided, the default value is 16:9.
The resolution of the output image.
1KPossible values: Enable web search for the image generation task. This will allow the model to use the latest information from the web to generate the image.
falseSuccessful response.
curl --request POST \
--url 'https://api.aimlapi.com/v1/images/generations' \
--header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>' \
--header 'Content-Type: application/json' \
--data '{"model": "google/gemini-3-1-flash-lite-image", "prompt": "Describe what you want the model to generate."}'Successful response.
{
"data": [
{
"url": "https://cdn.aimlapi.com/generations/hedgehog/1749730923700-29fe35d2-4aef-4bc5-a911-6c39884d16a8.png",
"b64_json": null
}
],
"meta": {
"usage": {
"credits_used": 120000,
"usd_spent": 0.06
}
}
}Code Example
Last updated
Was this helpful?