GemText AI
AI-powered jewelry product description generator — rebuilt the pipeline around batch processing, cutting Claude API spend by ~85% with no UX change.
Overview
GemText AI generates titles and descriptions for jewelry catalogs at scale using Claude. The original per-row pipeline was expensive, slow, and prone to stalling on large CSV uploads. I rebuilt the processing layer around Anthropic's Batches API, added MongoDB indexing and TTL retention, and hardened the upload flow against malformed input. The result was an ~85% reduction in API spend with no user-facing changes.
What we shipped
◆ Migrated the per-row Claude pipeline to Anthropic's Batches API, cutting API spend by ~85% without changing the user-facing product.
◆ Built a Celery submit-and-poll architecture with a separate finalize stage so large uploads run predictably under load.
◆ Added MongoDB indexes and TTL retention via a one-shot migration script, keeping query latency stable as the catalog grows.
◆ Hardened the CSV processor to skip malformed rows and let the rest of the file complete, eliminating a class of stuck uploads.
◆ Fixed the upload status UI so failed files surface clearly instead of hanging in a processing state.
◆ Wired CORS, local/prod environment URL handling, and the Docker rebuild flow for the IONOS production deploy.
Tools, standards, assumptions.
- FastAPI
- Celery
- Redis
- MongoDB
- React
- TypeScript
- Vite
- Docker
- Anthropic Claude
- ai
- fastapi
- celery
- batch-processing
- cost-optimization
What changed.
Numbers from the live store after the work was shipped — measured against pre-existing baselines, never theoretical.