Top.Mail.Ru
Главная icon
Главная
Галерея icon
Галерея
UniFlow icon
UniFlow
Unitool Labs icon
Unitool Labs
Блог icon
Блог
MCP icon
MCP
Адрес APIapi.unitool.ai/v1

Nano Banana

Google · Изображения

nanobanana
Режимы
3

Генерация и редактирование изображений от Google по тексту и референсам.

Режимы и цены

Самый дешёвый режим: Nano Banana 1
6,25 токена
за изображение
Цена генерации зависит от режима и параметров и известна до запуска: её показывает POST /v1/quotes. Как считаются цены

Режим — версия или вариант модели со своей ценой и параметрами. Без mode берётся режим по умолчанию.

РежимЦена
Nano Banana 2.1v2-11K — 12,5 · 2K — 18,75 · 4K — 25 токенов баланса за изображение, × num_images; +2,34 при search_mode: web, images, both12,5 токеназа изображение 1K
Nano Banana 2v20.5K — 9,375 · 1K — 12,5 · 2K — 18,75 · 4K — 25 токенов баланса за изображение, × num_images12,5 токеназа изображение 1K
Nano Banana 1v1без usePro — 6,25 · с usePro — 31,25 токенов баланса за изображение, × num_images6,25 токеназа изображение

Режим

Nano Banana 2.1

"model": "nanobanana:v2-1"

Цена

12,5 токена за изображение 1K. Это цена примера запроса ниже, в токенах баланса. Точную цену своего запроса до запуска даёт POST /v1/quotes.resolution: 1Knum_images: 1search_mode: off

токенов баланса за изображение · × num_images

resolutionЦена
1K12,5
2K18,75
4K25

Цена за одну единицу. Итог умножается на num_images. Подсвечена цена примера запроса.

Доплаты, токенов баланса за изображение

  • +2,34 токенапри search_mode: web, images, both
Все правила цены: 48

Правила идут по порядку: цену задаёт первое, под которое подходит запрос.

resolutionnum_imagessearch_modeЦена
1K1off12,5 за генерацию
1K1web14,84 за генерацию
1K1images14,84 за генерацию
1K1both14,84 за генерацию
1K2off25 за генерацию
1K2web29,68 за генерацию
1K2images29,68 за генерацию
1K2both29,68 за генерацию
1K3off37,5 за генерацию
1K3web44,52 за генерацию
1K3images44,52 за генерацию
1K3both44,52 за генерацию
1K4off50 за генерацию
1K4web59,36 за генерацию
1K4images59,36 за генерацию
1K4both59,36 за генерацию
2K1off18,75 за генерацию
2K1web21,09 за генерацию
2K1images21,09 за генерацию
2K1both21,09 за генерацию
2K2off37,5 за генерацию
2K2web42,18 за генерацию
2K2images42,18 за генерацию
2K2both42,18 за генерацию
2K3off56,25 за генерацию
2K3web63,27 за генерацию
2K3images63,27 за генерацию
2K3both63,27 за генерацию
2K4off75 за генерацию
2K4web84,36 за генерацию
2K4images84,36 за генерацию
2K4both84,36 за генерацию
4K1off25 за генерацию
4K1web27,34 за генерацию
4K1images27,34 за генерацию
4K1both27,34 за генерацию
4K2off50 за генерацию
4K2web54,68 за генерацию
4K2images54,68 за генерацию
4K2both54,68 за генерацию
4K3off75 за генерацию
4K3web82,02 за генерацию
4K3images82,02 за генерацию
4K3both82,02 за генерацию
4K4off100 за генерацию
4K4web109,36 за генерацию
4K4images109,36 за генерацию
4K4both109,36 за генерацию

Состав цены (pricing из GET /v1/models/{id})

