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

# Image to Image

> Edit and transform images using Google Gemini models.

## Body Parameters

<ParamField body="model" type="string" required>
  Gemini model. Options:

  * `nano-banana-2` — Google Gemini 3.1 Flash Image, \$0.08–\$0.16/image
</ParamField>

<ParamField body="input" type="object" required>
  Input parameters for the generation.

  <Expandable title="properties">
    <ParamField body="prompt" type="string" required>
      Text description to guide the image editing or generation.
    </ParamField>

    <ParamField body="image_input" type="string[]">
      Reference image URLs (up to 14). Provide one or more images for image-to-image editing.
    </ParamField>

    <ParamField body="aspect_ratio" type="string" default="auto">
      Output aspect ratio. Options: `auto`, `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9`, `1:4`, `4:1`, `1:8`, `8:1`
    </ParamField>

    <ParamField body="resolution" type="string" default="1K">
      Output resolution. Options:

      * `1K` — \$0.08/image
      * `2K` — \$0.12/image
      * `4K` — \$0.16/image
    </ParamField>

    <ParamField body="output_format" type="string" default="jpg">
      Output image format. Options: `jpg`, `png`
    </ParamField>

    <ParamField body="google_search" type="boolean" default={false}>
      Enable real-time Google Search to enhance generation with up-to-date information. Free of charge.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="webhookUrl" type="string">
  URL to receive a webhook when the task completes.
</ParamField>

<ParamField body="metadata" type="object">
  Custom key-value metadata to attach to the task.
</ParamField>

<ResponseExample>
  ```json 202 theme={null}
  {
    "success": true,
    "data": {
      "id": "task_abc123",
      "status": "pending",
      "type": "image-to-image",
      "provider": "gemini",
      "model": "nano-banana-2",
      "created_at": "2026-02-27T10:00:00Z",
      "estimated_seconds": 10
    }
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "error": {
      "code": "VALIDATION_ERROR",
      "message": "Invalid request parameters"
    }
  }
  ```
</ResponseExample>
