
Building an image generation SaaS
Architecture for a scalable image gen product — queueing, storage, CDN, moderation.
The image gen call is one line. Everything else — queueing, storage, moderation, CDN — is the actual product.
The pipeline#
- Queue: BullMQ / Sidekiq / Cloud Tasks
- Generate: TokenRex image endpoint
- Store: S3 or R2 (cheap, CDN-friendly)
- Moderate: pre-prompt filter + post-image classifier
- Serve: signed URLs, 24h expiry
Build this with TokenRex
TokenRex is an LLM marketplace by Asirex Labs. Choose an enabled model, create a private API key and use the supported endpoint shown in Docs. Check live prices before your first request.