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

# Introduction

> Asynchronous image generation across three NanoBanana models.

The Generation API exposes three image models — **NanoBanana**, **NanoBanana 2**, and **NanoBanana Pro** — each with two input modes: text-to-image and image-to-image from URLs.

<Card title="Base URL" icon="link">
  All endpoints are served under:

  ```text theme={null}
  https://bananahub.io/api/v1
  ```
</Card>

## How it works

All generation requests are **asynchronous**. A successful call returns `202 Accepted` with a `job_id` and a `status_url`. You then poll `GET /jobs/{job_id}` until the job reaches a terminal state (`done` or `failed`).

<Steps>
  <Step title="Create a job">
    `POST` to a generation endpoint with your prompt and parameters. You receive a `job_id`.
  </Step>

  <Step title="Poll for the result">
    `GET /jobs/{job_id}` until `status` is `done` or `failed`.
  </Step>

  <Step title="Download the image">
    When `done`, read `result.image_url` — a presigned URL valid for 24 hours.
  </Step>
</Steps>

<Tip>
  Prefer push over poll? Register a [webhook](/concepts/webhooks) and we'll call you when a job finishes.
</Tip>

## Models at a glance

| Model          | Resolution   | Text-to-image                | Image-to-image (URLs)       |
| -------------- | ------------ | ---------------------------- | --------------------------- |
| NanoBanana     | 1K only      | `POST /nb/text-generations`  | `POST /nb/url-generations`  |
| NanoBanana 2   | 1K · 2K · 4K | `POST /nb2/text-generations` | `POST /nb2/url-generations` |
| NanoBanana Pro | 1K · 2K · 4K | `POST /text-generations`     | `POST /url-generations`     |

## Next steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Create your first generation end-to-end with cURL.
  </Card>

  <Card title="Authentication" icon="key" href="/authentication">
    Get your API key and learn about idempotency.
  </Card>

  <Card title="Models" icon="astroid" href="/concepts/models">
    Compare NanoBanana, NanoBanana 2, and Pro.
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/nanobanana-pro/text-to-image">
    Full request and response schemas.
  </Card>
</CardGroup>
