Skip to main content

Hand this to your coding agent before it writes a SudoMock call.

Open in Cursor

Prerequisites

Before you start, you will need:

Guide

1

Install

Add the SDK to a Flask 2.2 or newer project, then put the key in the environment as SUDOMOCK_API_KEY.
2

Upload the mockup once

Run this outside the request path and keep the two UUIDs it prints, because one upload serves every render after it.
upload.py
3

Render from a route

The route places an artwork URL on the stored template, and fit decides how that artwork meets the smart object area.
app.py

Next steps

Render a PSD mockup

Every field the render call takes, and the body it answers with.

Errors

What a failed render answers, and which failures are worth retrying.

Webhooks

Let a long render call your app back instead of holding the request open.