Render Mockup API
Returns an image URL of the selected mockup template and provided design asset.
API key required for authentication.
The request must accept JSON responses.
API key required for authentication.
YOUR_API_KEY_HEREThe UUID of the mockup template.
754a46c5-7693-43a1-9cd4-aedabd273f57A label for the exported image.
MY_FIRST_IMAGE_01Image successfully rendered.
Indicates if the render API call was successful.
trueA message about the render API.
Bad request due to invalid input parameters.
Unauthorized request, invalid or missing API key.
POST /api/v1/renders HTTP/1.1
Host: app.dynamicmockups.com
x-api-key: YOUR_API_KEY_HERE
Accept: application/json
Content-Type: application/json
Content-Length: 1097
{
"mockup_uuid": "754a46c5-7693-43a1-9cd4-aedabd273f57",
"export_label": "MY_FIRST_IMAGE_01",
"export_options": {
"image_format": "jpg",
"image_size": 1500,
"mode": "view"
},
"smart_objects": [
{
"uuid": "0ff99239-c91a-47f8-86e6-61229ff93626",
"asset": {
"url": "https://app-dynamicmockups-production.s3.eu-central-1.amazonaws.com/static/api_sandbox_icon.png",
"fit": "stretch",
"size": {
"width": 100,
"height": 100
},
"position": {
"top": 100,
"left": 100
},
"rotate": 180
},
"pattern": {
"enabled": true,
"scale_percent": 60
},
"color": "#444ABF",
"blending_mode": "MULTIPLY",
"adjustment_layers": {
"brightness": 100,
"contrast": 50,
"opacity": 100,
"saturation": 0,
"vibrance": -20,
"blur": 20
},
"print_area_preset_uuid": "d542b299-7350-495e-8bed-51060318d45",
"decoration_method": {
"method": "deboss",
"options": {
"material": "metal",
"desaturation": 0.15,
"burn_darkness": 1,
"wall_width": 4,
"groove_darkness": 0.45,
"depth": 0.86,
"shadow_falloff": 4.5,
"shadow_darkness": 0.62,
"highlight_brightness": 1.12,
"center_darkening": 1
}
}
}
],
"text_layers": [
{
"uuid": "5fea4761-8e6c-458a-b957-313e95c960d0",
"text": "Sample Text",
"font_family": "Arial",
"font_size": 24,
"font_color": "#FF5733"
}
]
}{
"data": {
"export_label": "MY_FIRST_IMAGE_01",
"export_path": "https://app-dynamicmockups-psd-engine-production.s3.eu-central-1.amazonaws.com/variation-exports/example.jpg"
},
"success": true,
"message": ""
}Export OpenAPI specification for Render API
You need multiple mockup renders in a single request?
See Batch Render Mockups API. A more efficient way to generate multiple mockups in a single request way much faster than the Render Mockup API.
export_label
When defining this optional parameter in your request, the same value will be returned in the response.
This parameter is used to help recognize the request you sent with the label.
export_options.image_format
By default, we return a .png rendered image.
But sometimes, for example, you want to get a more optimized image for the web.
By providing some of the following values: jpg, png, webp you can control what image format you want from our API.
export_options.image_size
Same as image_format, you can tell our API if you need an image of a specific size.
We will return high image resolution, but sometimes you need smaller ones.
Provide export_options.image_size = 720 to get the image with 720px width.
The provided value will define image width and height will auto-scale.
export_options.mode
Our API exports images as binary by default, causing the browser to download them automatically.
To display the image in the browser instead of downloading it, set export_options.mode = "view".
smart_objects.asset.url
The provided URL image will be rendered inside a chosen smart object UUID.
The image must be one of the following extensions: jpg, jpeg, png, webp, gif
smart_objects.asset.file
In some cases, you will want to send the binary file instead of the URL.
To send the binary file, include it as part of the smart_objects.asset object, using the file property instead of url. Ensure that the file is sent using FormData.
When sending a binary file in an API request, you must use FormData instead of sending the file as part of a JSON payload. This is because binary files cannot be directly represented in JSON format.
The image must be one of the following extensions: jpg, jpeg, png, webp, gif
smart_objects.color
This optional field will paint the whole smart object with the provided color value.
You can provide two different value types:
hexadecimal value, example: #AA411B
or color names from this link

Left image without color - Right image with colorsmart_objects.asset.fit
In our web application editor, you can utilize the power of Print Area to position and size assets. Each of your uploaded assets using the Render API will inherit this setting.

