nano-banana-2 Полный разбор (Markdown)

Назад к разбору модели

nano-banana-2 API Руководство по модели

Краткий вывод

  • nano-banana-2 supports Text-to-Video, Image-to-Video, R2V, and Video Edit in one workflow.
  • Use this model guide page to validate parameters with minimal request/response examples.
  • Stabilize prompts here first, then move to production API integration.

Ключевые возможности

  • Unified multi-mode testing:Switch across Text-to-Video, Image-to-Video, R2V, and Video Edit in one place.
  • Parameter-first validation:Iterate quickly on prompts, durations, and references before production rollout.
  • Production-ready handoff:Minimal request/response structure helps you move stable configs into API workflows.

Когда использовать

  • When you need fast iteration across multiple generation modes.
  • When you need to validate parameters and error handling before integration.

Когда не использовать

  • For large-scale async batch production, use the server-side API pipeline directly.
  • For strict auth/audit requirements, prioritize backend orchestration.

Особенности работы

  • This model guide page is optimized for interaction and parameter rehearsal.
  • The output panel demonstrates task result structure for integration guidance.

Минимальный запрос

{
  "model": "nano-banana-2",
  "mode": "text-to-video",
  "input": {
    "prompt": "A cinematic city sunrise with soft fog and moving traffic.",
    "duration": 5
  }
}

Минимальный ответ

{
  "task_id": "task_xxxxxxxx",
  "model": "nano-banana-2",
  "mode": "text-to-video",
  "status": "queued",
  "created_at": "2026-04-15T00:00:00.000Z"
}

Ключевые параметры

ПараметрТипОбяз.По умолчаниюДиапазонОписание
modelstringДаgemini_omni-Model identifier. Use the fixed value gemini_omni.
promptstringДа--Main instruction describing the subject, action, scene, and style.
aspect_ratiostringНет16:916:99:16
durationintegerНет6610
resolutionstringНет720P720POutput resolution. Currently only 720P is supported; if omitted, the default value is used.

Частые ошибки

HTTPCodeТриггерИсправлениеПовтор
400invalid_request_errorRequest payload misses required fields or has invalid field types.Validate model, mode, and input schema before request.Retry only after fixing payload; avoid blind retries.
401authentication_errorMissing Authorization header or invalid API key.Verify Bearer token format and API key scope.Retry after auth fix; rotate key if repeated failures continue.
429rate_limit_exceededRequest rate, concurrency, or current quota hits upstream rate limiting.Apply exponential backoff first, then review request rate, concurrency, and quota usage.Use exponential backoff (e.g., 1s/2s/4s) with jitter; if it persists, reduce submission pressure.
500internal_errorTransient upstream error or internal processing failure.Capture request id and trigger retry workflow.Retry 2-3 times with short delays; escalate if persistent.

FAQ

  1. When should I use nano-banana-2?
    Use it to validate video concepts quickly, compare mode behavior, and converge prompts before API rollout.
  2. How do I choose Text-to-Video vs Image-to-Video?
    Use Text-to-Video when you only have instructions; use Image-to-Video when you already have key frames or composition.
  3. What is the difference between R2V and Video Edit?
    R2V focuses on reference-guided generation, while Video Edit focuses on modifying existing video assets.
  4. Ошибка у модели изображений или видео: invalid apitype: -1
    Обычно это означает, что запрос отправлен не в тот endpoint. Модели изображений и видео обычно не используют chat endpoint. Вместо этого нужно отправлять HTTP-запрос на создание задачи по документации и затем опрашивать endpoint статуса задачи. Сначала проверьте фактический код запроса, URL и payload.
  5. Задача на генерацию изображения или видео завершилась ошибкой, но списание произошло
    Сначала попросите у пользователя лог задачи или скриншот и проверьте, есть ли там статистика входных или выходных токенов. Если учет токенов есть, запрос, скорее всего, был отправлен через chat endpoint, а не через правильный media workflow. Модели изображений и видео обычно работают как асинхронные HTTP task API: сначала отправляется задача, затем выполняется опрос по task id согласно документации.

Связанные API