DexterLagan/NanoUI

A small native macOS app (Apple Silicon) for generating images with OpenRouter's Image API. Written in SwiftUI, no external dependencies.

1

stars

7

commits

Swift

primary language

Sep 3, 2026

updated

README

NanoUI

A small native macOS app (Apple Silicon) for generating images with OpenRouter's Image API. Written in SwiftUI, no external dependencies.

Platform

NanoUI screenshot

Features

  • 16 image models — Nano Banana 1 / 2 / Pro / Lite, GPT Image 1 / 2, GPT-5 Image, GPT-5.4 Image 2, FLUX.2 Pro, Seedream 4.5, Grok Imagine 2.0, Qwen Image 3, Recraft V4, Riverflow V2.5 Pro, MAI Image 2.5 Pro, Krea 2 Large
  • Per-model controls — resolution (5124K), aspect ratio, and quality pickers appear only when the selected model supports them
  • Reference images — image-to-image editing with a per-model upload cap (up to 14 for Nano Banana 2); thumbnails with one-click removal
  • Multi-image generationn stepper for models that support it (up to 10)
  • Zoom toggle — results are fitted to the window by default; click an image to switch to 1:1 pixel zoom (scrollable), click again to fit back
  • Save as… — per-image save panel with the correct file extension
  • API key — read from OPENROUTER_API_KEY when set; otherwise a key can be pasted in-app and optionally saved with Remember on this Mac (stored in plaintext under ~/Library/Preferences/local.nanoui.app.plist; unchecking the toggle deletes it)

Installation

Download the latest NanoUI-macos-arm64.zip from Releases, unzip, and drag NanoUI.app to your Applications folder.

The build is unsigned — on first launch, right-click the app in Finder and choose Open, then confirm. Launching it from the terminal also works:

OPENROUTER_API_KEY=sk-or-... open /Applications/NanoUI.app

