HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
minimaxir
gemimg
Python2025–2025
minimaxir / gemimg

gemimg

Lightweight wrapper for generating and editing images from Gemini 2.5 Flash Image/Nano Banana

2Distinct people
7Mentions
1Explicit recommenders
352GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Lightweight wrapper for generating and editing images from Gemini 2.5 Flash Image/Nano Banana

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

I like the Python library that accompanies this: https://github.com/minimaxir/gemimg I added a CLI to it (using Gemini CLI) and submitted a PR, you can run that like so:…

simonw used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by week7 dated mentions

Observed mentions: 2025-09-08 16:47:41 UTC to 2025-11-20 18:58:54 UTC. Weeks start Monday, UTC.

0122025-09-08 00:00:00 UTC to 2025-09-15 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 commentsSep 82025-09-15 00:00:00 UTC to 2025-09-22 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-22 00:00:00 UTC to 2025-09-29 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-29 00:00:00 UTC to 2025-10-06 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2025-10-06 00:00:00 UTC to 2025-10-13 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-10-13 00:00:00 UTC to 2025-10-20 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsOct 132025-10-20 00:00:00 UTC to 2025-10-27 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-10-27 00:00:00 UTC to 2025-11-03 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025-11-03 00:00:00 UTC to 2025-11-10 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-11-10 00:00:00 UTC to 2025-11-17 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025-11-17 00:00:00 UTC to 2025-11-24 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 commentsNov 17

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Sep 82025-09-08 00:00:00 UTC2025-09-15 00:00:00 UTC211
Sep 152025-09-15 00:00:00 UTC2025-09-22 00:00:00 UTC000
Sep 222025-09-22 00:00:00 UTC2025-09-29 00:00:00 UTC000
Sep 292025-09-29 00:00:00 UTC2025-10-06 00:00:00 UTC110
Oct 62025-10-06 00:00:00 UTC2025-10-13 00:00:00 UTC000
Oct 132025-10-13 00:00:00 UTC2025-10-20 00:00:00 UTC000
Oct 202025-10-20 00:00:00 UTC2025-10-27 00:00:00 UTC000
Oct 272025-10-27 00:00:00 UTC2025-11-03 00:00:00 UTC101
Nov 32025-11-03 00:00:00 UTC2025-11-10 00:00:00 UTC000
Nov 102025-11-10 00:00:00 UTC2025-11-17 00:00:00 UTC101
Nov 172025-11-17 00:00:00 UTC2025-11-24 00:00:00 UTC202

What Hacker News says

7 sources
I...worked on the detailed Nano Banana prompt engineering analysis for months (https://news.ycombinator.com/item?id=45917875)...and...Google just...Google released a new version. Nano Banana Pro should work with my gemimg package (https://github.com/minimaxir/gemimg) without pushing a new version by passing: g = GemImg(model="gemini-3-pro-image-preview") I'll add the new output resolutions and other features ASAP. However, looking at the pricing (https://ai.google.dev/gemini-api/docs/pricing#standard_1), I'm definitely not changing the default model to Pro as $0.13 per 1k/2k output will make it a tougher sell. EDIT: Something interesting in the docs: https://ai.google.dev/gemini-api/docs/image-generation#think... > The model generates up to two interim images to test composition and logic. The last image within Thinking is also the f
Read the rest
inal rendered image. Maybe that's partially why the cost is higher: it's hard to tell if intermediate images are billed in addition to the output. However, this could cause an issue with the base gemimg and have it return an intermediate image instead of the final image depending on how the output is constructed, so will need to double-check.
In Nano Banana Pro
simonw·Nov 13, 2025Recommendation phrase
I like the Python library that accompanies this: https://github.com/minimaxir/gemimg I added a CLI to it (using Gemini CLI) and submitted a PR, you can run that like so: GEMINI_API_KEY="..." \ uv run --with https://github.com/minimaxir/gemimg/archive/d6b9d5bbefa1e2ffc3b09086bc0a3ad70ca4ef… \ python -m gemimg "a racoon holding a hand written sign that says I love trash" Result in this comment: https://github.com/minimaxir/gemimg/pull/7#issuecomment-3529...
In Nano Banana can be prompt engineered for nuanced AI image generation
Everyone is sleeping on Gemini 2.5 Flash Image / Nano Banana. As shown in the OP, it's substantially more powerful than most other models while at the same price-per-image, and due to its text encoder it can handle significantly larger and more nuanced prompts to get exactly what you want. I open-sourced a Python package for generating from it with examples (https://github.com/minimaxir/gemimg) and am currently working on a blog post with even more representative examples. Google also allows generations for free with aspect ratio control in AI Studio: https://aistudio.google.com/prompts/new_chat That said, I am surprised Seedream 4.0 beat it in these tests.
In Generative AI Image Editing Showdown
I recently released a Python package for easily generating images with Nano Banana: https://github.com/minimaxir/gemimg Through that testing, there is one prompt engineering trend that was consistent but controversial: both a) LLM-style prompt engineering with with Markdown-formated lists and b) old-school AI image style quality syntatic sugar such as award-winning and DSLR camera are both extremely effective with Gemini 2.5 Flash Image, due to its text encoder and larger training dataset which can now more accurately discriminate which specific image traits are present in an award-winning image and what traits aren't. I've tried generations both with and without those tricks and the tricks definitely have an impact. Google's developer documentation encourages the latter. However, taking advantage of the 32k context window (compared to 51
Read the rest
2 for most other models) can make things interesting. It’s possible to render HTML as an image (https://github.com/minimaxir/gemimg/blob/main/docs/notebooks...) and providing highly nuanced JSON can allow for consistent generations. (https://github.com/minimaxir/gemimg/blob/main/docs/notebooks...)
In Nano Banana image examples

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.