/Tool/Nano Banana2 Text2Image
app icon

Nano Banana2 Text2Image

Verified by Dify
No ratings yet
1.5k
W
wwwzhouhui/nano_banana2_text2image

AI text-to-image generation plugin powered by Juxin API with Gemini 3 Pro Image Preview model

Productivity

Project Source Code:

🍌 Nano Banana2 Text-to-Image Plugin

High-quality AI text-to-image Dify plugin supporting Juxin API and Gemai public API, using Gemini 3 Pro Image Preview model

✨ Features

  • 🎨 Gemini 3 Pro: Uses Google Gemini 3 Pro Image Preview model for high-quality image generation
  • 🔄 Dual API Support: Supports Juxin API (paid) and Gemai public API (free)
  • 🚫 Negative Prompts: Supports specifying unwanted content to improve generation quality
  • 📐 Aspect Ratio Selection: Supports multiple aspect ratios (1:1, 16:9, 9:16, 4:3, 3:4)
  • 🖌️ Style Control: Supports various artistic styles (realistic, anime, oil-painting, watercolor, sketch)
  • 🔢 Batch Generation: Generate 1-4 images at once
  • 🌡️ Creativity Control: Control randomness and creativity through temperature parameter
  • 🌐 Multilingual: Complete bilingual support in Chinese and English
  • ⚡ Real-time Feedback: Detailed generation progress and status feedback
  • 🛡️ Error Handling: Comprehensive error handling with user-friendly prompts

🚀 Quick Start

1. Get API Key

Option 1: Juxin API (Paid)

  1. Visit Juxin API Platform
  2. Create an account and generate an API Key
  3. Copy your API Key

Option 2: Gemai Public API (Free)

  1. Visit Gemai Public API
  2. Get a free API Key
  3. Copy your API Key

Note: You can configure both API Keys and choose which one to use when generating images

2. Install Plugin

Online Installation (Recommended)

Search for "Nano Banana2" in the Dify plugin marketplace and install

Offline Installation

  1. Download the plugin package (.difypkg file)
  2. Select "Offline Installation" in Dify
  3. Upload the plugin package file

3. Configure API Key

After installation:

  1. Click the "Authorize" button on the right side of the plugin

  2. Fill in your API Key(s) (you can configure one or both)

    • Juxin API Key: Paid service, stable quality
    • Gemai Public API Key: Free service
  3. Click Save

4. Start Using

Add the Nano Banana2 text-to-image tool in Agent or Chatflow:

  1. Select API provider (Juxin API or Gemai Public API)
  2. Enter image description to generate images

🎯 Model Information