JSON
{
  "unit": "tokens",
  "kind": "by_parameters",
  "base": 12.5,
  "example_price": 12.5,
  "matrix": [
    {
      "when": {
        "resolution": "1K",
        "num_images": 1,
        "search_mode": "off"
      },
      "price": 12.5
    },
    {
      "when": {
        "resolution": "1K",
        "num_images": 1,
        "search_mode": "web"
      },
      "price": 14.84
    },
    {
      "when": {
        "resolution": "1K",
        "num_images": 1,
        "search_mode": "images"
      },
      "price": 14.84
    },
    {
      "when": {
        "resolution": "1K",
        "num_images": 1,
        "search_mode": "both"
      },
      "price": 14.84
    },
    {
      "when": {
        "resolution": "1K",
        "num_images": 2,
        "search_mode": "off"
      },
      "price": 25
    },
    {
      "when": {
        "resolution": "1K",
        "num_images": 2,
        "search_mode": "web"
      },
      "price": 29.68
    },
    {
      "when": {
        "resolution": "1K",
        "num_images": 2,
        "search_mode": "images"
      },
      "price": 29.68
    },
    {
      "when": {
        "resolution": "1K",
        "num_images": 2,
        "search_mode": "both"
      },
      "price": 29.68
    },
    {
      "when": {
        "resolution": "1K",
        "num_images": 3,
        "search_mode": "off"
      },
      "price": 37.5
    },
    {
      "when": {
        "resolution": "1K",
        "num_images": 3,
        "search_mode": "web"
      },
      "price": 44.52
    },
    {
      "when": {
        "resolution": "1K",
        "num_images": 3,
        "search_mode": "images"
      },
      "price": 44.52
    },
    {
      "when": {
        "resolution": "1K",
        "num_images": 3,
        "search_mode": "both"
      },
      "price": 44.52
    },
    {
      "when": {
        "resolution": "1K",
        "num_images": 4,
        "search_mode": "off"
      },
      "price": 50
    },
    {
      "when": {
        "resolution": "1K",
        "num_images": 4,
        "search_mode": "web"
      },
      "price": 59.36
    },
    {
      "when": {
        "resolution": "1K",
        "num_images": 4,
        "search_mode": "images"
      },
      "price": 59.36
    },
    {
      "when": {
        "resolution": "1K",
        "num_images": 4,
        "search_mode": "both"
      },
      "price": 59.36
    },
    {
      "when": {
        "resolution": "2K",
        "num_images": 1,
        "search_mode": "off"
      },
      "price": 18.75
    },
    {
      "when": {
        "resolution": "2K",
        "num_images": 1,
        "search_mode": "web"
      },
      "price": 21.09
    },
    {
      "when": {
        "resolution": "2K",
        "num_images": 1,
        "search_mode": "images"
      },
      "price": 21.09
    },
    {
      "when": {
        "resolution": "2K",
        "num_images": 1,
        "search_mode": "both"
      },
      "price": 21.09
    },
    {
      "when": {
        "resolution": "2K",
        "num_images": 2,
        "search_mode": "off"
      },
      "price": 37.5
    },
    {
      "when": {
        "resolution": "2K",
        "num_images": 2,
        "search_mode": "web"
      },
      "price": 42.18
    },
    {
      "when": {
        "resolution": "2K",
        "num_images": 2,
        "search_mode": "images"
      },
      "price": 42.18
    },
    {
      "when": {
        "resolution": "2K",
        "num_images": 2,
        "search_mode": "both"
      },
      "price": 42.18
    },
    {
      "when": {
        "resolution": "2K",
        "num_images": 3,
        "search_mode": "off"
      },
      "price": 56.25
    },
    {
      "when": {
        "resolution": "2K",
        "num_images": 3,
        "search_mode": "web"
      },
      "price": 63.27
    },
    {
      "when": {
        "resolution": "2K",
        "num_images": 3,
        "search_mode": "images"
      },
      "price": 63.27
    },
    {
      "when": {
        "resolution": "2K",
        "num_images": 3,
        "search_mode": "both"
      },
      "price": 63.27
    },
    {
      "when": {
        "resolution": "2K",
        "num_images": 4,
        "search_mode": "off"
      },
      "price": 75
    },
    {
      "when": {
        "resolution": "2K",
        "num_images": 4,
        "search_mode": "web"
      },
      "price": 84.36
    },
    {
      "when": {
        "resolution": "2K",
        "num_images": 4,
        "search_mode": "images"
      },
      "price": 84.36
    },
    {
      "when": {
        "resolution": "2K",
        "num_images": 4,
        "search_mode": "both"
      },
      "price": 84.36
    },
    {
      "when": {
        "resolution": "4K",
        "num_images": 1,
        "search_mode": "off"
      },
      "price": 25
    },
    {
      "when": {
        "resolution": "4K",
        "num_images": 1,
        "search_mode": "web"
      },
      "price": 27.34
    },
    {
      "when": {
        "resolution": "4K",
        "num_images": 1,
        "search_mode": "images"
      },
      "price": 27.34
    },
    {
      "when": {
        "resolution": "4K",
        "num_images": 1,
        "search_mode": "both"
      },
      "price": 27.34
    },
    {
      "when": {
        "resolution": "4K",
        "num_images": 2,
        "search_mode": "off"
      },
      "price": 50
    },
    {
      "when": {
        "resolution": "4K",
        "num_images": 2,
        "search_mode": "web"
      },
      "price": 54.68
    },
    {
      "when": {
        "resolution": "4K",
        "num_images": 2,
        "search_mode": "images"
      },
      "price": 54.68
    },
    {
      "when": {
        "resolution": "4K",
        "num_images": 2,
        "search_mode": "both"
      },
      "price": 54.68
    },
    {
      "when": {
        "resolution": "4K",
        "num_images": 3,
        "search_mode": "off"
      },
      "price": 75
    },
    {
      "when": {
        "resolution": "4K",
        "num_images": 3,
        "search_mode": "web"
      },
      "price": 82.02
    },
    {
      "when": {
        "resolution": "4K",
        "num_images": 3,
        "search_mode": "images"
      },
      "price": 82.02
    },
    {
      "when": {
        "resolution": "4K",
        "num_images": 3,
        "search_mode": "both"
      },
      "price": 82.02
    },
    {
      "when": {
        "resolution": "4K",
        "num_images": 4,
        "search_mode": "off"
      },
      "price": 100
    },
    {
      "when": {
        "resolution": "4K",
        "num_images": 4,
        "search_mode": "web"
      },
      "price": 109.36
    },
    {
      "when": {
        "resolution": "4K",
        "num_images": 4,
        "search_mode": "images"
      },
      "price": 109.36
    },
    {
      "when": {
        "resolution": "4K",
        "num_images": 4,
        "search_mode": "both"
      },
      "price": 109.36
    }
  ]
}

