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

# Nano Banana Pro Flash API

> Generate images from text with Nano Banana Pro Flash. Powered by Gemini 3.1 Flash for fast generation with Google Search grounding, reference images, and resolutions up to 4K.

<Card title="Gemini 3.1 Flash integration" icon="bolt">
  The faster variant of Nano Banana Pro, powered by Google's Gemini 3.1 Flash model for rapid image generation with optional web search grounding.
</Card>

Nano Banana Pro Flash (also known as **Nano Banana 2** on fal.ai) is a text-to-image API powered by Google's Gemini 3.1 Flash model. It generates images from natural language prompts with faster processing times than the standard Nano Banana Pro, making it suited for iterative creative workflows and high-volume applications. The model supports Google Search grounding, reference-guided generation with up to 3 images, 10 aspect ratios, and resolutions up to 4K.

### Key capabilities

* **Fast generation**: Powered by Gemini 3.1 Flash for shorter processing times compared to Nano Banana Pro
* **Google Search grounding**: Enable `use_google_search_tool` for images that need real-world accuracy (places, brands, current events)
* **Reference image support**: Up to 3 reference images (PNG, JPEG, WebP) for style and subject guidance
* **Flexible aspect ratios**: 10 ratios including `1:1`, `16:9`, `9:16`, `21:9`, `2:3`, `3:2`, `4:3`, `3:4`, `5:4`, `4:5`
* **Resolution options**: `1K` (fast), `2K` (balanced), `4K` (best quality)
* **Prompt range**: 2 to 3,000 characters for detailed scene descriptions
* **Async processing**: Webhook notifications or polling for task completion

### Use cases

* **Rapid prototyping**: Fast iteration on visual concepts where speed matters more than maximum quality
* **Grounded generation**: Images of real places, products, or events using Google Search for accuracy
* **Reference-guided creation**: Style transfer and subject guidance from existing images
* **Marketing and social media**: Quick generation of campaign visuals in various aspect ratios
* **High-volume pipelines**: Batch generation where throughput is a priority

### Generate images with Nano Banana Pro Flash

Create images by submitting a text prompt to the API. The service returns a task ID for async polling or webhook notification.

<div className="my-11">
  <Columns cols={2}>
    <Card title="POST /v1/ai/text-to-image/nano-banana-pro-flash" icon="wand-magic-sparkles" href="/api-reference/text-to-image/nano-banana-pro-flash/generate">
      Create a new image generation task
    </Card>

    <Card title="GET /v1/ai/text-to-image/nano-banana-pro-flash" icon="list" href="/api-reference/text-to-image/nano-banana-pro-flash/nano-banana-pro-flash-tasks">
      List all Nano Banana Pro Flash tasks
    </Card>

    <Card title="GET /v1/ai/text-to-image/nano-banana-pro-flash/{task-id}" icon="magnifying-glass" href="/api-reference/text-to-image/nano-banana-pro-flash/task-by-id">
      Get task status and results by ID
    </Card>
  </Columns>
</div>

### Parameters

| Parameter                | Type      | Required | Default | Description                                                                           |
| ------------------------ | --------- | -------- | ------- | ------------------------------------------------------------------------------------- |
| `prompt`                 | `string`  | Yes      | -       | Text description of the image to generate (2-3,000 characters)                        |
| `reference_images`       | `array`   | No       | -       | Up to 3 reference images with optional `text` and `mime_type` per image               |
| `aspect_ratio`           | `string`  | No       | `1:1`   | Output ratio: `1:1`, `2:3`, `3:2`, `4:3`, `3:4`, `5:4`, `4:5`, `16:9`, `9:16`, `21:9` |
| `resolution`             | `string`  | No       | `1K`    | Quality level: `1K`, `2K`, `4K`                                                       |
| `use_google_search_tool` | `boolean` | No       | `false` | Enable Google Search grounding for real-world accuracy                                |
| `webhook_url`            | `string`  | No       | -       | URL for async status notifications                                                    |

## Frequently Asked Questions

<AccordionGroup>
  <Accordion title="What is Nano Banana Pro Flash and how does it work?">
    Nano Banana Pro Flash is a text-to-image API powered by Google's Gemini 3.1 Flash model. You submit a text prompt (2-3,000 characters) via the API, optionally include up to 3 reference images, and receive a task ID immediately. Poll the task endpoint or configure a webhook to receive the generated image URL when processing completes.
  </Accordion>

  <Accordion title="What does Google Search grounding do?">
    When `use_google_search_tool` is set to `true`, the model uses Google Search to ground its generation with real-world information. This improves accuracy for prompts referencing real places, people, brands, or current events. The response includes `groundingMetadata` with source information when this feature is active.
  </Accordion>

  <Accordion title="What image formats are supported for reference images?">
    Nano Banana Pro Flash accepts PNG, JPEG, and WebP reference images. Each reference image must be a publicly accessible URL. You can include up to 3 reference images, each with optional descriptive text and mime type.
  </Accordion>

  <Accordion title="What resolutions are available?">
    Three resolution levels: `1K` (fastest generation), `2K` (balanced quality and speed), and `4K` (best quality).
  </Accordion>

  <Accordion title="What are the rate limits for Nano Banana Pro Flash?">
    Rate limits depend on your subscription tier. See [Rate Limits](/ratelimits) for current limits.
  </Accordion>

  <Accordion title="How much does Nano Banana Pro Flash cost?">
    See the [Pricing page](/pricing) for current rates and subscription options.
  </Accordion>

  <Accordion title="What is the difference between Nano Banana Pro and Nano Banana Pro Flash?">
    Nano Banana Pro Flash uses Google's Gemini 3.1 Flash model optimized for speed, while Nano Banana Pro uses the standard model for maximum quality. Both share the same parameters, aspect ratios, and resolution options. Choose Flash when generation speed matters; choose Pro when you need the highest quality output. Flash defaults to `1K` resolution while Pro defaults to `2K`.
  </Accordion>
</AccordionGroup>

## Best practices

* **Google Search grounding**: Enable `use_google_search_tool` when your prompt references real-world entities (landmarks, brands, public figures) for more accurate results
* **Reference images**: Use high-quality reference images with clear visual elements for best guided generation
* **Prompt writing**: Be specific about subjects, composition, lighting, and style. The 3,000-character limit allows for detailed scene descriptions
* **Resolution selection**: Use `1K` for fastest iteration, `2K` for balanced workflows, `4K` for final production assets
* **Production integration**: Use webhooks instead of polling for scalable applications
* **Error handling**: Implement retry logic with exponential backoff for 503 errors

## Related APIs

* **[Mystic](/api-reference/mystic/mystic)**: Magnific's proprietary image generation with LoRA style control
* **[Flux Kontext Pro](/api-reference/text-to-image/flux-kontext-pro/overview)**: Context-aware generation with image-guided editing
* **[Seedream 4](/api-reference/text-to-image/seedream-4/overview)**: High-quality text-to-image generation with advanced prompt understanding
