Rules for an agent adding SudoMock to a Go service.
Prerequisites
- An API key from API keys.
- A PSD holding at least one smart object. See Preparing a PSD.
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
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.