# Batch Render Mockups API

## Render Multiple Mockups

> Returns an array of image URLs for multiple mockup templates with provided design assets in a single batch request. Export options specified at the root level apply to all renders.

```json
{"openapi":"3.1.0","info":{"title":"Dynamic Mockups Batch Render API","version":"1.0"},"servers":[{"url":"https://app.dynamicmockups.com/api/v1"}],"security":[{"apiKeyAuth":[]}],"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key required for authentication."}}},"paths":{"/renders/batch":{"post":{"summary":"Render Multiple Mockups","description":"Returns an array of image URLs for multiple mockup templates with provided design assets in a single batch request. Export options specified at the root level apply to all renders.","operationId":"createBatchRender","parameters":[{"in":"header","name":"Accept","required":true,"schema":{"type":"string","enum":["application/json"]},"description":"The request must accept JSON responses."},{"in":"header","name":"x-api-key","required":true,"schema":{"type":"string","description":"API key required for authentication."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"export_options":{"type":"object","description":"Export options applied to all renders in the batch.","properties":{"image_format":{"type":"string","description":"The format of the exported image.","enum":["jpg","png","webp"]},"image_size":{"type":"integer","description":"The size in pixels of the exported image."},"mode":{"type":"string","description":"Determines whether the exported image should be viewed in the browser or downloaded.","enum":["view","download"]}}},"renders":{"type":"array","description":"Array of render requests to process in the batch.","items":{"type":"object","properties":{"export_label":{"type":"string","description":"A label for the exported image."},"mockup_uuid":{"type":"string","description":"The UUID of the mockup template."},"smart_objects":{"type":"array","description":"List of smart objects inside the chosen mockup.","items":{"type":"object","properties":{"uuid":{"type":"string","description":"The UUID of the smart object."},"asset":{"type":"object","properties":{"url":{"type":"string","description":"URL to the asset image."},"fit":{"type":"string","description":"How the asset fits within the designated area.","enum":["stretch","contain","cover"]},"size":{"type":"object","properties":{"width":{"type":"integer","description":"The width of the asset in pixels."},"height":{"type":"integer","description":"The height of the asset in pixels."}}},"position":{"type":"object","properties":{"top":{"type":"integer","description":"The top position of the asset."},"left":{"type":"integer","description":"The left position of the asset."}}},"rotate":{"type":"number","description":"The rotation angle of the provided asset."}}},"pattern":{"type":"object","description":"Configuration for using the asset as a repeating pattern.","properties":{"enabled":{"type":"boolean","description":"Whether the asset is used as a repeating pattern."},"scale_percent":{"type":"number","description":"Scale of the pattern relative to the original asset size."}}},"color":{"type":"string","description":"Color overlay for the smart object in hex code."},"blending_mode":{"type":"string","description":"Blending mode applied to the smart object.","enum":["NORMAL","DISSOLVE","DARKEN","MULTIPLY","COLOR_BURN","LINEAR_BURN","DARKER_COLOR","LIGHTEN","SCREEN","COLOR_DODGE","LINEAR_DODGE","LIGHTER_COLOR","OVERLAY","SOFT_LIGHT","HARD_LIGHT","VIVID_LIGHT","LINEAR_LIGHT","PIN_LIGHT","HARD_MIX","DIFFERENCE","EXCLUSION","SUBTRACT","DIVIDE","HUE","SATURATION","COLOR","LUMINOSITY"]},"adjustment_layers":{"type":"object","description":"Optional adjustment layers applied to the smart object.","properties":{"brightness":{"type":"integer","description":"Brightness adjustment (from -150 to 150)."},"contrast":{"type":"integer","description":"Contrast adjustment (from -100 to 100)."},"opacity":{"type":"integer","description":"Opacity adjustment (from 0 to 100)."},"saturation":{"type":"integer","description":"Saturation adjustment (from -100 to 100)."},"vibrance":{"type":"integer","description":"Vibrance adjustment (from -100 to 100)."},"blur":{"type":"integer","description":"Blur adjustment (from 0 to 100)."}}},"print_area_preset_uuid":{"type":"string","description":"UUID of the print area preset to automatically position provided design asset."}}}},"text_layers":{"type":"array","description":"List of text layers for the chosen mockup.","items":{"type":"object","properties":{"uuid":{"type":"string","description":"The UUID of the text layer."},"text":{"type":"string","description":"The text content for the text layer."},"font_family":{"type":"string","description":"The font family of the text."},"font_size":{"type":"number","description":"The font size for the text in pixels."},"font_color":{"type":"string","description":"The color of the text in hex code."}}}}},"required":["mockup_uuid","smart_objects"]}}},"required":["renders"]}}}},"responses":{"200":{"description":"Images successfully rendered. Returns array of render results.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Batch render result containing summary and individual render results.","properties":{"total_renders":{"type":"integer","description":"Total number of renders requested in the batch."},"successful_renders":{"type":"integer","description":"Number of renders that were successfully processed."},"failed_renders":{"type":"integer","description":"Number of renders that failed to process."},"renders":{"type":"array","description":"Array of individual render results.","items":{"type":"object","properties":{"status":{"type":"string","description":"Status of the individual render.","enum":["success","failed"]},"export_path":{"type":"string","description":"The URL where the rendered image can be downloaded."},"export_label":{"type":"string","description":"A label for the exported image provided in request."},"mockup_uuid":{"type":"string","description":"The UUID of the mockup template."}}}}}},"success":{"type":"boolean","description":"Indicates if the batch render API call was successful."},"message":{"type":"string","description":"A message about the batch render API."}}}}}},"400":{"description":"Bad request due to invalid input parameters."},"401":{"description":"Unauthorized request, invalid or missing API key."}}}}}}
```

Export OpenAPI specification for Render API

{% file src="<https://1410134351-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXeuL34FauPTZ6yb0wAep%2Fuploads%2Fkox4w0WNtcnPLKYRyAXe%2Frender_batch_api.json?alt=media&token=4964e68a-a7e3-4848-a2f5-2f29c1bcb6ff>" %}

### Generate multiple mockups in a single request

The **Batch Render Mockups API** allows you to generate multiple mockups in a single request. It uses the same structure and fields as the [**Render Mockup API**](https://docs.dynamicmockups.com/api-reference/render-api), with one key difference:\
instead of submitting a single mockup object, you provide an array of mockups in the `renders` field.

Use this endpoint when you need to create several mockup images at once. While it’s possible to render images individually using multiple calls to the Render Mockup API, the batch endpoint is significantly more efficient.

### **Performance advantage**

The Batch Render Mockups API can generate **ten mockups in roughly the same time it takes the** [**Render Mockup API**](https://docs.dynamicmockups.com/api-reference/render-api) **to generate one**, making it the recommended method for high-volume or multi-image workflows.
