Skip to content

Berrry

Integrated nanobanana into berrry.app app builder So that all apps can access it easily via HTTP GET/POST without API key.

Core trick

An HTTP GET endpoint takes size and prompt as URL parameters and returns a Nano Banana image, so plain img tags work.

Tags

Description

Integrated nanobanana into berrry.app app builder So that all apps can access it easily via HTTP GET/POST without API key.
vgrichina/nanobanana-berrry-hackathon★ 32 forksJavaScriptCreated Sep 6, 2025 · last push Sep 7, 2025

README excerpt

# 🍌 Google Nano Banana API Integration for berrry.app

**Hackathon Submission**: Integration of Google's Nano Banana (Gemini 2.5 Flash Image) API that turns any web app into a visual experience with 1 line of code.

## 🎯 What This Is

This project showcases a **production-ready integration** of **Google's Nano Banana API** (Gemini 2.5 Flash Image model) into [berrry.app](https://berrry.app). It demonstrates how modern AI image generation can be seamlessly embedded into existing web applications with zero JavaScript required.

### ⚡ Key Innovation

**Direct `<img>` tag compatibility** - No JavaScript, no SDKs, no complex integration:

```html
<!-- This just works -->
<img src="/api/nanobanana/image/512/512?prompt=wizard+in+purple+robes" />
```

## 🚀 What Makes This Integration Special

### 1. **Zero-Friction Integration**
- Works in plain HTML `<img>` tags
- CSS `background-image` URLs
- Direct browser requests
- No authentication required for basic usage

### 2. **Production-Grade Performance**
- **Intelligent caching** with PostgreSQL LOB storage
- **Fallback system** - apps never break when AI is down
- **Cost optimization** through content deduplication
- **Rate limiting** and error handling

### 3. **Real-World Usage**
This isn't a demo - it's **live in production** on berrry.app with:
- **14+ successful generations** from real users
- **Multiple demo apps** using the API
- **Cache hit rates** reducing API costs
- **Fallback images** ensuring 100% uptime

## 📁 Repository 

Team