Пример запроса

POST/v1/generations
curl https://api.unitool.ai/v1/generations \
  -H "Authorization: Bearer $UNITOOL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Prefer: wait=60" \
  -d '{
  "model": "nanobanana",
  "mode": "v2-1",
  "input": {
    "prompt": "A red fox running through fresh snow at sunrise",
    "aspect_ratio": "auto",
    "resolution": "1K",
    "num_images": 1,
    "thinking_level": "minimal",
    "search_mode": "off"
  },
  "metadata": {
    "order_id": "A-1042"
  }
}'
Ответ202 Accepted
Location: /v1/generations/gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60
Retry-After: 5
{
  "id": "gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60",
  "object": "generation",
  "model": "nanobanana",
  "mode": "v2-1",
  "status": "queued",
  "progress": 0,
  "cost": {
    "estimated_tokens": 12.5,
    "charged_tokens": 0,
    "refunded_tokens": 0,
    "settled": false
  },
  "outputs": [],
  "error": null,
  "metadata": {
    "order_id": "A-1042"
  },
  "created_at": "2026-11-29T12:00:00.000Z",
  "completed_at": null,
  "expires_at": null
}

Результат

Пока генерация идёт, читайте её по id: статус сменится с queued или running на succeeded. С заголовком Prefer: wait готовый объект может прийти уже в ответе на POST, тогда это 200, а не 202.

GET/v1/generations/{id}
curl https://api.unitool.ai/v1/generations/gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60 \
  -H "Authorization: Bearer $UNITOOL_API_KEY"
