PSD mockups

Render a PSD mockup

Renders a mockup by compositing layers with user-provided images.

post/api/v1/renders

Request

  • Base URL: https://api.sudomock.com
  • URL: https://api.sudomock.com/api/v1/renders
  • Auth: API key in header x-api-key

Request body

mockup_uuidstring required

UUID of the mockup to render. Must be a valid UUID, for example c315f78f-d2c7-4541-b240-a9372842de94. Obtained from the POST /api/v1/psd/upload or GET /api/v1/psd-mockups response.

hidden_layersstring[] nullable

Up to 50 layers to leave out of this render, each by the UUID that GET /api/v1/psd-mockups/{uuid}/layers lists for it, including the layers inside a smart object's contents. Hiding a group hides every layer inside it, and a layer clipped to a hidden layer is hidden with it, as in Photoshop. A layer hidden inside a smart object's contents is hidden in every copy of that smart object. A layer cannot be hidden and edited in the same request, and a smart object that receives an image cannot have layers inside it hidden. Omit to draw every layer the template shows.

export_labelstring nullable

Optional label for export file naming (max 100 chars, alphanumeric + hyphen/underscore)

is_asyncboolean

If true, the render is QUEUED and the call returns 202 immediately with a job_id (poll GET /api/v1/jobs/{job_id}, or receive a webhook if one is configured). If false (default), the render runs synchronously and returns the result.

Example request

{
  "export_options": {
    "image_format": "webp",
    "image_size": 1920,
    "quality": 95
  },
  "mockup_uuid": "123e4567-e89b-12d3-a456-426614174000",
  "smart_objects": [
    {
      "asset": {
        "fit": "fill",
        "position": {
          "left": 100,
          "top": 100
        },
        "rotate": 0,
        "size": {
          "height": 600,
          "width": 800
        },
        "url": "https://example.com/user-design.png"
      },
      "color": {
        "blending_mode": "multiply",
        "hex": "#FFFFFF"
      },
      "uuid": "223e4567-e89b-12d3-a456-426614174001"
    }
  ]
}

Response

Successful Response

successboolean

Success status

Example response

{
  "data": {
    "print_files": [
      {
        "export_path": "https://cdn.sudomock.com/mockup-assets/renders/c315f78f-d2c7-4541-b240-a9372842de94/render_8f2c1d4e.webp",
        "smart_object_uuid": "223e4567-e89b-12d3-a456-426614174001"
      }
    ]
  },
  "success": true
}

Changes

No recorded changes to this operation across all 1 revision of this API.