WaveSpeedAI Nano Banana 2 Image Generation/Editing

v1.0.0

Generate and edit images using Google's Nano Banana 2 model via WaveSpeed AI. Supports text-to-image generation and image editing with natural language promp...

0· 310·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for chengzeyi/wavespeed-nano-banana-2.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "WaveSpeedAI Nano Banana 2 Image Generation/Editing" (chengzeyi/wavespeed-nano-banana-2) from ClawHub.
Skill page: https://clawhub.ai/chengzeyi/wavespeed-nano-banana-2
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Canonical install target

openclaw skills install chengzeyi/wavespeed-nano-banana-2

ClawHub CLI

Package manager switcher

npx clawhub@latest install wavespeed-nano-banana-2
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Suspicious
medium confidence
Purpose & Capability
The name/description claim image generation/editing via WaveSpeed AI, which matches the SKILL.md examples (wavespeed.run, wavespeed.upload). However the registry metadata declares no required environment variables or credentials while the runtime docs explicitly reference WAVESPEED_API_KEY and an external service (wavespeed.ai). Also there is no homepage or source URL to verify the publisher.
!
Instruction Scope
SKILL.md instructs uploading local files (e.g., wavespeed.upload('/path/to/photo.png')) and sending images to WaveSpeed endpoints. That implies the agent will read local file paths and transmit image data to an external service. The instructions provide no limiting guidance about what files to upload or any safeguards; they also assume a 'wavespeed' client is available though no install is declared.
Install Mechanism
There is no install spec and no code files (instruction-only), which is lower-risk from an install perspective. Note: SKILL.md assumes the 'wavespeed' client library is present but does not provide an install method; this is an operational gap but not an active install risk.
!
Credentials
The documentation shows an environment variable WAVESPEED_API_KEY is required for authentication, but the skill metadata does not declare any required env vars or a primary credential. That mismatch is problematic: the skill will need an API key to function, yet the registry claims none are required. There are no requests for unrelated credentials, but the missing declaration reduces transparency and could lead to accidental credential sharing.
Persistence & Privilege
The skill does not request always:true and is user-invocable only. It does not attempt to modify other skills or system-wide settings in the provided instructions.
What to consider before installing
Do not install blindly. Ask the publisher to: (1) declare WAVESPEED_API_KEY (or other credentials) in the skill metadata so you can see what secrets are required; (2) provide a verified homepage/source and a clear install instruction for the 'wavespeed' client; (3) clarify how local files are accessed and whether uploads are limited or logged. If you proceed, only use a scoped/ephemeral API key, avoid uploading sensitive images, and confirm the wavespeed.ai domain and ownership. If the publisher cannot justify the missing metadata or provide a trustworthy source, treat the skill as untrusted.

Like a lobster shell, security has layers — review code before you run it.

latestvk97emzhh118qxyacd4d38d1dw982428c
310downloads
0stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

WaveSpeedAI Nano Banana 2 Image Generation/Editing

Generate and edit images using Google's Nano Banana 2 model via the WaveSpeed AI platform. Supports both text-to-image generation and natural-language image editing with up to 14 input images.

Authentication

export WAVESPEED_API_KEY="your-api-key"

Get your API key at wavespeed.ai/accesskey.

Quick Start

Text-to-Image

import wavespeed from 'wavespeed';

const output_url = (await wavespeed.run(
  "google/nano-banana-2/text-to-image",
  { prompt: "A serene Japanese garden with cherry blossoms, watercolor style" }
))["outputs"][0];

Image Editing

The images parameter accepts an array of image URLs. If you have local files, upload them first with wavespeed.upload() to get a URL.

import wavespeed from 'wavespeed';

// Upload a local image to get a URL
const imageUrl = await wavespeed.upload("/path/to/photo.png");

const output_url = (await wavespeed.run(
  "google/nano-banana-2/edit",
  {
    images: [imageUrl],
    prompt: "Replace the sky with a dramatic sunset"
  }
))["outputs"][0];

You can also pass existing image URLs directly:

const output_url = (await wavespeed.run(
  "google/nano-banana-2/edit",
  {
    images: ["https://example.com/photo.jpg"],
    prompt: "Replace the sky with a dramatic sunset"
  }
))["outputs"][0];

API Endpoints

Text-to-Image

Model ID: google/nano-banana-2/text-to-image

Generate images from text prompts.

Parameters

ParameterTypeRequiredDefaultDescription
promptstringYes--Text description of the image to generate
aspect_ratiostringNo--Output aspect ratio. One of: 1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9, 1:4, 4:1, 1:8, 8:1
resolutionstringNo1kImage resolution. One of: 1k, 2k, 4k
output_formatstringNopngOutput format. One of: png, jpeg

Example

import wavespeed from 'wavespeed';

