mockup-generator
Multi-provider mockup generation for merch products. Default free path via Printful API, optional Dynamic Mockups for custom PSD templates, SudoMock for high volume. Generates t-shirt, hoodie, sticker, and lifestyle mockups.
| Model | Source |
|---|---|
| sonnet | pack: merch |
Full Reference
ββ π§ mockup-generator βββββββββββββββββββββββββββ β [one-line description of mockup generation task] β βββββββββββββββββββββββββββββββββββββββββββββββββββ
Overview
Section titled βOverviewβShared utility for all merch lanes. Takes a design PNG and generates realistic product mockups. Routes to the best provider based on the product type and requirements. Default path is Printful (free for catalog products).
Quick Reference
Section titled βQuick Referenceβ| Item | Value |
|---|---|
| Default Provider | Printful Mockup API (free) |
| Alternative 1 | Dynamic Mockups ($0.051/render, custom PSD templates) |
| Alternative 2 | SudoMock ($0.002/render, high volume) |
| DIY Option | ImageMagick + displacement maps (self-hosted) |
| Input | PNG with transparent background, 300 DPI recommended |
| Output | JPEG or PNG mockup image |
Reference Index
Section titled βReference Indexβ| File | Contents |
|---|---|
reference/providers.md | Printful Mockup API, Dynamic Mockups API, SudoMock API, ImageMagick DIY β endpoints, request formats, batch support, pricing |
Provider Routing
Section titled βProvider Routingβ| Need | Provider | Cost | Speed |
|---|---|---|---|
| Printful catalog product | Printful Mockup API | Free | Async (2-30s) |
| Custom PSD template (lifestyle) | Dynamic Mockups API | $0.051/render | Sync (<1s) |
| High volume batch (100+) | SudoMock API | $0.002/render | Parallel |
| Self-hosted / no API dependency | ImageMagick + displacement maps | Infra only | Instant |
Default: Always try Printful first. Itβs free and covers most catalog products (t-shirts, hoodies, hats, stickers, tote bags).
1. Receive design PNG + product type + options β2. Select provider β Printful catalog product? β Printful API β Custom PSD template? β Dynamic Mockups β 100+ renders? β SudoMock β No API available? β ImageMagick DIY β3. Generate mockup(s) β Printful: POST /v2/mockup-tasks, poll for completion β Dynamic Mockups: POST /v1/renders, get result immediately β SudoMock: POST concurrent requests β4. Return mockup image(s) β URL or local file path β Multiple colorways if requestedFile Requirements
Section titled βFile RequirementsβInput:
- PNG with transparent background
- 300 DPI recommended (150 DPI minimum for apparel)
- sRGB color profile
- Design dimensions should match product print area
Output:
- JPEG (default, smaller file size) or PNG (if transparency needed)
- Resolution depends on provider (Printful: typically 1000x1000px)
- Multiple outputs for multi-color requests
Batch Support
Section titled βBatch Supportβ| Provider | Batch Method | Speed |
|---|---|---|
| Printful | Multiple variant IDs in one mockup task (all colors at once) | One request, one poll |
| Dynamic Mockups | Up to 30 images in ~4 seconds | Parallel processing |
| SudoMock | 1-25 concurrent requests (plan-dependent) | Parallel |
Integration
Section titled βIntegrationβ- Called by:
printful-pod,sticker-forge,premium-gear - Depends on: Provider API keys in
.env(Printful:PRINTFUL_TOKEN, Dynamic Mockups:DYNAMIC_MOCKUPS_API_KEY, SudoMock:SUDOMOCK_API_KEY) - Note: Only
PRINTFUL_TOKENis required. Other providers are optional upgrades.