Usage

  1. Pick a model from the dropdown (defaults to Nano Banana 2).
  2. Optionally set resolution, aspect ratio, and quality for the selected model.
  3. Click Add to upload up to 14 reference images (the counter shows the model's limit).
  4. Type a prompt and hit Generate.
  5. Click the result to toggle between fit-to-window and 1:1 zoom. Use Save Image… to export.

Building from source

Requirements: macOS 14+, Xcode Command Line Tools (xcode-select --install), Apple Silicon.

# Run directly (debug build, opens a window)
swift run

# Build a double-clickable NanoUI.app (release)
./build-app.sh

Parameters

The app targets the dedicated Image API (POST /api/v1/images). Parameters used: model, prompt, n, resolution, aspect_ratio, quality, and input_references (base64 data URLs). Per-model capabilities (allowed resolution/aspect values, reference limits, max n) are hardcoded in Sources/NanoUI/OpenRouterService.swift from OpenRouter's Image Models API discovery data.

Supported models

ModelResolutionMax refsMax nQuality
Nano Banana 2 (google/gemini-3.1-flash-image)512, 1K, 2K, 4K141
Nano Banana (google/gemini-2.5-flash-image)31
Nano Banana Pro (google/gemini-3-pro-image)1K, 2K, 4K141
Gemini 3.1 Flash Lite Image1K141
GPT Image 2 (openai/gpt-image-2)1610auto/low/medium/high
GPT Image 11610auto/low/medium/high
GPT-5 Image1610auto/low/medium/high
GPT-5.4 Image 21610auto/low/medium/high
FLUX.2 Pro81
Seedream 4.51K, 2K, 4K1410
Grok Imagine 2.01K, 2K31low/medium
Qwen Image 31K, 2K46
Recraft V416
Riverflow V2.5 Pro1K, 2K, 4K101
MAI Image 2.5 Pro11
Krea 2 Large1K11

Nano Banana 2 parameters

Full parameter set for the default model, per OpenRouter's discovery API:

  • resolution: 512, 1K, 2K, 4K
  • aspect_ratio: 1:1, 1:4, 1:8, 2:3, 3:2, 3:4, 4:1, 4:3, 4:5, 5:4, 8:1, 9:16, 16:9, 21:9
  • input_references: 0–14 images
  • n: 1
  • seed: boolean (not exposed in the UI)

Project layout

Package.swift                      Swift package definition
Sources/NanoUI/NanoUIApp.swift     App entry point
Sources/NanoUI/ContentView.swift   UI: model picker, references, prompt, results
Sources/NanoUI/OpenRouterService.swift  Image API client + model catalog
build-app.sh                       Builds the release .app bundle
icon.svg                           App icon source (vector)
icon-512x512.png / Icon.icns       App icon raster and macOS icon bundle

License

MIT © 2026 Dexter Santucci

Contributors

DexterLagan

7 commits

DexterLagan/NanoUI

A small native macOS app (Apple Silicon) for generating images with OpenRouter's Image API. Written in SwiftUI, no external dependencies.

1

stars

7

commits

Swift

primary language

Sep 3, 2026

updated

README

NanoUI

A small native macOS app (Apple Silicon) for generating images with OpenRouter's Image API. Written in SwiftUI, no external dependencies.

Platform

NanoUI screenshot

Features

  • 16 image models — Nano Banana 1 / 2 / Pro / Lite, GPT Image 1 / 2, GPT-5 Image, GPT-5.4 Image 2, FLUX.2 Pro, Seedream 4.5, Grok Imagine 2.0, Qwen Image 3, Recraft V4, Riverflow V2.5 Pro, MAI Image 2.5 Pro, Krea 2 Large
  • Per-model controls — resolution (5124K), aspect ratio, and quality pickers appear only when the selected model supports them
  • Reference images — image-to-image editing with a per-model upload cap (up to 14 for Nano Banana 2); thumbnails with one-click removal
  • Multi-image generationn stepper for models that support it (up to 10)
  • Zoom toggle — results are fitted to the window by default; click an image to switch to 1:1 pixel zoom (scrollable), click again to fit back
  • Save as… — per-image save panel with the correct file extension
  • API key — read from OPENROUTER_API_KEY when set; otherwise a key can be pasted in-app and optionally saved with Remember on this Mac (stored in plaintext under ~/Library/Preferences/local.nanoui.app.plist; unchecking the toggle deletes it)

Installation

Download the latest NanoUI-macos-arm64.zip from Releases, unzip, and drag NanoUI.app to your Applications folder.

The build is unsigned — on first launch, right-click the app in Finder and choose Open, then confirm. Launching it from the terminal also works:

OPENROUTER_API_KEY=sk-or-... open /Applications/NanoUI.app

Usage

  1. Pick a model from the dropdown (defaults to Nano Banana 2).
  2. Optionally set resolution, aspect ratio, and quality for the selected model.
  3. Click Add to upload up to 14 reference images (the counter shows the model's limit).
  4. Type a prompt and hit Generate.
  5. Click the result to toggle between fit-to-window and 1:1 zoom. Use Save Image… to export.

Building from source

Requirements: macOS 14+, Xcode Command Line Tools (xcode-select --install), Apple Silicon.

# Run directly (debug build, opens a window)
swift run

# Build a double-clickable NanoUI.app (release)
./build-app.sh

Parameters

The app targets the dedicated Image API (POST /api/v1/images). Parameters used: model, prompt, n, resolution, aspect_ratio, quality, and input_references (base64 data URLs). Per-model capabilities (allowed resolution/aspect values, reference limits, max n) are hardcoded in Sources/NanoUI/OpenRouterService.swift from OpenRouter's Image Models API discovery data.

Supported models

ModelResolutionMax refsMax nQuality
Nano Banana 2 (google/gemini-3.1-flash-image)512, 1K, 2K, 4K141
Nano Banana (google/gemini-2.5-flash-image)31
Nano Banana Pro (google/gemini-3-pro-image)1K, 2K, 4K141
Gemini 3.1 Flash Lite Image1K141
GPT Image 2 (openai/gpt-image-2)1610auto/low/medium/high
GPT Image 11610auto/low/medium/high
GPT-5 Image1610auto/low/medium/high
GPT-5.4 Image 21610auto/low/medium/high
FLUX.2 Pro81
Seedream 4.51K, 2K, 4K1410
Grok Imagine 2.01K, 2K31low/medium
Qwen Image 31K, 2K46
Recraft V416
Riverflow V2.5 Pro1K, 2K, 4K101
MAI Image 2.5 Pro11
Krea 2 Large1K11

Nano Banana 2 parameters

Full parameter set for the default model, per OpenRouter's discovery API:

  • resolution: 512, 1K, 2K, 4K
  • aspect_ratio: 1:1, 1:4, 1:8, 2:3, 3:2, 3:4, 4:1, 4:3, 4:5, 5:4, 8:1, 9:16, 16:9, 21:9
  • input_references: 0–14 images
  • n: 1
  • seed: boolean (not exposed in the UI)

Project layout

Package.swift                      Swift package definition
Sources/NanoUI/NanoUIApp.swift     App entry point
Sources/NanoUI/ContentView.swift   UI: model picker, references, prompt, results
Sources/NanoUI/OpenRouterService.swift  Image API client + model catalog
build-app.sh                       Builds the release .app bundle
icon.svg                           App icon source (vector)
icon-512x512.png / Icon.icns       App icon raster and macOS icon bundle

License

MIT © 2026 Dexter Santucci

Contributors

DexterLagan

7 commits

Languages

Swift

95.6%

Shell

4.4%