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

# Image to Image

> Generate high-definition image from text and reference image using nano banana model.

<Warning>
  Make sure you add your [s3 details](/enterprise-api/general/update-s3-details) for `nano_banana` server, so you can receive image generated in your bucket. Images generated without s3 details being added will be delete after **24hours**
</Warning>

## Request

Make a `POST` request to below endpoint and pass the required parameters in the request body.

```curl curl theme={null}
--request POST 'https://modelslab.com/api/v1/enterprise/nano_banana/img2img' \
```

## Body

```json json theme={null}
{
  "key": "enterprise_api_key",
  "prompt": "Ultra-realistic cinematic lifestyle photo of a young woman sitting on the roof of a vintage turquoise van in a vast flower field, captured from a close low-angle perspective. She wears a pastel summer dress and white sneakers, holding a small bouquet of wildflowers, legs hanging off the van. Soft smile, looking up at the sky, hair and dress gently blowing in the wind. Pastel blue balloons float beside her.Cute hand-drawn doodles surround the scene: flowers, stars, hearts, sparkles, butterflies, smiley faces, and clouds. Handwritten white sketch text in the sky reads \"my happy place,\" \"bloom,\" and \"sunny day.\" Large soft blue sky with ample negative space creates an airy, peaceful composition,Bright natural daylight, dreamy glow, soft bloom, pastel film tones, low contrast, smooth highlights. Color palette: turquoise, sky blue, soft white, pastel pink, pastel yellow, warm cream. Korean indie aesthetic, nostalgic youth diary vibe, Kodak Portra 160 film look, soft grain, ultra-detailed dreamy realism, 8K, aspect ratio 3:4.",
  "ref_image": "https://assets.modelslab.ai/generations/5e265b64-17e7-461b-8fdd-273393ef4e93.jpg",
  "width": 2048,
  "height": 2048,
  "samples": 1,
  "seed": 42,
  "negative_prompt": "blurry, low quality, distorted",
  "noise_scale_start": 7.5,
  "noise_scale_end": 7.5,
  "noise_clip_std": 2.5,
  "keep_original_aspect": "no",
  "watermark": "no",
  "temp": "no",
  "base64": "no",
  "track_id": null,
  "webhook": null
}
```

## Body Attributes

<ParamField body="key" type="string" required placeholder="enterprise_api_key">
  Your API Key used for request authorization.
</ParamField>

<ParamField body="prompt" type="string" required>
  Text prompt describing the image you want to generate.
</ParamField>

<ParamField body="ref_image" type="string" required>
  Image URL (or array of URLs) to use as reference images for the generation.
</ParamField>

<ParamField body="negative_prompt" type="string">
  Items you don't want in the image.
</ParamField>

<ParamField body="width" type="number" min="1024" max="2048" default="2048">
  Width of the generated image. Must be between 1024 and 2048 and divisible by 32. Defaults to reference image size.
</ParamField>

<ParamField body="height" type="number" min="1024" max="2048" default="2048">
  Height of the generated image. Must be between 1024 and 2048 and divisible by 32. Defaults to reference image size.
</ParamField>

<ParamField body="seed" type="number" min="0" max="4294967295">
  Seed for reproducible generation. 0 triggers a random seed.
</ParamField>

<ParamField body="samples" type="number" min="1" max="4" default="1">
  Number of images to return. Maximum: 4.
</ParamField>

<ParamField body="noise_scale_start" type="number" min="0" max="30" default="7.5">
  Starting noise scale for the generation process.
</ParamField>

<ParamField body="noise_scale_end" type="number" min="0" max="30" default="7.5">
  Ending noise scale for the generation process.
</ParamField>

<ParamField body="noise_clip_std" type="number" min="0" max="10" default="2.5">
  Noise clip standard deviation.
</ParamField>

<ParamField body="keep_original_aspect" type="string" default="no">
  Keep the original aspect ratio of the reference image. Only applies when using a single reference image. Values: "yes" or "no".
</ParamField>

<ParamField body="watermark" type="string" default="no">
  Whether to add a watermark to the generated image. Values: "yes" or "no".
</ParamField>

<ParamField body="temp" type="string" default="no">
  Store in temporary directory. Values: "yes" or "no".
</ParamField>

<ParamField body="base64" type="string" default="no">
  Return image as base64 encoded text. Values: "yes" or "no".
</ParamField>

<ParamField body="webhook" type="string" placeholder="https://your.webhook.url">
  A URL to receive a POST API call once the image generation is complete.
</ParamField>

<ParamField body="track_id" type="string" placeholder="Unique ID for webhook">
  A unique ID used in the webhook response to identify the request.
</ParamField>
