Tutorials & Tips

OpenRouter tutorial shows how to edit images with Nano Banana 2 via code

Original title:Nano Banana API: Edit Images with Gemini in Code

AI summary

OpenRouter released a tutorial demonstrating image editing by sending a source image and text instructions through the API to google/gemini-3.1-flash-image, also known as Nano Banana 2, with edited results returned as base64 in the response. The tutorial provides Python and TypeScript examples, prompt-writing guidance, a multi-turn small-step editing method, and notes that switching models requires changing only one field, while also covering price and quality differences among the four Nano Banana models.

Key Takeaways

  • OpenRouter released a tutorial demonstrating image editing by sending a source image and text…
  • 1-flash-image,also known as Nano Banana 2,with edited results returned as base64 in the response.
  • The tutorial provides Python and TypeScript examples,prompt-writing guidance,a multi-turn…

Quick Facts

Published
Updated
Source
OpenRouter:Announcements(RSS)
Category
Tutorials & Tips
AI score
64
Read the original Read the full article at the original source
Why it matters

原文给出完整可运行的图像编辑请求代码和提示词写法,读者可以照搬并把模型换成其他供应商做对比。

Related entities

Source & copyright

This article is based on curated titles and AI summaries from the AIHOT public API, with attribution and links back. Original copyright remains with the original publishers and authors; this site does not mirror full texts.

Original article · AIHOT entry

How to Cite

When citing this article, keep the title, date, and permalink, and credit Orange News as the source.

Orange News: OpenRouter tutorial shows how to edit images with Nano Banana 2 via code. September 9, 2026. https://new.nat6.net/en/news/cmtwlujuv02r0row7odx8rss3/

View all →