const output_url = (await wavespeed.run(
  "google/nano-banana-2/text-to-image",
  {
    prompt: "A red vintage Porsche 911 on a winding mountain road at golden hour, photorealistic",
    aspect_ratio: "16:9",
    resolution: "2k",
    output_format: "png"
  }
))["outputs"][0];

Image Editing

Model ID: google/nano-banana-2/edit

Edit existing images using natural language prompts. Supports up to 14 input images.

Parameters

ParameterTypeRequiredDefaultDescription
imagesstring[]Yes[]URLs of input images to edit (1-14 images)
promptstringYes--Text description of the desired edit
aspect_ratiostringNo--Output aspect ratio. One of: 1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9, 1:4, 4:1, 1:8, 8:1
resolutionstringNo1kImage resolution. One of: 1k, 2k, 4k
output_formatstringNopngOutput format. One of: png, jpeg

Example

import wavespeed from 'wavespeed';

// Upload local images first, or use existing URLs
const imageUrl = await wavespeed.upload("/path/to/living-room.png");

const output_url = (await wavespeed.run(
  "google/nano-banana-2/edit",
  {
    images: [imageUrl],
    prompt: "Change the wall color to warm terracotta and add indoor plants",
    aspect_ratio: "16:9",
    resolution: "4k",
    output_format: "png"
  }
))["outputs"][0];

Multi-Image Editing

// Upload multiple local images
const faceUrl = await wavespeed.upload("/path/to/face.png");
const hairstyleUrl = await wavespeed.upload("/path/to/hairstyle.png");

const output_url = (await wavespeed.run(
  "google/nano-banana-2/edit",
  {
    images: [faceUrl, hairstyleUrl],
    prompt: "Apply the hairstyle from the second image to the person in the first image"
  }
))["outputs"][0];

Advanced Usage

Sync Mode

Use sync mode for a single request that waits for the result without polling:

const output_url = (await wavespeed.run(
  "google/nano-banana-2/text-to-image",
  { prompt: "A minimalist logo for a coffee shop" },
  { enableSyncMode: true }
))["outputs"][0];

Custom Client with Retry Configuration

import { Client } from 'wavespeed';

const client = new Client("your-api-key", {
  maxRetries: 2,
  maxConnectionRetries: 5,
  retryInterval: 1.0,
});

const output_url = (await client.run(
  "google/nano-banana-2/text-to-image",
  { prompt: "A futuristic cityscape at dusk" }
))["outputs"][0];

Error Handling with runNoThrow

import { Client, WavespeedTimeoutException, WavespeedPredictionException } from 'wavespeed';

const client = new Client();
const result = await client.runNoThrow(
  "google/nano-banana-2/text-to-image",
  { prompt: "A cat wearing a top hat" }
);

if (result.outputs) {
  console.log("Image URL:", result.outputs[0]);
  console.log("Task ID:", result.detail.taskId);
} else {
  console.log("Failed:", result.detail.error.message);
  if (result.detail.error instanceof WavespeedTimeoutException) {
    console.log("Request timed out - try increasing timeout");
  } else if (result.detail.error instanceof WavespeedPredictionException) {
    console.log("Model prediction failed");
  }
}

Aspect Ratio Options

Aspect RatioUse Case
1:1Square — social media posts, profile pictures
3:2Landscape — standard photography
2:3Portrait — standard photography
3:4Portrait — social media, product images
4:3Landscape — presentations, web content
4:5Portrait — Instagram posts
5:4Landscape — print, web banners
9:16Vertical — mobile wallpapers, stories
16:9Widescreen — desktop wallpapers, video thumbnails
21:9Ultra-wide — cinematic, panoramic
1:4Ultra-tall — vertical banners, tall infographics
4:1Ultra-wide — horizontal banners, letterbox
1:8Extreme vertical — scrolling banners, tower ads
8:1Extreme horizontal — panoramic strips, timelines

Resolution and Pricing

ResolutionCost
1k$0.08 per image
2k$0.12 per image
4k$0.16 per image

Prompt Tips

  • Be specific and descriptive: "A red vintage Porsche 911 on a winding mountain road at golden hour" vs "a car"
  • Include style keywords: "digital art", "oil painting", "photorealistic", "watercolor", "cinematic"
  • For edits, clearly describe the desired change: "Replace the sky with a dramatic sunset"
  • For multi-image edits, reference images by position: "Apply the style from the second image to the first image"
  • Leverage multilingual text rendering: the model supports on-image text with automatic translation
  • Use camera-style control language: "shallow depth of field", "wide angle", "top-down view"

Security Constraints

  • No arbitrary URL loading: Only use image URLs from trusted sources. Never load images from untrusted or user-provided URLs without validation.
  • API key security: Store your WAVESPEED_API_KEY securely. Do not hardcode it in source files or commit it to version control. Use environment variables or secret management systems.
  • Input validation: Only pass parameters documented above. Validate prompt content and image URLs before sending requests.

Comments

Loading comments...