app icon
Nano Banana Text2Image
0.0.3

AI text-to-image generation plugin powered by OpenRouter API with multiple models support (Gemini, Claude)

wwwzhouhui/nano_banana_text2image4111 installs

ไธญๆ–‡ ๏ฝœ English

Project Source Code:

๐ŸŒ Nano Banana OpenRouter Text-to-Image Plugin

High-quality AI text-to-image Dify plugin based on OpenRouter API, supporting multiple advanced image generation models

โœจ Features

  • ๐ŸŽจ Multi-Model Support: Supports multiple image generation models including Google Gemini, OpenAI DALL-E, and Anthropic Claude
  • ๐Ÿ†“ Free Options: Provides free Gemini model options suitable for testing and light usage
  • ๐Ÿ’Ž High-Quality Output: Supports premium models for professional-grade image quality
  • ๐Ÿ”„ Image Transformation: Supports image-to-image transformation functionality
  • ๐ŸŒ 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 OpenRouter API Key

  1. Visit OpenRouter
  2. Create an account and generate an API Key
  3. Copy your API Key (format: )

2. Install Dependencies

3. Configure Environment Variables

4. Test Plugin

๐ŸŽฏ Supported Models

Free Models

  • Google Gemini 2.5 Flash: Fast with good quality, suitable for daily use

Premium Models

  • OpenAI DALL-E 3: Highest quality image generation
  • Anthropic Claude 3.5 Sonnet: Creative and artistic style images

๐Ÿ“– Usage Examples

Offline Plugin Installation

After installation, click authorize on the right and fill in your OpenRouter API key.

Agent Usage

Chatflow Usage

Prompt:

๐Ÿ› ๏ธ Development Guide

Project Structure

Core Components

  1. OpenRouterProvider: Manages 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 OpenRouter API Key in the Dify plugin configuration
  • Ensure the API Key format is correct ()
  • Confirm your account has sufficient balance (required for premium models)

Model Selection Recommendations

  • Testing Phase: Use the free Gemini model
  • Production Environment: Choose premium models based on quality requirements
  • Artistic Creation: Recommend Claude 3.5 Sonnet
  • General High-Quality: Recommend DALL-E 3

๐Ÿ“Š Performance Optimization

  • Timeout Settings: 60-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

๐Ÿ› Troubleshooting

Common Issues

  1. Invalid API Key

    • Check if the API Key format is correct
    • Confirm the API Key hasn't expired
    • Verify account status
  2. Insufficient Balance

  3. Generation Failure

    • Check if prompts contain sensitive content
    • Try switching models
    • Simplify prompt descriptions
  4. Network Issues

    • Check network connection
    • Confirm firewall settings
    • Try again later

๐Ÿ“ Changelog

v0.0.1 (2025-08-30)

  • โœจ Initial release
  • ๐Ÿ”ง Complete implementation based on OpenRouter API
  • ๐ŸŽจ Support for multiple image generation models
  • ๐Ÿงช Complete test framework
  • ๐Ÿ“– Detailed documentation and usage guide

๐Ÿค Contributing

Issues and Pull Requests are welcome!

๐Ÿ“„ License

MIT License

๐Ÿ”— Related Links


Nano Banana - Making AI image generation simple and powerful! ๐ŸŒโœจ

CATEGORY
Tool
TAGS
PRODUCTIVITY
VERSION
0.0.3
wwwzhouhuiยท09/05/2025 10:03 AM
REQUIREMENTS
LLM invocation
Tool invocation
Maximum memory
1MB