1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
const axios = require('axios');
const fs = require('fs');
const path = require('path');
async function toB64(imgPath) {
const data = fs.readFileSync(path.resolve(imgPath));
return Buffer.from(data).toString('base64');
}
const api_key = "YOUR API-KEY";
const url = "https://api.segmind.com/v1/qwen-image-edit-plus-eigen-banana";
const data = {
"prompt": "Replace the current plain wall background with a sophisticated, softly lit indoor event space, featuring warm golden ambient lighting, elegant architectural details such as decorative panels or subtle artwork, and a slightly blurred depth of field to keep the focus on the subjects while ensuring the new background's rich, muted tones complement their attire.",
"image_1": "toB64('https://segmind-resources.s3.amazonaws.com/input/efcc5a54-c995-454d-9474-41a8515380c3-example4-input.png')",
"image_2": "toB64('')",
"image_3": "toB64('')",
"lora": "eigen_banana",
"aspect_ratio": "match_input_image",
"seed": 87568756,
"image_format": "webp",
"quality": 95,
"base64": false
};
(async function() {
try {
const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } });
console.log(response.data);
} catch (error) {
console.error('Error:', error.response.data);
}
})();Text prompt describing the desired image edit or generation
Primary input image (URL or base64)
Secondary input image (URL or base64)
Tertiary input image (URL or base64)
Pre-configured LoRA model to apply
Allowed values:
Additional LoRA model URL. Public direct url or huggingface url pointing to the lora file
Additional LoRA model URL. Public direct url or huggingface url pointing to the lora file
Output image aspect ratio
Allowed values:
Random seed for reproducibility. Use -1 for random
min : -1,
max : 2147483647
Output image format
Allowed values:
Output image quality (1-100)
min : 1,
max : 100
Return image as base64 encoded string
To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.
Edited by Segmind Team on November 23, 2025.
Eigen-Banana-Qwen-Image-Edit is a fine-tuned LoRA extension of the Qwen-Image-Edit model, designed for text-guided image editing. It performs detailed transformations of existing images based on natural language instructions, including altering objects, transferring styles, changing scene elements, and adjusting facial expressions. It is trained on Apple’s extensive Pico-Banana-400K dataset, which includes around 400,000 text-image-edit pairs spanning 35 different editing operations. Eigen-Banana-Qwen-Image-Edit provides fast and high-quality results while supporting prompts in both English and Chinese, making it a versatile tool for creators and developers worldwide, particularly for multilingual image editing solutions.
E-commerce Product Photography: It expedites the customization of product backgrounds, adjusts lighting, or adds contextual elements without reshoots.
Content Creation: It is effective in transforming social media images, creating variation sets for A/B testing, and maintaining brand consistency across visual assets.
Creative Studios: It supports rapid prototyping for concept art, style exploration, and client presentations with iterative refinements.
Localization Teams: Users can utilize it to generate culturally adapted visuals with multilingual prompt support (English and Chinese) for international campaigns.
Game Development: It is a perfect tool to create character expression variations, environment modifications, and asset iterations efficiently.
Layer complexity gradually while using multiple images; start with image_1 as your primary source, then use image_2 and image_3 for blending or compositional elements.
Aspect ratio will render desired formats, such as using "match_input_image" will preserve original dimensions. Select specific ratios (16:9, 4:5) for social media platforms that need fixed formats.
Is Eigen-Banana-Qwen-Image-Edit open-source?
The model is based on the open Qwen-Image-Edit architecture with proprietary LoRA fine-tuning. Additionally, the base Qwen model follows Tongyi Qianwen's licensing terms.
How does this differ from other image editing models?
Unlike generative inpainting models, Eigen-Banana specializes in instruction-following edits trained on over 400,000 diverse editing operations. Its LoRA architecture provides faster inference than full model fine-tuning while maintaining edit precision.
What aspect ratio should I use for Instagram posts?
Use 4:5 for feed posts (portrait), 1:1 for square grid consistency, or 9:16 for Stories and Reels. Set "match_input_image" to preserve original photo dimensions.
Can I combine multiple LoRA models?
Yes, you can seamlessly use lora_2_url and lora_3_url parameters to layer up to three LoRA styles. This option supports complex aesthetic combinations, such as "vintage film + anime style" transformations.
Why are my edits inconsistent across generations?
To achieve consistent output across multiple generations, set a fixed seed value instead of using the default random seed, because reproducibility requires identical prompts, images, and seed values across API calls.
Does prompt language affect edit quality?
Since prompts in English and Chinese work equally well due to bilingual training, opt for the language that enables you to provide precise editing instructions.