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...
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
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.
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 url2clawhub install productai-skill