Use this pre-built prompt to get an agent writing SudoMock Node calls correctly.
Prerequisites
Before you start, you’ll need:- A SudoMock API key
- A PSD reachable over HTTPS
Guide
1
Install
Get the SudoMock Node SDK.
2
Set your API key
Store the key in an environment variable. The client reads it when you
construct it with no argument.
.env
3
Upload the template once
The upload returns every layer you can address later, each with its own
UUID. Do this once per template, never once per render.Run it, then keep the two UUIDs it prints next to your key:
upload.mjs
.env
4
Render from a route
The route takes an artwork URL and answers with the finished image at
render.url. It uses the built-in HTTP server, so nothing beyond the
client is needed.server.mjs
Examples
Create a mockup from a PSD
The call behind
uploads.createRender a PSD mockup
Every field of
renders.createRetrieve a single job
Collect an async render
Create a webhook endpoint
Get called back instead of polling
Fit and blend modes
How artwork meets a print area
Node SDK source
The client on GitHub