Skip to main content

Use this pre-built prompt to get an agent calling the SudoMock API correctly.

Open in Cursor

Prerequisites

Before you start, you’ll need:

Guide

1

Set your API key

Keys begin with sm_ and travel in the x-api-key header. Keep yours in the environment so it never reaches a browser.
.env
2

Upload the template once

Send a public URL to your PSD. The response lists the smart objects, text layers and group layers it found, each with the UUID you use to address it.
Keep the mockup UUID at data.uuid and the UUID of the smart object you want to fill at data.smart_objects[0].uuid. Every later render reuses them, so this step belongs in your setup, not in your render loop.
3

Render it

The mockup UUID says which template, the smart object UUID says which layer, and asset.url is the artwork that goes into it.
The finished image is at data.print_files[0].export_path.
The same template takes new artwork, a different colour through smart_objects[].color or different copy through text_layers[], each as another render against the same UUID. Render a PSD mockup carries every field of that call, and a render that runs long can return a job and call you back instead of holding the connection.

Examples

Node.js

Render from a Node service

Python

Render from a Python service

SDKs

The official Node and Python clients

Render a PSD mockup

Every field of the render call

Text layers

Replace copy without new artwork

Fit and blend modes

How artwork meets a print area

Render a photo mockup

Print onto a product photo

Retrieve a single job

Collect a background render

Webhooks

Get called back when a render finishes