> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gmicloud.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# gemini-3.1-flash-lite-image

> API usage guide for gemini-3.1-flash-lite-image.

{/* source_model_id: gemini-3.1-flash-lite-image */}

{/* source_updated_at: 1782855825 */}

**Model ID**

```bash theme={null}
gemini-3.1-flash-lite-image
```

**Calling method:** sync

# Gemini 3.1 Flash-Lite Image (Nano Banana 2 Lite)

## Overview

**Gemini 3.1 Flash-Lite Image** generates and edits images from text and reference images, optimized for speed and cost. Output is 1K resolution.

## Authentication

```bash theme={null}
Authorization: Bearer YOUR_API_KEY
```

## Submit a request

```bash theme={null}
curl -X POST "https://console.gmicloud.ai/api/v1/ie/requestqueue/apikey/requests" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-3.1-flash-lite-image",
    "payload": {
      "prompt": "A hyperrealistic portrait of a cyberpunk woman under neon lights",
      "image": ["https://example.com/ref1.jpg"],
      "aspect_ratio": "4:5"
    }
  }'
```

### Request parameters

| Parameter             | Type         | Required          | Description                                                                                         |
| --------------------- | ------------ | ----------------- | --------------------------------------------------------------------------------------------------- |
| `prompt`              | string       | Yes (single-turn) | Text description of the target image. Required unless `contents` is provided.                       |
| `image`               | string/array | No                | Reference image URLs for image-guided generation/editing.                                           |
| `aspect_ratio`        | enum         | No                | `1:1` (default), `3:2`, `2:3`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9`.                  |
| `image_output_format` | enum         | No                | `png` (default) or `jpeg`.                                                                          |
| `contents`            | array        | No                | Multi-turn conversation payload for iterative editing. When provided, `prompt`/`image` are ignored. |

## Check status

```bash theme={null}
curl "https://console.gmicloud.ai/api/v1/ie/requestqueue/apikey/requests/{request_id}" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

On success, `outcome.media_urls[0].url` is the generated image.

## Pricing

* \*\*Image output: $30 per 1M tokens** (1K image ≈ 1120 tokens ≈ $0.034/image).
* Input (text, image, video): \$0.25 per 1M tokens.
* Text output (response/reasoning): \$1.50 per 1M tokens.

## Notes

* Output resolution is fixed at 1K (720p-class) in this release.
