When One Input Isn’t Enough


My friend and I have tried all kinds of hacks to bring personalized images into Oneiras.com — training LoRAs, doing face replacements, you name it. The results were never quite good enough, and the cost + infrastructure overhead made it feel like a distraction.

But last week, Google released the nano-banana model, and it finally does what I’ve wanted for months. Combine that with a three-day weekend, and it’s live: you can now upload multiple images to your profile and generate dream visuals with you in them.

Here’s an example dream I had.


Why multiple images matter

Nano-banana determines your “likeness” based on reference images. If you only give it a single front-facing selfie, it doesn’t have enough context. The result usually looks like someone who could be you… in a parallel universe.

When I gave it:

  • Front face
  • Both sides of the face
  • Back of the head
  • Full-body shot (or at least upper body)

…the resemblance was much stronger.

That said, there’s no guarantee. Sometimes one image is enough, and sometimes even five don’t quite land. But on average, more images mean a more “me-like” output.

I’ll let you decide which of these was generated with one image vs. five:


Uploading vs. sending each time

I also wondered if there’d be a cost difference between:

  • Uploading images once with Google’s Files API and reusing them
  • Attaching images with every request

Turns out: no difference. Token usage is the same either way. The only benefit of uploading first is avoiding the occasional risk of failed uploads mid-request.

What it costs

Google advertises $0.039 per output image, but that’s only part of the story. Each request also includes input tokens. Here’s the breakdown:

  • Inputs: $0.30 per 1M tokens (text + images)
  • Outputs: $0.039 per image

Google’s official pricing docs

For me, each image came out to about $0.041 total. That’s in line with DALL·E 3 for lower-quality generations, and just one cent more than Google’s Imagen 3 (both of which I already use as fallbacks if nano-banana fails).


What’s next?

One thing I haven’t tested yet: using reference images of other people. My dreams often feature friends, coworkers, or even random passersby. If nano-banana can handle multiple people, it could make dream illustrations far richer. I’ll keep you posted as I experiment.

If you’re a dreamer, try Oneiras.com for free and see yourself in a different light. At the very least, now you know how to calculate the real cost of a nano-banana request.


P.S. A Debugging Frustration

When I upgraded to the latest version of @google/genai, I kept hitting a cryptic error from Google’s API. The fix? Stop the sandbox connection and reconnect so your Lambda picks up the new dependency versions. Simple — but it still took me a couple of tries to figure out.

Cheers!

Evgeny Urubkov (@codevev)

600 1st Ave, Ste 330 PMB 92768, Seattle, WA 98104-2246
Unsubscribe · Preferences

codevev

codevev is a weekly newsletter designed to help you become a better software developer. Every Wednesday, get a concise email packed with value:• Skill Boosts: Elevate your coding with both hard and soft skill insights.• Tool Tips: Learn about new tools and how to use them effectively.• Real-World Wisdom: Gain from my experiences in the tech field.

Read more from codevev

Last week, I ran into this tweet: the tweet It kinda triggered me. Why would someone pay $0.40 per secret per month when you could just use AWS Parameter Store and store them as SecureStrings FOR FREE? That’s what I use for oneiras.com, so I was determined to find out if I’d missed something. Am I unknowingly paying per secret? Or is there actually a reason to use AWS Secrets Manager instead? Turns out, there are a couple, but only if you really need them. The Big One: Automated Secrets...

Well, the global AWS outage happened just four days after I sent a newsletter about COEs and how “nobody gets blamed.” Great timing, right? I wish I could’ve been in the weekly global ops meeting to see the temperature in the room. That’s the one where teams present their recent issues and learnings. I can only imagine how lively that one must’ve been. Turns out the culprit was a DNS failure in the Amazon DynamoDB endpoint in the us-east-1 region. And while that sounds region-specific, it...

Someone pushes a new feature to prod the same day you go on-call. Hours later, your phone goes off - not a gentle buzz, but a full-blown siren that could wake up the entire neighborhood. You open the alert, and it’s for a feature you didn’t even touch. Maybe it’s unhandled NPEs, maybe something else. Doesn’t matter. You’re the one on-call, so it’s your problem now. When Things Break In those moments, it’s usually faster to just debug and fix it - even without full context. I’m pretty good at...