Skip to content
AI HOT (Curated Pool)

OpenRouter Tutorial: Edit Images with Nano Banana 2 in Code

OpenRouter 教程:用代码调用 Nano Banana 2 编辑图像

OpenRouter published a tutorial showing developers how to call Gemini's image editing model with one API. The default model is Nano Banana 2 (google/gemini-3.1-flash-image). You send a source image and a text instruction, and the API returns the edited image. The tutorial includes full Python and TypeScript examples: encode local files as base64 or pass a hosted URL. Edit in small steps—send each result back as the next input to stack changes. Switch models by changing one field. The post doesn't spell out pricing or latency for Nano Banana 2, only that the family includes a cheaper Lite and a pricier Pro version.

Read the original ↗Export Markdown