Pixora turns any e-commerce product URL into a full creative package — images, videos, strategy, and quality reviews — in under 5 minutes.
Quick Start · Architecture · API Docs · Deployment · Contributing
Given a product URL, Pixora's 7-agent pipeline automatically produces:
| Output | Details |
|---|---|
| 🖼️ 5 Marketing Images | AI-generated via Stable Diffusion XL |
| 🎬 2 Short Videos | 8–15 second clips via CogVideoX |
| 💡 Creative Strategy | Hooks, audience targeting, visual themes |
| ✅ Quality Review | Hallucination detection + brand alignment scores |
┌──────────────────────────────────────────────────────────┐
│ Frontend Layer │
│ Streamlit UI · React SPA │
└──────────────────────────┬───────────────────────────────┘
│ HTTP / REST
┌──────────────────────────▼───────────────────────────────┐
│ FastAPI Backend │
│ /generate · /bulk-generate · /job/{id} │
└────────────┬─────────────┬───────────────┬───────────────┘
│ │ │
┌──────▼───┐ ┌─────▼────┐ ┌─────▼────┐
│ Celery │ │ Redis │ │ Storage │
│ Queue │ │ Store │ │ S3/Local │
└──────┬───┘ └──────────┘ └──────────┘
│
┌────────────▼─────────────────────────────────────────────┐
│ LangGraph Orchestration │
└──────┬──────────┬──────────┬──────────┬──────────┬───────┘
│ │ │ │ │
┌────▼───┐ ┌───▼────┐ ┌───▼────┐ ┌───▼────┐ ┌───▼────┐
│ 1 │ │ 2 │ │ 3 │ │ 4 │ │ 5 │
│Product │ │Creative│ │Prompt │ │ Image │ │ Video │
│Research│ │Strategy│ │ Gen │ │ Gen │ │ Gen │
└────────┘ └────────┘ └────────┘ └────────┘ └────────┘
│
┌────────▼────────┐
│ 6 Critic │
│ Agent │
└────────┬────────┘
│
┌────────▼────────┐
│ 7 Assemble │
│ Output │
└─────────────────┘
- Python 3.8+
- Redis (for bulk processing)
- CUDA GPU (optional, for local image generation)
git clone https://github.com/yourusername/pixora.git
cd pixora
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txtcp .env.example .envOpen .env and fill in your keys:
# Required
GROQ_API_KEY=your_groq_key # Free at console.groq.com
# Optional
REPLICATE_API_TOKEN=your_token # For video generation
TOGETHER_AI_API_KEY=your_key # For cloud image generation
# Infrastructure
REDIS_HOST=localhost
REDIS_PORT=6379Getting API keys:
- Groq (free, required): console.groq.com — includes Llama 3.3 70B
- Replicate (optional, for video): replicate.com
- Together AI (optional, for images without GPU): together.ai
python -m api.main
# → Uvicorn running on http://0.0.0.0:8000
# → ✓ Groq API: Configuredstreamlit run frontend/app.py
# → Open http://localhost:8501curl -X POST http://localhost:8000/api/v1/generate \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/product",
"brand_override": "YourBrand"
}'Scrapes and structures product data from any e-commerce URL.
- Tech: Playwright + BeautifulSoup4
- Time: 5–10 seconds
{
"title": "Premium Wireless Headphones",
"price": 199.99,
"features": ["Active Noise Cancellation", "40hr Battery"],
"specs": {"Driver": "40mm", "Freq": "20Hz–20kHz"},
"rating": 4.8
}Analyzes product data and generates a full creative brief using LLM reasoning.
- Tech: Groq API (Llama 3.3 70B)
- Time: 3–5 seconds
{
"hooks": ["Hear. Feel. Experience.", "Premium Audio Redefined"],
"target_audience": "Tech-savvy professionals, 25–45",
"visual_themes": ["Modern minimalist", "Lifestyle luxury"],
"color_palette": ["#1a1a1a", "#00d4ff", "#ffffff"]
}Translates the creative brief into optimized prompts for image and video models.
- Tech: Groq API (prompt engineering)
- Time: 2–3 seconds
- Output: 5 image prompts + 2 video scripts
Generates five high-quality product images in parallel.
- Tech: Stable Diffusion XL (local) or Together AI (cloud)
- Time: 60–120 seconds
{
"id": "img_12ab",
"url": "/outputs/images/product_12ab.png",
"quality_score": 0.87
}Produces two short product videos (8–15 seconds each).
- Tech: CogVideoX via Replicate or RunPod
- Time: 30–60 seconds
{
"id": "vid_abc1",
"url": "/outputs/videos/product_abc1.mp4",
"duration": 8.5,
"quality_score": 0.82
}Evaluates all generated content before delivery.
- Tech: Groq API
- Time: 3–5 seconds
Checks performed:
| Check | Description |
|---|---|
| 🔍 Hallucination Detection | Are all claims factually grounded in product data? |
| 🎯 Strategy Consistency | Does the creative match the brief? |
| 🏷️ Brand Alignment | Does it reflect the correct brand voice? |
| ⭐ Overall Quality | Composite score across all dimensions |
{
"hallucination_score": 0.92,
"consistency_score": 0.88,
"branding_score": 0.91,
"overall_quality": 0.90,
"approved": true,
"suggestions": ["Add more lifestyle context in image 3"]
}Handles CSV-based batch jobs with async tracking.
- Tech: Celery + Redis (or AsyncIO)
- Input: CSV with
url,brand_override,custom_themescolumns
# Example CSV
url,brand_override,custom_themes
https://product1.com,Brand1,modern;minimalist
https://product2.com,Brand2,luxury;elegant# Job status response
{
"job_id": "batch_xyz123",
"status": "processing",
"total_urls": 50,
"processed": 23,
"progress": 46
}{
"url": "https://example.com/product",
"brand_override": "Your Brand",
"target_audience": "Tech enthusiasts",
"custom_themes": ["modern", "minimalist"]
}Response:
{
"product_data": { "..." },
"creative_brief": { "..." },
"images": [ { "id": "...", "url": "...", "quality_score": 0.87 } ],
"videos": [ { "id": "...", "url": "...", "duration": 8.5 } ],
"critic_review": { "overall_quality": 0.90, "approved": true },
"total_processing_time": 145.2,
"status": "success"
}curl -X POST http://localhost:8000/api/v1/bulk-generate \
-F "file=@products.csv"Response:
{
"job_id": "batch_abc123",
"status": "queued",
"total_urls": 50
}{
"job_id": "batch_abc123",
"status": "processing",
"progress": 72,
"processed_urls": 36,
"total_urls": 50
}| Layer | Technology |
|---|---|
| Frontend | Streamlit + React |
| Backend API | FastAPI + Uvicorn |
| Agent Orchestration | LangGraph |
| LLM | Groq API — Llama 3.3 70B |
| Image Generation | Stable Diffusion XL / Together AI |
| Video Generation | CogVideoX via Replicate |
| Web Scraping | Playwright + BeautifulSoup4 |
| Task Queue | Celery + Redis |
| Storage | Local filesystem / AWS S3 |
pixora/
├── agents/
│ ├── research_agent.py # Web scraping & product data
│ ├── strategy_agent.py # Creative brief generation
│ ├── prompt_generation_agent.py # Prompt engineering
│ └── critic_agent.py # Quality review & scoring
├── generation/
│ ├── image_generator.py # SDXL image pipeline
│ └── video_generator.py # CogVideoX video pipeline
├── orchestration/
│ └── workflow.py # LangGraph state machine
├── api/
│ ├── main.py # FastAPI app & routes
│ └── models.py # Pydantic request/response schemas
├── frontend/
│ └── app.py # Streamlit UI
├── outputs/
│ ├── images/ # Generated image files
│ └── videos/ # Generated video files
├── config.py # App configuration & thresholds
├── requirements.txt
├── .env.example
└── README.md
Quality thresholds can be tuned in config.py:
HALLUCINATION_THRESHOLD = 0.70 # Minimum factual accuracy score
CONSISTENCY_THRESHOLD = 0.75 # Minimum strategy alignment score
BRANDING_THRESHOLD = 0.80 # Minimum brand voice scoreIncreasing these thresholds improves output quality but may require regeneration passes.
| Stage | Typical Duration |
|---|---|
| Product Research | 5–10s |
| Creative Strategy | 3–5s |
| Prompt Generation | 2–3s |
| Image Generation (×5) | 60–120s |
| Video Generation (×2) | 30–60s |
| Critic Review | 3–5s |
| Total | ~2–5 minutes |
docker build -t pixora:latest .
docker run -p 8000:8000 \
-e GROQ_API_KEY=your_key \
-e REPLICATE_API_TOKEN=your_token \
pixora:latestDeploy the FastAPI backend to Railway and the Streamlit frontend to Streamlit Cloud. Set environment variables in each platform's dashboard.
sudo apt update && sudo apt install python3-pip -y
pip install -r requirements.txt
python -m api.main- API keys are stored in environment variables, never logged
- Rate limiting applied to all public endpoints
- Input validation on URLs and uploaded CSV files
- File upload size limits enforced
- CORS configured for frontend origin only
Groq API key not configured
echo "GROQ_API_KEY=your_key" >> .envCannot connect to localhost:8000
# Backend isn't running — start it first
python -m api.mainImages not generating
SDXL requires a CUDA GPU for local generation.
Without a GPU, set TOGETHER_AI_API_KEY in your .env to use cloud inference.
Slow performance
- Use a GPU for image generation (60–120s → ~20s)
- Groq is already the fastest available LLM API; no changes needed there
- For bulk jobs, scale Celery workers:
celery -A tasks worker --concurrency=4
- Vector search for similar product lookups
- A/B testing framework for creative variants
- Advanced video editing (transitions, background music)
- Multi-language creative generation
- Direct publishing to Facebook / Instagram Ads
- Analytics dashboard with CTR tracking
- Custom model fine-tuning on brand assets
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Commit your changes:
git commit -m 'Add your feature' - Push and open a Pull Request
Please open an issue first for major changes so we can discuss the approach.
MIT License — see LICENSE for details.