SudoMock
POST

Render Mockup

Generate production-ready mockups by compositing your designs into uploaded PSD templates. CDN-hosted output, multiple export formats.

POST/api/v1/renders
<1s avg

Production Ready

Built for high-volume automation with 2B+ renders processed. CDN-hosted output URLs.

Request

Headers

X-API-KEYstringRequired

Your SudoMock API key starting with sm_

Content-TypestringRequired

Must be application/json

Request Body

mockup_uuidstringRequired

UUID of the uploaded mockup template (from /psd/upload response)

smart_objectsarrayRequired

Array of smart object configurations to render

export_optionsobject

Output format, size, and quality settings

export_labelstring

Optional label for the export file naming

Smart Object Configuration

uuidstringRequired

UUID of the smart object to fill (from upload response)

assetobject

Image asset configuration

asset.urlstring

URL to the image to place in the smart object

asset.fitenum= fill

How to fit the image: fill (default), contain, or cover

asset.rotateinteger= 0

Rotation angle in degrees (-360 to 360)

asset.sizeobject

Custom size override: { width, height } in pixels

asset.positionobject

Custom position override: { top, left } in pixels

colorobject

Color overlay configuration

color.hexstring

Hex color code (e.g., '#FF5733')

color.blending_modestring= normal

Blend mode: normal, multiply, screen, overlay, etc.

adjustment_layersobject

Image adjustments to apply

Adjustment Layers

brightnessinteger= 0

Brightness adjustment (-150 to 150)

contrastinteger= 0

Contrast adjustment (-100 to 100)

saturationinteger= 0

Saturation adjustment (-100 to 100)

vibranceinteger= 0

Vibrance adjustment (-100 to 100)

opacityinteger= 100

Layer opacity (0 to 100)

blurinteger= 0

Gaussian blur amount (0 to 100)

Export Options

image_formatenum= webp

Output format: png, jpg, or webp

image_sizeinteger

Output width in pixels (100-8000). Height scales proportionally.

qualityinteger= 95

Quality for JPG/WebP output (1-100)

WebP Recommended

WebP format is ~30% smaller than PNG with similar quality. Perfect for web and e-commerce.
Full Request Example
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": 5
17 }
18 }
19 ],
20 "export_options": {
21 "image_format": "webp",
22 "image_size": 1920,
23 "quality": 95
24 }
25}

Code Examples

Render Mockup
bash
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": 95
17 }
18 }'

Response

Success Response

200OK
Response 200 OK
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_filesarrayRequired

Array of rendered output files

print_files[].export_pathstringRequired

URL to the rendered mockup image (valid for 24 hours)

print_files[].smart_object_uuidstringRequired

UUID of the smart object that was rendered

Error Responses

400Bad Request
json
1{
2 "success": false,
3 "detail": "Invalid smart object UUID"
4}
401Unauthorized
json
1{
2 "success": false,
3 "detail": "Invalid or missing API key"
4}
404Not Found
json
1{
2 "success": false,
3 "detail": "Mockup not found"
4}

Try It Live

POST/api/v1/renders

Render 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:

ModeBehaviorUse Case
fillStretches to fill entire areaWhen aspect ratio matches
containFits inside, may leave spaceWhen design must be fully visible
coverFills area, may crop edgesMost common for product mockups

Working with Smart Object Bounds

When rendering, it helps to understand how the smart object metadata from the upload response relates to your design:

Typical Integration Workflow

1
Get smart object metadata from upload
The size field tells you the design canvas dimensions (e.g., 3000x3413)
2
Prepare your design at the size dimensions
For best quality, create designs at the size.width x size.height resolution
3
Render with the smart object UUID
The API handles scaling to the position bounds automatically

Design Resolution Tip

Always design at the size dimensions from the upload response. The design will be automatically scaled to fit the position bounds on the mockup canvas. This ensures maximum quality.

Custom Position Overrides

You can override the default positioning using asset.size and asset.position:

Custom Position Override
1{
2 "smart_objects": [{
3 "uuid": "smart-object-uuid",
4 "asset": {
5 "url": "https://example.com/design.png",
6 "fit": "cover",
7 "size": { "width": 2000, "height": 2000 },
8 "position": { "top": 100, "left": 50 }
9 }
10 }]
11}

Use position overrides when you need precise control over design placement, such as centering a logo or offsetting a pattern.

Blend Modes

Apply color overlays with various blending modes for realistic effects:

normal
multiply
screen
overlay
darken
lighten
color-dodge
color-burn
hard-light
soft-light
difference
exclusion

Bulk Rendering

Parallel Renders

For bulk rendering, send parallel requests up to your plan's parallel render limit. Each request is independent-no need to wait for previous renders to complete.

Need a feature that's not here? Request it or see what's planned.

Bulk Rendering Example
1// JavaScript: Render 10 variations in parallel
2const designs = [
3 "https://cdn.example.com/design-1.png",
4 "https://cdn.example.com/design-2.png",
5 // ... more designs
6];
7
8const 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);
24
25const results = await Promise.all(renderPromises);
26const renderUrls = results.map(r => r.data.print_files[0].export_path);