Skip to content
aiqbenchAI & Quantum Intelligence
NewsInsightsBenchmarksSkillsAsk AILearnAbout
...Loading your session
NewsInsightsBenchmarksSkillsAsk AILearnAbout
Back to list
aiqbench takeAI Products

aiqbench analysis

This guide demonstrates a practical application of Google's Gemini image editing capabilities via OpenRouter, allowing developers to modify existing images using text prompts within Python or TypeScript workflows. The technical focus remains on the specific API mechanics for image-to-image generation rather than broader consumer product launches or general software updates.
1
Source coveringOpenRouter

Nano Banana API: Edit Images with Gemini in Code

OpenRouter·September 9, 2026·8 min read at OpenRouter

From OpenRouter

Excerpt

Send a source image and an edit prompt in one request, get the edited image back, and change the editing model by editing a single field. Runnable Python and TypeScript included.

This guide shows how to edit an image with a text prompt in code. You send the source image and an edit prompt to google/gemini-3.1-flash-image through the OpenRouter API, and the edited image comes back in the response. “Nano Banana” is the nickname for Google’s Gemini image models. This slug is Nano Banana 2, the default fast model in that family. Because you reach it through one API, you can use a different editing model later by changing one field.

Image editing changes an existing image. Image generation creates a new image from text. This guide covers editing, so every request here includes a source image. For creating images from text, see the image generation docs or the image generation tutorial.

Editing takes one request. Put the source image in input_references and the instruction in prompt, then read the edited image from data[0].b64_json and decode it to disk.

google/gemini-3.1-flash-image is Nano Banana 2, the default fast Gemini image model.

Excerpt shown under the publisher's RSS terms · 159 words · full text and figures are on the publisher's site

Read at OpenRouter ↗Ask about this article

Article info

Source

OpenRouter

Published

September 9, 2026

Read time

8 min at OpenRouter

Category

AI Products
aiqbench
AI & Quantum Intelligence© aiqbench. All rights reserved.

Feeds:RSS·JSON Feed

LanguageEnglish·Românăbeta
NewsAI & TechQuantumInsights
ExploreBenchmarksLearn
CompanyAboutTrustLegal noticeTerms of ServicePrivacy PolicyCopyright noticesData erasureReport content

The aiqbench take, the insights, the daily digest and Ask answers are written by AI models from the sources shown, without editorial review before publication. They may contain errors — check the source. How the model is used →

  • News
  • Insights
  • Ask AI
  • Benchmarks
  • Account