The Nano Banana Lite Text To Image API uses Gemini 3.1 Flash Lite Image to generate 1K images from text prompts.
taskId.taskId to retrieve the generated images.Enum: application/json
Bearer authentication token. Example: Bearer {{APIKey}}.
The model identifier. Default: gemini-3.1-flash-lite-image. This parameter can be omitted; when provided, it must equal gemini-3.1-flash-lite-image.
The text prompt describing the image to generate. Example: Create a clean infographic titled YOUR EVERYDAY TOTE, featuring a canvas tote bag with three illustrated highlights: roomy interior, sturdy handles, and reusable design. Clear English labels, a soft neutral color palette, and generous spacing..
The output image resolution. Only 1K is supported. Default: 1K. Values are case-insensitive.
The output aspect ratio. Supported values: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9. Default: 9:16.
Returns 0 for success, or a specific error code.
Returns "success" or a descriptive error message.
The unique identifier for the task. Use this ID with the Polling API to retrieve the generated output.
Use the Polling API to retrieve the processing results.
Alternatively, you can enable Callback to receive task results automatically on completion.
{
"code": 0,
"message": "success",
"data": {
"images": [
{
"imageUrl": "https://dreamapi-rs-aigc.newportai.com/dreamapi/o/2026-11-05/08e8060517e644649d7651442d4c635d.jpeg",
"imageType": "png"
}
],
"task": {
"taskId": "API-d1c002f598c34c50bf6ff66e82a0ddb7",
"status": 3,
"errorCode": 0,
"reason": "ok",
"taskType": "google_gemini_image_lite",
"executionTime": 250167,
"expire": 1793872122195,
"creditsConsumed": 10
}
}
}curl -X POST 'https://api.newportai.com/api/async/google_gemini_image_lite' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {{key}}' \
-d '{
"text": "Create a clean infographic titled YOUR EVERYDAY TOTE, featuring a canvas tote bag with three illustrated highlights: roomy interior, sturdy handles, and reusable design. Clear English labels, a soft neutral color palette, and generous spacing.",
"aspectRatio": "4:3",
"imageSize": "1K"
}'{
"code": 0,
"message": "success",
"data": {
"taskId": "API-d1c002f598c34c50bf6ff66e82a0ddb7"
}
}