Render Mockup
Generate production-ready mockups by compositing your designs into uploaded PSD templates. Sub-second response time, multiple export formats.
/api/v1/rendersLightning Fast
Request
Headers
X-API-KEYstringRequiredYour SudoMock API key starting with sm_
Content-TypestringRequiredMust be application/json
Request Body
mockup_uuidstringRequiredUUID of the uploaded mockup template (from /psd/upload response)
smart_objectsarrayRequiredArray of smart object configurations to render
export_optionsobjectOutput format, size, and quality settings
export_labelstringOptional label for the export file naming
Smart Object Configuration
uuidstringRequiredUUID of the smart object to fill (from upload response)
assetobjectImage asset configuration
asset.urlstringURL to the image to place in the smart object
asset.fitenum= fillHow to fit the image: fill (default), contain, or cover
asset.rotateinteger= 0Rotation angle in degrees (-360 to 360)
asset.sizeobjectCustom size override: { width, height } in pixels
asset.positionobjectCustom position override: { top, left } in pixels
colorobjectColor overlay configuration
color.hexstringHex color code (e.g., '#FF5733')
color.blending_modestring= normalBlend mode: normal, multiply, screen, overlay, etc.
adjustment_layersobjectImage adjustments to apply
Adjustment Layers
brightnessinteger= 0Brightness adjustment (-150 to 150)
contrastinteger= 0Contrast adjustment (-100 to 100)
saturationinteger= 0Saturation adjustment (-100 to 100)
vibranceinteger= 0Vibrance adjustment (-100 to 100)
opacityinteger= 100Layer opacity (0 to 100)
blurinteger= 0Gaussian blur amount (0 to 100)
Export Options
image_formatenum= webpOutput format: png, jpg, or webp
image_sizeintegerOutput width in pixels (100-8000). Height scales proportionally.
qualityinteger= 95Quality for JPG/WebP output (1-100)
WebP Recommended
1{2 "mockup_uuid": "c315f78f-d2c7-4541-b240-a9372842de94",3 "smart_objects": [4 {5 "uuid": "128394ee-6758-4f2f-aa36-e2b19b152bd9",6 "asset": {7 "url": "https://your-domain.com/design.png",8 "fit": "cover"9 },10 "color": {11 "hex": "#FF5733",12 "blending_mode": "multiply"13 },14 "adjustment_layers": {15 "brightness": 10,16 "contrast": 517 }18 }19 ],20 "export_options": {21 "image_format": "webp",22 "image_size": 1920,23 "quality": 9524 }25}Code Examples
1curl -X POST "https://api.sudomock.com/api/v1/renders" \2 -H "Content-Type: application/json" \3 -H "X-API-KEY: sm_your_api_key" \4 -d '{5 "mockup_uuid": "c315f78f-d2c7-4541-b240-a9372842de94",6 "smart_objects": [{7 "uuid": "128394ee-6758-4f2f-aa36-e2b19b152bd9",8 "asset": {9 "url": "https://your-domain.com/design.png",10 "fit": "cover"11 }12 }],13 "export_options": {14 "image_format": "webp",15 "image_size": 1920,16 "quality": 9517 }18 }'Response
Success Response
1{2 "success": true,3 "data": {4 "print_files": [5 {6 "export_path": "https://cdn.sudomock.com/renders/abc123.webp",7 "smart_object_uuid": "128394ee-6758-4f2f-aa36-e2b19b152bd9"8 }9 ]10 }11}Response Fields
print_filesarrayRequiredArray of rendered output files
print_files[].export_pathstringRequiredURL to the rendered mockup image (valid for 24 hours)
print_files[].smart_object_uuidstringRequiredUUID of the smart object that was rendered
Error Responses
1{2 "success": false,3 "detail": "Invalid smart object UUID"4}1{2 "success": false,3 "detail": "Invalid or missing API key"4}1{2 "success": false,3 "detail": "Mockup not found"4}Try It Live
/api/v1/rendersRender a mockup with your design.
Get your API key from the Dashboard
Image Fit Modes
The fit parameter controls how your design is placed within the smart object bounds:
| Mode | Behavior | Use Case |
|---|---|---|
fill | Stretches to fill entire area | When aspect ratio matches |
contain | Fits inside, may leave space | When design must be fully visible |
cover | Fills area, may crop edges | Most common for product mockups |
Blend Modes
Apply color overlays with various blending modes for realistic effects:
Bulk Rendering
Parallel Requests
Need a feature that's not here? Request it or see what's planned.
1// JavaScript: Render 10 variations in parallel2const designs = [3 "https://cdn.example.com/design-1.png",4 "https://cdn.example.com/design-2.png",5 // ... more designs6];78const renderPromises = designs.map(designUrl => 9 fetch("https://api.sudomock.com/api/v1/renders", {10 method: "POST",11 headers: {12 "Content-Type": "application/json",13 "X-API-KEY": "sm_your_api_key"14 },15 body: JSON.stringify({16 mockup_uuid: "your-mockup-uuid",17 smart_objects: [{18 uuid: "smart-object-uuid",19 asset: { url: designUrl, fit: "cover" }20 }]21 })22 }).then(r => r.json())23);2425const results = await Promise.all(renderPromises);26const renderUrls = results.map(r => r.data.print_files[0].export_path);