/mockupGenerate Mockup
Generate a product mockup image with custom artwork and options.
Endpoint
Required Parameters
productIdstringThe unique identifier for the product.
mockupIdstringThe mockup template ID to use for rendering.
designstringBase64-encoded JSON array of design elements (artwork, colors).
sigstringRequest signature for authentication.
Optional Parameters
variantIdstringThe variant ID for color/size specific mockups.
widthnumberOutput image width in pixels. Allowed values: 400, 600, 800, 1000 (default), 1200, 1400, 1600, 1800, 2000, 2500, 3000, 4000.
grainnumberAdd film grain effect. Values: 0 (none), 1 (subtle), 2 (strong).
arstringNewAspect ratio for the output image. Crops the mockup to fit the specified ratio.
Values:
16:9- Landscape (default, no cropping)2:3- Portrait (crops sides to fit)
accountIdstringYour Merchify account ID.
Example Request
GET /mockup?productId=BEEB77&mockupId=abc123&variantId=var1&design=W3siaW1hZ2VVcmwiOiJodHRwczovL...&width=1000&ar=2:3&sig=your_signature
Using JavaScript? The SDK documentation provides a simpler way to generate signed mockup URLs with the mockupUrl() helper.
Aspect Ratio Comparison
The ar parameter controls how the mockup is cropped:
ar=16:9Default landscape
ar=2:3Portrait (social/mobile)
Response
Returns a PNG or WebP image binary with the rendered mockup.