Skip to main content

Use this pre-built prompt to get an agent writing SudoMock Node calls correctly.

Open in Cursor

Prerequisites

Before you start, you’ll need:

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.
upload.mjs
Run it, then keep the two UUIDs it prints next to your key:
.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.create

Render a PSD mockup

Every field of renders.create

Retrieve 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