Generate product photos for ecommerce
by @shapes
Generate professional AI product photos using ProductAI.photo service. Use when users need to create, enhance, or transform product images for e-commerce, ma...
clawhub install productai-skillπ About This Skill
name: productai description: Generate professional AI product photos using ProductAI.photo service. Use when users need to create, enhance, or transform product images for e-commerce, marketing, catalogs, or campaigns. Supports background replacement, product placement, scene generation, adaptive templates, and video ads. Use for tasks involving product photography, lifestyle shots, mockups, or marketing visuals.
ProductAI Integration
ProductAI.photo is an AI-powered service that generates professional product photos from existing images. It enables e-commerce businesses, marketers, and designers to create studio-quality product photography without hiring photographers.
Quick Start
1. Get Your API Key
Visit ProductAI Studio β API Access β Copy your API key
2. Run Setup
cd ~/.openclaw/workspace/productai
scripts/setup.py
Paste your API key when prompted
3. Generate Images
# Generate product photo with custom background
scripts/generate_photo.py \
--image https://example.com/product.jpg \
--prompt "modern living room with natural lighting" \
--output result.pngUse multiple reference images (nanobanana/seedream support 2 images)
scripts/generate_photo.py \
--image https://example.com/product1.jpg https://example.com/product2.jpg \
--prompt "Put the first image on top of the second image" \
--output result.pngHigh quality with Nano Banana Pro
scripts/generate_photo.py \
--image https://example.com/product.jpg \
--prompt "white studio background" \
--model nanobananapro \
--output hq.pngUpscale an image (20 tokens)
scripts/upscale_image.py \
--image https://example.com/photo.jpg \
--output upscaled.png
Core Capabilities
Photo Generation (/api/generate)
Image Upscaling (/api/upscale)
Models Available
Multi-Image Support:
nanobanana, nanobananapro, and seedream support up to 2 reference images for advanced compositing.
Configuration
API Setup
Step 1: Get Your API Key
1. Visit ProductAI Studio 2. Navigate to API Access section 3. Click Generate API Key or copy existing key
Step 2: Run Setup Script
cd ~/.openclaw/workspace/productai
scripts/setup.py
This will interactively create config.json with your credentials:
{
"api_key": "your-api-key-here",
"api_endpoint": "https://api.productai.photo/v1",
"default_model": "nanobanana",
"default_resolution": "1024x1024",
"plan": "standard"
}
The config file is automatically secured with 600 permissions.
Installation
The integration scripts require Python 3.7+ with these dependencies:
pip install requests pillow
All dependencies are handled automatically by the scripts.
Usage Examples
E-commerce Product Photos
Generate clean product shots for online stores:
scripts/generate_photo.py \
--image https://example.com/raw-product.jpg \
--prompt "white studio background with soft shadows" \
--output store-listing.png
Marketing Campaign Visuals
Create lifestyle shots for advertising:
scripts/generate_photo.py \
--image https://example.com/bottle.jpg \
--prompt "outdoor picnic scene with blanket and basket, golden hour lighting" \
--output campaign-hero.png \
--model kontext-pro
Multi-Image Compositing
Combine multiple products into one scene:
scripts/generate_photo.py \
--image https://example.com/product1.jpg https://example.com/product2.jpg \
--prompt "Place the lipstick on top of the cosmetics box" \
--model nanobanana \
--output composite.png
High-Quality Output
Use Nano Banana Pro for premium results:
scripts/generate_photo.py \
--image https://example.com/product.jpg \
--prompt "luxury marble countertop setting with morning light" \
--model nanobananapro \
--output premium.png
Image Upscaling
Upscale images for print or high-res displays:
scripts/upscale_image.py \
--image https://example.com/product.jpg \
--output upscaled.png
Async Workflow (No Wait)
Start generation and check later:
# Start job (prints job ID)
scripts/generate_photo.py \
--image https://example.com/product.jpg \
--prompt "studio background" \
--no-waitOutput: Job created: 12345
Later, resume and download
scripts/generate_photo.py \
--job-id 12345 \
--output result.png
API Reference
See API.md for complete endpoint documentation, request/response formats, and authentication details.
Pricing & Token Costs
ProductAI uses a token-based pricing system:
| Operation | Token Cost | |-----------|------------| | GPT Low Quality Generation | 2 tokens | | GPT Medium Quality Generation | 3 tokens | | GPT High Quality Generation | 8 tokens | | Kontext Pro | 3 tokens | | Nano Banana Pro | 8 tokens | | Nano Banana | 3 tokens | | Seedream | 3 tokens | | Magnific Precision Upscale | 20 tokens |
Subscription Plans:
Visit ProductAI.photo for current plans and token packages.
Rate Limits:
Note: Tokens are deducted when each operation starts (not on completion).
Troubleshooting
API Key Issues
config.json exists: cat ~/.openclaw/workspace/productai/config.jsonOUT_OF_TOKENS Error
Rate Limit (429)
--no-wait for batch jobs and check status laterJob Failed (ERROR status)
Multi-Image Not Working
nanobanana, nanobananapro, and seedream support multiple images--image url1 url2Support
Advanced Topics
For detailed API specifications, authentication flows, webhook integration, and batch processing patterns, see API.md.
π‘ Examples
1. Get Your API Key
Visit ProductAI Studio β API Access β Copy your API key
2. Run Setup
cd ~/.openclaw/workspace/productai
scripts/setup.py
Paste your API key when prompted
3. Generate Images
# Generate product photo with custom background
scripts/generate_photo.py \
--image https://example.com/product.jpg \
--prompt "modern living room with natural lighting" \
--output result.pngUse multiple reference images (nanobanana/seedream support 2 images)
scripts/generate_photo.py \
--image https://example.com/product1.jpg https://example.com/product2.jpg \
--prompt "Put the first image on top of the second image" \
--output result.pngHigh quality with Nano Banana Pro
scripts/generate_photo.py \
--image https://example.com/product.jpg \
--prompt "white studio background" \
--model nanobananapro \
--output hq.pngUpscale an image (20 tokens)
scripts/upscale_image.py \
--image https://example.com/photo.jpg \
--output upscaled.png
βοΈ Configuration
API Setup
Step 1: Get Your API Key
1. Visit ProductAI Studio 2. Navigate to API Access section 3. Click Generate API Key or copy existing key
Step 2: Run Setup Script
cd ~/.openclaw/workspace/productai
scripts/setup.py
This will interactively create config.json with your credentials:
{
"api_key": "your-api-key-here",
"api_endpoint": "https://api.productai.photo/v1",
"default_model": "nanobanana",
"default_resolution": "1024x1024",
"plan": "standard"
}
The config file is automatically secured with 600 permissions.
Installation
The integration scripts require Python 3.7+ with these dependencies:
pip install requests pillow
All dependencies are handled automatically by the scripts.
π Tips & Best Practices
API Key Issues
config.json exists: cat ~/.openclaw/workspace/productai/config.jsonOUT_OF_TOKENS Error
Rate Limit (429)
--no-wait for batch jobs and check status laterJob Failed (ERROR status)
Multi-Image Not Working
nanobanana, nanobananapro, and seedream support multiple images--image url1 url2