Use this pre-built prompt to get an agent calling the SudoMock API correctly.
Prerequisites
Before you start, you’ll need:- A SudoMock API key
- A PSD reachable over HTTPS
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 The finished image is at
asset.url is the artwork that goes into it.data.print_files[0].export_path.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