High-quality integration for https://supermaker.ai/image/nano-banana/
Project description
nano-banana-1
A streamlined Python library for interacting with and showcasing the capabilities of the nano-banana-1 service. Designed for easy integration with the Supermaker.ai nano-banana-1 image generation platform.
Installation
Install the nano-banana-1 package using pip:
bash
pip install nano-banana-1
Basic Usage
Here are a few examples demonstrating how to use the nano-banana-1 library. These examples assume you have obtained the necessary API key or credentials as described on the Supermaker.ai website.
1. Generating a Basic Image:
This example demonstrates the simplest image generation request. python from nano_banana_1 import NanoBanana
Replace with your actual API key
api_key = "YOUR_API_KEY" banana = NanoBanana(api_key)
try: image_url = banana.generate_image(prompt="A delicious nano-banana") print(f"Image URL: {image_url}") # Further processing: save the image, display it, etc. except Exception as e: print(f"Error generating image: {e}")
2. Generating an Image with Advanced Parameters:
This example shows how to use more specific parameters to influence the image generation. python from nano_banana_1 import NanoBanana
Replace with your actual API key
api_key = "YOUR_API_KEY" banana = NanoBanana(api_key)
try: image_url = banana.generate_image( prompt="A futuristic nano-banana robot", style="cyberpunk", quality="high", resolution="1024x1024" ) print(f"Image URL: {image_url}") except Exception as e: print(f"Error generating image: {e}")
3. Working with Image Variations:
This example demonstrates how to generate variations of an existing image. python from nano_banana_1 import NanoBanana
Replace with your actual API key
api_key = "YOUR_API_KEY" banana = NanoBanana(api_key)
Replace with the URL of the image you want to create variations from
base_image_url = "URL_OF_YOUR_BASE_IMAGE"
try: variation_urls = banana.generate_image_variations(base_image_url, num_variations=3) print("Image Variation URLs:") for url in variation_urls: print(url) except Exception as e: print(f"Error generating image variations: {e}")
4. Checking API Usage:
This example retrieves your current API usage statistics. python from nano_banana_1 import NanoBanana
Replace with your actual API key
api_key = "YOUR_API_KEY" banana = NanoBanana(api_key)
try: usage_data = banana.get_usage_stats() print(f"API Usage: {usage_data}") # Process and display the usage data as needed except Exception as e: print(f"Error retrieving usage stats: {e}")
Feature List
- Image Generation: Generate images based on text prompts.
- Style Control: Specify the desired style for image generation (e.g., realistic, artistic, cartoon).
- Quality and Resolution Control: Adjust the quality and resolution of the generated images.
- Image Variations: Create variations of existing images.
- API Usage Tracking: Monitor your API usage and remaining credits.
- Error Handling: Robust error handling to manage potential issues during API calls.
- Simplified Interface: Provides an easy-to-use Python interface for interacting with the nano-banana-1 service.
- Asynchronous Support: (Future enhancement) Potential for asynchronous operation for improved performance in concurrent applications.
License
MIT License
Copyright (c) 2023
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This project is a gateway to the nano-banana-1 ecosystem. For advanced features and full capabilities, please visit: https://supermaker.ai/image/nano-banana/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nano_banana_1-1766993.9.7.tar.gz.
File metadata
- Download URL: nano_banana_1-1766993.9.7.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
400e5742ddc1522245147b31aa821ccf321816c20bafc787bbd7512526695e6d
|
|
| MD5 |
5d80d2f3f04bd8b9f162c6304301adf2
|
|
| BLAKE2b-256 |
40fc72e584bf721dc2d04d6121348a129cba4c149ce501fbde64e20a53ce70be
|
File details
Details for the file nano_banana_1-1766993.9.7-py3-none-any.whl.
File metadata
- Download URL: nano_banana_1-1766993.9.7-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1045237276829e3b489b28d394bed951b3af3fa3d5eb761b7cc501bcebcab29b
|
|
| MD5 |
1aef73dcb5b3889e702a1a19a0606c71
|
|
| BLAKE2b-256 |
0777f84a4736dc58883b317966a5efb405ebd4a037a2d66d503cd2b1c093a155
|