Ответ200 OK
{
  "id": "gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60",
  "object": "generation",
  "model": "nanobanana",
  "mode": "v2-1",
  "status": "succeeded",
  "progress": 1,
  "cost": {
    "estimated_tokens": 12.5,
    "charged_tokens": 12.5,
    "refunded_tokens": 0,
    "settled": true
  },
  "outputs": [
    {
      "index": 0,
      "type": "image",
      "file_ref": "attachment:482913",
      "url": "https://api.unitool.ai/v1/files/q83vEjRkT1mXc0yLw2hN5aZp7dUoB9sGfI4tKeYxWrQ6/file.png",
      "content_type": "image/png",
      "width": 1024,
      "height": 1024,
      "size": 1843200,
      "expires_at": "2026-12-06T12:00:41.000Z"
    }
  ],
  "error": null,
  "metadata": {
    "order_id": "A-1042"
  },
  "created_at": "2026-11-29T12:00:00.000Z",
  "completed_at": "2026-11-29T12:00:41.000Z",
  "expires_at": "2026-12-06T12:00:41.000Z"
}

Если генерация не удалась

HTTP-ответ тот же 200. Причина в error.code, судьба токенов в error.refund. Все коды: Генерации медиа

200 OK · "status": "failed"
{
  "id": "gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60",
  "object": "generation",
  "model": "nanobanana",
  "mode": "v2-1",
  "status": "failed",
  "progress": 0,
  "cost": {
    "estimated_tokens": 12.5,
    "charged_tokens": 12.5,
    "refunded_tokens": 12.5,
    "settled": true
  },
  "outputs": [],
  "error": {
    "code": "model_error",
    "message": "The model failed to produce a result.",
    "refund": "full"
  },
  "metadata": {
    "order_id": "A-1042"
  },
  "created_at": "2026-11-29T12:00:00.000Z",
  "completed_at": "2026-11-29T12:00:41.000Z",
  "expires_at": null
}

Параметры

ПараметрОписание
promptstring · обязательный
aspect_ratiostringСоотношение сторонЗначения:auto1:116:94:33:29:163:42:34:521:95:44:11:48:11:8По умолчанию "auto"
resolutionstringРазрешениеЗначения:1K2K4KПо умолчанию "1K"
num_imagesnumber 1–4Кол-во изображенийПо умолчанию 1
thinking_levelstringУровень размышленийЗначения:minimalmediumhighПо умолчанию "minimal"
search_modestringПоиск GoogleЗначения:offwebimagesbothПо умолчанию "off"
image_urlsarray of file (≤ 14)A file_ref (asset:… or attachment:…), an https URL or a data: URL.

Вебхук

Когда генерация завершается, тот же объект приходит POST-запросом на ваш адрес в поле data. Подпись, повторы и настройка: Вебхуки

POST · generation.succeeded
{
  "type": "generation.succeeded",
  "timestamp": "2026-11-29T12:00:41.000Z",
  "data": {
    "id": "gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60",
    "object": "generation",
    "model": "nanobanana",
    "mode": "v2-1",
    "status": "succeeded",
    "progress": 1,
    "cost": {
      "estimated_tokens": 12.5,
      "charged_tokens": 12.5,
      "refunded_tokens": 0,
      "settled": true
    },
    "outputs": [
      {
        "index": 0,
        "type": "image",
        "file_ref": "attachment:482913",
        "url": "https://api.unitool.ai/v1/files/q83vEjRkT1mXc0yLw2hN5aZp7dUoB9sGfI4tKeYxWrQ6/file.png",
        "content_type": "image/png",
        "width": 1024,
        "height": 1024,
        "size": 1843200,
        "expires_at": "2026-12-06T12:00:41.000Z"
      }
    ],
    "error": null,
    "metadata": {
      "order_id": "A-1042"
    },
    "created_at": "2026-11-29T12:00:00.000Z",
    "completed_at": "2026-11-29T12:00:41.000Z",
    "expires_at": "2026-12-06T12:00:41.000Z"
  }
}

Лимиты

Генерация асинхронная: создание, ожидание или опрос, результат по ссылке на 7 дней. Подробно: Генерации медиа

Одновременные генерации ограничены на аккаунт, лишние ждут в очереди: Лимиты и заголовки

Мы используем файлы cookie

Продолжая пользоваться сайтом, вы соглашаетесь с Политикой обработки персональных данных.