You can optionally change the print area fit mode by selecting one of these: stretch, contain, cover
smart_objects.asset.position
You can optionally change the position of your asset using Render API.
Set position.top and position.left to tweak your asset position if necessary.
smart_objects.asset.size
You can optionally change the size of your asset using API.
Set size.width and size.height to tweak your asset size if necessary.
smart_objects.print_area_preset_uuid
You can optionally provide print_area_preset_uuid inside each smart object to automatically position the provided asset without explicitly setting any position, fit, rotate, or size.
Inside our web application editor, you can easily create new print area presets, which will automatically appear inside our Get Mockups API where you can get print_area_presets details for each mockup and smart object.
To create new print area presets, upload the design asset and set the print area you want. You can create any amount of print area presets.
smart_objects.asset_as_pattern
You can optionally provide asset_as_pattern: true inside each smart object to automatically make a pattern(repeated asset) over the whole smart object area.
Within our web application editor, you can easily turn on the asset pattern feature and set up the desired pattern density and area, which will be automatically inherited when calling our Render API.
Use asset_as_pattern to override the default settings from the web application editor when calling our Render API.

smart_objects.blending_mode
You can optionally apply blending_mode to the smart object.
Supported blending mode list:


smart_objects.adjustment_layers
You can optionally apply adjustment_layers to the smart object.
Supported adjustment layer list:
contrast
-100
100
0
brightness
-150
150
0
opacity
0
100
100
saturation
-100
100
0
vibrance
-100
100
0
blur
0
100
0

smart_objects.decoration_method
Each entry in smart_objects accepts an optional decoration_method object that sets the print finish applied to that artwork at render time - a flat print, screen print, DTG, UV print, laser engraving, or a debossed impression. These are the same finishes available in the Dynamic Mockups MockAnything editor, so your API renders match what you design in the app.
The object has two parts - a method and optional parameter options:
method is required whenever decoration_method is present. options is optional and only the engraving and deboss methods read it.
Available methods
universal
Flat print - artwork printed directly, no special finish (default)
-
screen_print
Plastisol screen-print finish.
-
dtg
Direct-to-garment print finish.
-
uv_print
UV print finish.
-
laser_engrave_surface
Surface laser engraving.
material, desaturation, burn_darkness
laser_engrave_deep
Deep / 3D laser engraving with carved walls.
material, wall_width, groove_darkness
deboss
Pressed-in (debossed) impression.
material, depth, shadow_falloff, shadow_darkness, highlight_brightness, center_darkening
Available options
material
metal, leather, wood
laser_engrave_surface + laser_engrave_deep + deboss
Simulated material finish.
leather
desaturation
number (0–1)
laser_engrave_surface
How much of the artwork color is removed.
0.15
burn_darkness
number
laser_engrave_surface
Darkness of the burned engraving.
1.0
wall_width
number (px)
laser_engrave_deep
Width of the engraved channel walls.
4
groove_darkness
number (0–1)
laser_engrave_deep
Shadow darkness inside the engraved grooves.
0.45
depth
number (0–1)
deboss
Depth of the pressed-in impression.
0.86
shadow_falloff
number (px)
deboss
Softness of the impression's shadow edge.
4.5
shadow_darkness
number (0–1)
deboss
Darkness of the impression's shadow.
0.62
highlight_brightness
number
deboss
Brightness of the raised highlight.
1.12
center_darkening
number (0–1)
deboss
Darkening toward the center of the impression.
1.0
[Beta] Text Layers
In some cases, your custom psd files will contain text layers and you will want to provide the text to get the output.
Our text layer feature is in [Beta] stage at the moment. Feel free to contact our support if you face any issues in implementation.
text_layers.uuid
If you upload the PSD files that contain text layers, text layers will be visible on our Get Mockups API besides smart objects.
Use this UUID field to refer to the text layer you want to put the text on.
text_layers.text
Provide text that will be applied to the text layer and output on the rendered image.
text_layers.font_family
Default font used is Roboto, if you want, provide a custom font family.
List of available fonts: Helvetica, Arial, Times New Roman, Futura, Garamond, Bebas Neue, Roboto, Lato, Montserrat, Open Sans, Raleway, Playfair Display, Avenir, Century Gothic, Georgia, Proxima Nova, Teko, Impact, Poppins, Merriweather
text_layers.font_size
Default font size from the PSD file will be applied.
Provide font_size to modify the default font size of the text layer.
text_layers.font_color
Default font color from the PSD file will be applied.
Provide font_color in the hex color code to change the color of the text.
Last updated