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

# Gemini 3.1 Flash Image API

> Quickstart for Google Gemini 3.1 Flash Image — fast text-to-image and natural-language image editing.

## Overview

**Gemini 3.1 Flash Image** is Google's low-latency image model, available on RouterBase. It supports text-to-image with configurable aspect ratio and resolution (up to 4K), plus natural-language image editing with up to 14 reference images.

|                     |                          |
| ------------------- | ------------------------ |
| **Provider**        | Google                   |
| **Family**          | `gemini-3-1-flash-image` |
| **Modality**        | Image                    |
| **Supported tasks** | `text-to-image`, `edit`  |

## Endpoint

```http theme={null}
POST https://routerbase.com/v1/images/generations
```

## Playground

Try it live without writing code:

* [Text-to-image](https://routerbase.com/models/google/gemini-3-1-flash-image/text-to-image)
* [Edit](https://routerbase.com/models/google/gemini-3-1-flash-image/edit)

## Supported Tasks

Each task has its own reference page with full parameter docs and examples:

* [`text-to-image`](/google-gemini-3-1-flash-image-api/text-to-image)
* [`edit`](/google-gemini-3-1-flash-image-api/edit)

## Authentication

All requests require a Bearer token — create one at
[routerbase.com/api-key](https://routerbase.com/api-key).

```bash theme={null}
curl https://routerbase.com/v1/images/generations \
  -H "Authorization: Bearer $ROUTERBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "google/gemini-3-1-flash-image-t2i", "prompt": "…"}'
```
