> ## 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 Make and SudoMock

> Render PSD and photo mockups inside a Make scenario.

[Make](https://www.make.com) is a workflow automation platform that connects
apps into scenarios. The official SudoMock app covers the render API. From
inside a scenario you can upload a PSD, render it with new artwork, turn a
product photo into a reusable mockup, render a short video, and hand the
finished file to the next module.

## Install the app

<Steps>
  <Step title="Add SudoMock to your Make organization">
    Open the
    [SudoMock app invitation](https://www.make.com/en/hq/app-invitation/b53acc83bb7db9d99561432f62dac51f)
    and accept it while signed in to Make. The app then appears in the module
    picker of every scenario in that organization.
  </Step>

  <Step title="Create an API key">
    [Create a key](https://sudomock.com/dashboard/api-keys) in your dashboard and
    copy it once. Confirm it is live before you build the scenario:

    ```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
    curl "https://api.sudomock.com/api/v1/me" \
      -H "x-api-key: sm_your_api_key"
    ```
  </Step>

  <Step title="Add your SudoMock connection">
    Add any SudoMock module to a scenario. Make asks for a connection the first
    time. Paste the key into **API key**. Make verifies it against your account
    and shows the matching email, so a wrong key fails at setup instead of
    mid run.
  </Step>

  <Step title="Render your first mockup">
    Add the **Render a mockup** module, pick your connection, enter the mockup
    UUID, and map a design URL onto the smart object you want to fill. Run the
    scenario once. [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 module output at
      `data.print_files[0].export_path`. Map it straight into the next module.
    </Note>
  </Step>
</Steps>

## Modules

| Group | Modules |
| - | - |
| Photo Mockups | Create a mockup from a photo, Get a photo mockup, List photo mockups, Set photo mockup print areas, Render a photo mockup, Delete a photo mockup |
| Image preparation | Remove an image background |
| PSD templates and still renders | Upload a PSD template, Render a mockup, Download a render, Get mockup details, Get PSD mockup layers, Search mockups, Update a mockup, Delete a mockup |
| Video renders and jobs | Render a video, Get a job, Search jobs |
| Fonts | Search fonts, Get a font, Upload a custom font, Delete a custom font |
| Webhooks | Create, get, list, update, and delete endpoints, plus search deliveries, replay, rotate secret, and send test |
| Other | Get account information, Make an API call |

**Get PSD mockup layers** lists every layer of a template with its UUID,
including the layers inside its smart objects. Map some of those UUIDs into
**Hidden layers** on **Render a mockup** to leave those layers out of one
render; the template itself does not change.

**Make an API call** reaches any endpoint that has no module of its own. Enter a
path below `https://api.sudomock.com`, including the API version. The connection
supplies the key, so do not add a header yourself.

## Long renders and the Get a job module

A render sent with `is_async` returns a job id right away, so a scenario never
waits on the response. Follow it with the **Get a job** module 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. The last three are terminal,
so a router that stops on those three never loops forever. Every field is on the
[jobs endpoint](/docs/api-reference/jobs/retrieve-a-single-job).

## An example scenario

Here is a scenario you can build with two modules:

1. **Google Sheets** watches a sheet for new rows.
2. **SudoMock** renders the template using the design URL from that row.

The trigger and action pattern works with any app Make connects. Post the
finished image to a chat channel, write it back to the sheet, or push it to a
store listing.

<Note>
  Every SudoMock module reads the same connection, so one key is enough for a
  whole organization.
</Note>


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