This plugin uses the Gemini 3 Pro Image Preview model:

  • Model Name: gemini-3-pro-image-preview
  • Features: High-quality image generation, supports multiple styles and aspect ratios
  • API Providers:
    • Juxin API (https://api.jxincm.cn) - Paid service, stable quality
    • Gemai Public API (https://api.gemai.cc) - Free service

📖 Usage Examples

Basic Text-to-Image

Prompt:

Parameter Settings:

  • API Provider: Juxin API or Gemai Public API
  • Aspect Ratio: 16:9
  • Style: anime
  • Temperature: 0.7

Final Result:

Prompt:

Parameter Settings:

  • API Provider: Juxin API or Gemai Public API
  • Aspect Ratio: 16:9
  • Style: anime
  • Temperature: 0.7

Final Result

Zoomed Image

Agent Usage Example

Adding Nano Banana2 tool in Agent:

  1. Create a new Agent
  2. Select "Nano Banana2 Text-to-Image" from the tools list
  3. Describe the desired image directly in the conversation
  4. Agent will automatically call the tool to generate images

Chatflow Usage Example

Using in Chatflow:

  1. Add a "Tool" node
  2. Select "Nano Banana2 Text-to-Image" tool
  3. Configure input parameters (prompt, style, etc.)
  4. Connect to the next node

🛠️ Development Guide

Project Structure

Core Components

  1. NanaBanana2Provider: Manages Juxin API authentication and connection validation
  2. Text2ImageTool: Implements core text-to-image logic
  3. Error Handling: Comprehensive exception handling and user prompts

🔧 Configuration Guide

API Key Configuration

  • Enter your API Key(s) in the Dify plugin configuration
  • You can configure both Juxin API Key and Gemai API Key
  • Select the corresponding API provider when using
  • Juxin API requires sufficient credits
  • Gemai Public API is free to use

Parameter Details

ParameterTypeRequiredDefaultDescription
api_providerselectYesjuxinAPI provider (juxin/gemai)
promptstringYes-Image description text (positive prompt)
negative_promptstringNo-Negative prompt (unwanted content)
num_imagesnumberNo1Number of images to generate (1-4)
temperaturenumberNo0.7Creativity parameter (0.0-1.0)
aspect_ratioselectNo-Aspect ratio (1:1, 16:9, 9:16, 4:3, 3:4)
styleselectNo-Style (realistic, anime, oil-painting, watercolor, sketch)

Prompt Writing Tips

  1. Detailed Description: Provide as detailed a scene description as possible
  2. Use Negative Prompts: Exclude unwanted elements to improve quality
  3. Specify Style: Clearly choose an artistic style
  4. Adjust Creativity: Adjust temperature parameter based on needs
    • 0.0-0.3: More stable, consistent
    • 0.4-0.7: Balanced creativity and quality (recommended)
    • 0.8-1.0: More creative, diverse

📊 Performance Optimization

  • Timeout Settings: 120-second request timeout suitable for image generation tasks
  • Error Retry: Intelligent error handling and retry suggestions
  • Memory Management: Efficient image data processing
  • Format Standardization: Unified PNG output format for compatibility
  • Response Format Compatibility: Supports multiple Gemini API response formats

🐛 Troubleshooting

Common Issues

  1. Invalid API Key

    • Check if the API Key is correct
    • Confirm the API Key hasn't expired
    • Verify account status
  2. Generation Failure

    • Check if prompts contain sensitive content
    • Simplify prompt descriptions
    • Try adjusting parameter settings
    • Check if account has sufficient credits
  3. Network Issues

    • Check network connection
    • Confirm firewall settings
    • Try again later
  4. Unsatisfactory Image Quality

    • Use more detailed prompts
    • Add negative prompts
    • Adjust style parameters
    • Increase temperature value for more creativity

📝 Changelog

v0.0.1 (2025-11-23)

  • ✨ Initial release
  • 🔧 Complete implementation based on Juxin API
  • 🎨 Support for Gemini 3 Pro Image Preview model
  • 🚫 Support for negative prompts
  • 📐 Support for multiple aspect ratios and styles
  • 🔢 Support for batch generation (1-4 images)
  • 📖 Detailed documentation and usage guide

🤝 Contributing

Issues and Pull Requests are welcome!

📄 License

MIT License

🔗 Related Links

  • Juxin API Platform
  • Gemai Public API
  • Dify Plugin Development Documentation
  • Gemini API Documentation

⚠️ Important Notes

  1. API Key Configuration: At least one API Key (Juxin or Gemai) is required
  2. API Credits: Juxin API requires a valid API Key and sufficient credits, Gemai Public API is free
  3. API Selection: You need to select the corresponding API provider when using
  4. Content Policy: Please comply with the API provider's terms of use, do not generate prohibited content
  5. Usage Limits: Be aware of API call rate limits
  6. Privacy Protection: This plugin does not store your prompts and generated images

💡 Tips

  • For first-time use, test with simple prompts first
  • Control the quantity when batch generating to save credits
  • Regularly check account balance
  • Refer to detailed error messages when encountering problems

Nano Banana2 - Making AI image generation simple and powerful! 🍌✨

CATEGORY
Tool
VERSION
0.0.2
wwwzhouhui·Updated 10 months ago
REQUIREMENTS
LLM invocation
Tool invocation
Maximum memory
1MB
Access domain

Some outbound calls build their address at runtime, so the list may be incomplete.

Detected
Detected
Security
Security Rating

Last checked 09/08/2026 08:56 AM · version 0.0.2

Give a rate
SHARE WITH