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

# Nano Banana Pro · Text to image

> Ultra-consistent characters with commercial-grade quality.

[← Nano Banana](/api-documentation/ai-generation/models/nano-banana)

**Model name:** `nano-banana-pro`\
**Generation type:** `text_to_image`\
**Endpoint:** [`POST /api/asset_generator/`](/api-reference/ai-generation/post-ai-generation)

## Pricing

| Resolution | Credits |
| - | - |
| 1K | **1.5** |
| 2K | **1.5** |
| 4K | **3.0** |

Prices are per output. When a request asks for several outputs, the charge is this price times the number of outputs.

## Quick start

<CodeGroup>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://api.creatify.ai/api/asset_generator/ \
    --header 'Content-Type: application/json' \
    --header 'X-API-ID: your-api-id' \
    --header 'X-API-KEY: your-api-key' \
    --data '{
      "model_name": "nano-banana-pro",
      "input_params": {
        "prompt": "A product photo of a ceramic mug on a marble counter, soft daylight."
      }
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.creatify.ai/api/asset_generator/",
      headers={"X-API-ID": "your-api-id", "X-API-KEY": "your-api-key"},
      json={
          "model_name": "nano-banana-pro",
          "input_params": {
              "prompt": "A product photo of a ceramic mug on a marble counter, soft daylight."
          },
      },
  )
  print(response.json()["id"])
  ```
</CodeGroup>

## Input parameters

Send these fields in `input_params`.

<ParamField body="prompt" type="string" required>
  The prompt for image editing.

  Minimum characters: `3`.
  Maximum characters: `5000`.
</ParamField>

<ParamField body="resolution" type="string" default={"1K"}>
  The resolution of the image to generate.

  Allowed values: `"1K"`, `"2K"`, `"4K"`.
</ParamField>

<ParamField body="aspect_ratio" type="string" default={"9:16"}>
  The aspect ratio of the generated image.

  Allowed values: `"21:9"`, `"16:9"`, `"3:2"`, `"4:3"`, `"5:4"`, `"1:1"`, `"4:5"`, `"3:4"`, `"2:3"`, `"9:16"`.
</ParamField>

<ParamField body="output_format" type="string" default={"png"}>
  The format of the generated image.

  Allowed values: `"jpeg"`, `"png"`, `"webp"`.
</ParamField>

<ParamField body="num_images" type="integer" default={1}>
  The number of images to generate.

  Minimum: `1`.
  Maximum: `4`.
</ParamField>

<Accordion title="Complete JSON schema">
  ```json theme={null}
  {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "required": [
      "prompt"
    ],
    "properties": {
      "resolution": {
        "enum": [
          "1K",
          "2K",
          "4K"
        ],
        "type": "string",
        "title": "Resolution",
        "default": "1K",
        "description": "The resolution of the image to generate.",
        "x-advance-settings": true
      },
      "aspect_ratio": {
        "enum": [
          "21:9",
          "16:9",
          "3:2",
          "4:3",
          "5:4",
          "1:1",
          "4:5",
          "3:4",
          "2:3",
          "9:16"
        ],
        "type": "string",
        "title": "Aspect Ratio",
        "default": "9:16",
        "description": "The aspect ratio of the generated image."
      },
      "output_format": {
        "enum": [
          "jpeg",
          "png",
          "webp"
        ],
        "type": "string",
        "title": "Output Format",
        "default": "png",
        "description": "The format of the generated image.",
        "x-advance-settings": true
      },
      "num_images": {
        "type": "integer",
        "title": "Number of Images",
        "default": 1,
        "maximum": 4,
        "minimum": 1,
        "x-ui-name": "output_nums",
        "description": "The number of images to generate."
      },
      "prompt": {
        "type": "string",
        "title": "Prompt",
        "maxLength": 5000,
        "minLength": 3,
        "description": "The prompt for image editing."
      }
    }
  }
  ```
</Accordion>

## Response

The request returns the task with `status: "initializing"`. Poll [GET /api/asset\_generator/\{id}/](/api-reference/ai-generation/get-ai-generation-) until `status` is `done` or `failed`, or pass a `webhook_url` to be notified. A finished task lists its files in `assets` and the credits it charged in `credits_used`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.