> ## Documentation Index
> Fetch the complete documentation index at: https://sudomock.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> The base URL is https://api.sudomock.com.
> Authenticate every request with the x-api-key header. Keys begin with sm_.
> A render returns the finished image at data.print_files[0].export_path. A request sent with is_async true returns a job_id to poll at GET /api/v1/jobs/{job_id}.
> Prefer the official SDKs over hand-written HTTP calls: npm install sudomock for Node, pip install sudomock for Python.

# Render mockups with n8n and SudoMock

> Render PSD and photo mockups inside an n8n workflow.

[n8n](https://n8n.io) is a workflow automation tool you run on your own machine
or in its cloud. The [SudoMock node](https://n8n.io/integrations/sudomock/)
(`n8n-nodes-sudomock`) covers the render API, and n8n lists it as verified. From
inside a workflow you can upload a PSD, render it with new artwork and
personalized text, turn a product photo into a reusable mockup, remove a
background, render a short product video, and start a workflow the moment a
render finishes.

## How to use SudoMock's n8n node

<Steps>
  <Step title="Install the node">
    Search for **SudoMock** in the nodes panel, or install the package
    `n8n-nodes-sudomock` from the community nodes screen. The
    [listing on n8n](https://n8n.io/integrations/sudomock/) carries the steps
    for your instance. The node then appears in every workflow on it.
  </Step>

  <Step title="Create an API key">
    [Create a key](https://sudomock.com/dashboard/api-keys) in your dashboard
    and copy it once. Keys begin with `sm_`, and
    [Authentication](/docs/authentication) explains where they are accepted.
  </Step>

  <Step title="Add the SudoMock credential">
    In n8n, open **Credentials**, choose **SudoMock API**, and paste the key
    into **API Key**. n8n checks it against your account on save, so a wrong key
    fails at setup instead of halfway through a run.
  </Step>

  <Step title="Render your first mockup">
    Add a **SudoMock** node and pick the **PSD Mockup: Render** operation. Give
    it a mockup UUID and a design URL. [Upload a PSD](/docs/psd-mockups/upload-a-psd)
    first if you do not have a template yet.

    <Note>
      The finished image URL arrives on the node output at
      `data.print_files[0].export_path`. Pass it straight to the next node.
    </Note>
  </Step>
</Steps>

## Operations

Pick an operation on the SudoMock node and n8n draws the fields it needs.

| Group | Operations |
| - | - |
| PSD mockups | PSD Mockup: Upload, Render, Get, Get Layers, List, Update, Delete |
| Photo mockups | Photo Mockup: Create, Get, List, Set Print Areas, Render, Delete |
| Video and images | Render Video, Remove Background |
| Fonts | Font: List Fonts, Font: Get Font, Font: Upload From URL, Font: Delete Custom Font |
| Jobs | Get Job, List Jobs |
| Webhook endpoints | Webhook: Create Endpoint, Get Endpoint, List Endpoints, Update Endpoint, Delete Endpoint, Send Test, Rotate Secret, List Deliveries, Events Feed, Replay Delivery, Replay Failed Deliveries |
| Account and storage | Get Account Info, Artwork: Delete Stored Files |

These are the names from version 0.12 of the node, and **PSD Mockup: Get
Layers** comes with version 0.14. An instance still on an earlier version shows
**Render Mockup** and **2D:** names for the same operations; updating the node
from **Settings**, **Community nodes** brings the names in line.
[Photo mockups](/docs/photo-mockups/overview) describes that family.

## Personalized text in the same render

**PSD Mockup: Render** carries a **Text Layers** field beside the artwork fields, so
one node fills the artwork and the buyer's name in a single call. An override
names a text layer and supplies plain text or styled segments, and can set the
font, size, color, stroke color, and how the text fits its box when it runs
long. [Text layers](/docs/text/text-layers) covers the shape of one, and **Font:
Upload From URL** puts your own TTF or OTF in front of it.

**PSD Mockup: Get Layers** lists every layer of a template with its UUID,
including the layers inside its smart objects. Put some of those UUIDs in the
**Hidden Layers** field of **PSD Mockup: Render** to leave those layers out of
one render; the template itself does not change.

## Long renders and the Get Job operation

A render, an upload or a photo mockup sent with **Run Asynchronously** returns
a job id right away, so a workflow never waits on the response. Follow it with
the **Get Job** operation and branch on the status field.

| Status | Meaning |
| - | - |
| `queued` | Accepted and waiting for a slot |
| `dispatched` | Picked up and about to start |
| `running` | Being rendered now |
| `succeeded` | Finished, with the image URL on the payload |
| `failed` | Ended with an error you can branch on |
| `cancelled` | Stopped before it finished |

The first three mean the work is still in flight, and the last three are
terminal, so a branch that stops on those three never loops forever. **Get Job**
also offers **Wait for Completion**, which polls until the job is terminal and
returns the result on one output. **Render Video** always runs asynchronously
and carries the same toggle. The full shape is on the
[job endpoint](/docs/api-reference/jobs/retrieve-a-single-job).

## Start a workflow from a render event

The **SudoMock Trigger** node registers a webhook endpoint on your account when
you activate the workflow, so a finished render starts the workflow instead of a
schedule doing it. Choose the events you want in the **Events** field, or leave
the list empty to receive every event, including ones added later. The trigger
checks each delivery's signature before the workflow runs, and removes its
endpoint again when you deactivate the workflow.

<Note>
  The trigger delivers photo mockup events under their current names,
  `photo_mockup.ready` and `photo_mockup_render.succeeded` among them. An
  endpoint created by an earlier version of the node keeps the earlier spelling,
  `2d_mockup.ready`, until **Webhook: Update Endpoint** re-pins it.
  [Webhooks](/docs/webhooks/overview) maps each name to its payload.
</Note>

## Use the node inside an AI agent

The SudoMock node is also available as a tool, so an **AI Agent** node can call
it and pick the operation that fits the request in front of it. To give an agent
the tools directly, without n8n in the middle,
[Connect an agent](/docs/connect-an-agent) covers the MCP server.

## Example workflow: render a seasonal drop across every template

[Automate Print-on-Demand Product Mockups with SudoMock
API](https://n8n.io/workflows/12464-automate-print-on-demand-product-mockups-with-sudomock-api/)
is a published template you can import and run. It is built for the week a
collection goes live, when one artwork set has to reach every product you sell.

1. **Google Drive** watches a folder and fires when new design files land in it.
2. **SudoMock** lists your PSD templates.
3. The workflow builds every design and product pairing from those two lists.
4. **SudoMock** renders the pairings one at a time.
5. The finished URLs are written to a CSV, grouped by design and by product.
6. **Google Drive** receives the CSV.
7. An email goes out when the batch is done.

Drop a holiday artwork set into the folder and the listing images for the whole
collection come back as one sheet. The trigger and action pattern works with any
app n8n connects, so the same middle steps sit just as well behind a store
order, a form submission, or a new row in a spreadsheet.

<Note>
  Every SudoMock operation reads the same credential, so one key is enough for a
  whole instance.
</Note>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.