Skip to main content

Rules for an agent adding SudoMock to a Go service.

Open in Cursor

Prerequisites

Guide

1

Set the API key

The key lives in the environment, so it never reaches the binary and never reaches a commit. No go get follows.
2

Upload the PSD once

POST /api/v1/psd/upload takes a public URL to the file and answers with the mockup plus every layer a render can address. Run it once with go run ./cmd/upload.
cmd/upload/main.go
Keep both UUIDs in configuration. Every render from here reuses them.
3

Render the mockup

POST /api/v1/renders fills the smart object with artwork and answers with the finished image at data.print_files[0].export_path. Run it with go run ./cmd/render.
cmd/render/main.go

Next steps

Upload a PSD

The upload call and its reply.

Render a mockup

Every field a render takes.

Jobs

Follow a long render by id.

Quickstart

The same two calls in cURL.

Fit and blend modes

How artwork meets the layer.

Webhooks

Let a finished render call you.

Errors

Every code, and what to do.

Custom domains

Serve renders from your domain.