Mockup Generator API: How to Automate Product Image Creation
Marijus
mockupify.io founder
Mockup Generator API: How to Automate Product Image Creation
If you're building a print-on-demand platform, SaaS tool, or managing hundreds of products, manually generating mockups one-by-one is a non-starter.
You need an API.
Mockup generator APIs let you programmatically create product images at scale—upload designs via code, generate mockups in bulk, and integrate directly into your app or ecommerce workflow.
Here's everything you need to know about mockup APIs, which ones exist, and how to implement them.
What Is a Mockup Generator API?
A mockup generator API is a programmatic interface that lets you:
- Upload design files (PNG, JPG, PDF)
- Specify product templates (t-shirt, hoodie, mug, phone case)
- Customize placement, colors, and angles
- Generate and download high-res mockup images
Instead of clicking through a web UI, you send HTTP requests from your code and get mockup URLs back.
Use cases:
- POD platforms letting customers upload designs and see instant previews
- SaaS tools auto-generating mockups for client stores
- Marketing agencies creating product images for 100+ SKUs
- Developers building custom POD workflows
Why Use an API vs Manual Mockup Tools?
| Manual Tools (Placeit, Canva) | Mockup API |
|-------------------------------|------------|
| Click UI to upload each design | Send 1 HTTP request per design |
| Generate 1 mockup at a time | Batch-generate 100+ mockups |
| Download and manually upload to store | Auto-push images to Shopify/WooCommerce |
| Takes 5-10 min per product | Takes 5-10 seconds per product |
| Great for <10 products | Great for 100+ products |
Bottom line: If you're creating <20 mockups/month, use a manual tool. If you're creating 100+, use an API.
Top Mockup Generator APIs
1. Printful Mockup Generator API
Price: Free (with Printful account)
Printful's API lets you generate mockups for any product in their catalog. It's free but limited to Printful products.
How it works:
bash
POST https://api.printful.com/mockup-generator/create-task/{product_id}
{
"variant_ids": [1234, 5678],
"format": "png",
"files": [
{
"placement": "front",
"image_url": "https://yoursite.com/design.png"
}
]
}
Pros:
- Free
- Integrated with Printful fulfillment
- Well-documented
Cons:
- Only works for Printful products
- Mockups look generic (same quality as Printful UI)
2. Printify Mockup API
Price: Free (with Printify account)
Similar to Printful—generate mockups for Printify products via API.
How it works:
bash
GET https://api.printify.com/v1/uploads/{upload_id}/images.json
Pros:
- Free
- Larger product catalog than Printful
Cons:
- Limited to Printify products
- Mockup quality is mediocre
3. Dynamic Mockups API
Price: $25/mo (same as regular subscription)
Dynamic Mockups offers an API for their ultra-realistic mockup templates.
How it works:
Upload a design, specify a template ID, get a mockup URL back.
Pros:
- High-quality mockups (best in class)
- 1,000+ templates
- Good documentation
Cons:
- Requires paid subscription
- Not as scalable as Printful/Printify for POD
4. Mediamodifier API
Price: Custom pricing (contact sales)
Mediamodifier has a massive mockup library and offers API access.
Pros:
- 50,000+ mockup templates
- Supports video mockups
- Enterprise-ready
Cons:
- Expensive (not for small sellers)
- Must contact sales for pricing
5. Mockuuups Studio API
Price: Starting at $29/mo
Mockuuups Studio (the indie tool, not to be confused with Smartmockups) offers API access to their template library.
Pros:
- Affordable
- Clean, minimal mockups
Cons:
- Smaller template library
- Less known/supported
How to Build a Mockup Generator Using an API
Here's a simple Python example using Printful's API:
```python
import requests
import time
def generatemockup(designurl, productid, variantids):
# Step 1: Create mockup generation task
url = f"https://api.printful.com/mockup-generator/create-task/{productid}"
headers = {"Authorization": "Bearer YOURAPI_KEY"}
payload = {
"variant_ids": variant_ids,
"format": "png",
"files": [
{
"placement": "front",
"image_url": design_url
}
]
}
response = requests.post(url, json=payload, headers=headers)
task_key = response.json()["result"]["task_key"]
# Step 2: Poll for completion
while True:
check_url = f"https://api.printful.com/mockup-generator/task?task_key={task_key}"
status = requests.get(check_url, headers=headers).json()
if status["result"]["status"] == "completed":
mockup_url = status["result"]["mockups"][0]["mockup_url"]
return mockup_url
time.sleep(2)
Generate mockup
mockup = generatemockup(
designurl="https://example.com/design.png",
productid=71, # Bella Canvas 3001 t-shirt
variantids=[4012, 4013] # S, M sizes
)
print(f"Mockup generated: {mockup}")
```
Use Case: Auto-Generate Mockups for Shopify
Here's how to fully automate mockup creation + upload to Shopify:
- Upload design to your server
- Call mockup API (Printful, Printify, or Dynamic Mockups)
- Download generated mockup from returned URL
- Upload to Shopify via Shopify Admin API
- Assign mockup to product in Shopify
This entire workflow can run in <30 seconds per product.
Try Mockupify → (This is exactly what Mockupify does—but without you writing code.)
Mockup API Rate Limits
Be aware of API rate limits:
| API | Rate Limit |
|-----|-----------|
| Printful | 120 requests/min |
| Printify | 60 requests/min |
| Dynamic Mockups | 100 requests/min |
If you're batch-generating 1000+ mockups, implement rate limiting and retry logic.
When to Use an API vs Mockupify
Use a mockup API if:
- You're building a custom POD platform or SaaS tool
- You need programmatic control over mockup generation
- You have a development team
Use Mockupify if:
- You're a Shopify POD seller who wants bulk automation
- You don't want to write code
- You need Shopify integration out-of-the-box
Try Mockupify free for 7 days →
Final Thoughts
Mockup generator APIs unlock true scalability for POD businesses. If you're creating 100+ product images per month, the time saved by automation justifies the setup effort.
Start with Printful or Printify's free API if you're already using them for fulfillment. Upgrade to Dynamic Mockups API if you need premium quality.
Or skip the code entirely and use Mockupify for no-code bulk mockup automation.