🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

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...

Versionv1.0.1
Installs1
πŸ’‘ 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.png

Use 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.png

High quality with Nano Banana Pro

scripts/generate_photo.py \ --image https://example.com/product.jpg \ --prompt "white studio background" \ --model nanobananapro \ --output hq.png

Upscale 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

  • Verify config.json exists: cat ~/.openclaw/workspace/productai/config.json
  • Check API key in ProductAI Studio β†’ API Access
  • Regenerate key if needed
  • OUT_OF_TOKENS Error

  • Check your token balance in ProductAI Studio
  • Purchase more tokens or upgrade plan
  • Remember: tokens are deducted when jobs start, not on completion
  • Rate Limit (429)

  • Maximum 15 requests per minute
  • Wait before retrying
  • Use --no-wait for batch jobs and check status later
  • Job Failed (ERROR status)

  • Check image URL is accessible and under 10MB
  • Verify image format (PNG, JPG, or WebP only)
  • Check prompt length and content
  • Try a different model
  • Multi-Image Not Working

  • Only nanobanana, nanobananapro, and seedream support multiple images
  • Maximum 2 reference images
  • Use array format: --image url1 url2
  • View on ClawHub
    TERMINAL
    clawhub install productai-skill

    πŸ§ͺ Use this skill with your agent

    Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

    πŸ” Can't find the right skill?

    Search 60,000+ AI agent skills β€” free, no login needed.

    Search Skills β†’