> ## 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.

# Connect an agent

> Give an MCP client access to your SudoMock account.

MCP is an open protocol that gives an agent tools it can call on your behalf.
SudoMock runs a [remote MCP server](#remote-mcp-server), so a client that speaks
MCP lists your templates and renders them from inside the conversation. The same
account and the same credits sit behind it, so a render this way is billed
exactly as an API render is.

## Remote MCP server

SudoMock hosts the server at:

```
https://mcp.sudomock.com
```

Connect any MCP client that supports remote servers over HTTP. There is nothing
to install and no local process to run. The client opens a browser window where
you sign in to SudoMock and approve access.

> [!NOTE]
>
> No client asks you to paste a password, a one time code or an API key into the
> conversation, and no client needs your `sm_` key to use the server.

Each tab below is the install for that client.

> [tab] Claude Code
>
> ```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
> claude mcp add --transport http sudomock https://mcp.sudomock.com
> ```
>
> Then open `/mcp` in Claude Code and select **sudomock** to complete the
> sign in.

> [tab] Cursor
>
> [Add to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=sudomock\&config=eyJ1cmwiOiJodHRwczovL21jcC5zdWRvbW9jay5jb20ifQ==)
>
> Cursor opens and asks to install **sudomock**. Install it, then complete
> the sign in from the server's entry in Cursor's MCP settings.

> [tab] Codex CLI
>
> ```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
> codex mcp add sudomock --url https://mcp.sudomock.com
> codex mcp login sudomock
> ```

> [tab] Any other client
>
> Use the client's own remote HTTP MCP configuration with OAuth and point it
> at the same address:
>
> ```
> https://mcp.sudomock.com
> ```
>
> If the client cannot be configured from inside a session, add the server
> from its settings instead.

Some clients only publish new tools after a reconnect or a restart.

Hand an agent the setup prompt instead and it works out the client it is running
in, adds the server, and stops at the sign in step:

```
https://sudomock.com/agent-setup/prompt.md
```

Call `get_account` once the client is back. An authenticated response means the
connection is live, and discovery lists the tools below. Nothing else needs to
run: a render, an upload or a webhook call would spend credits to tell you what
you already know. The setup prompt ends on that same read-only check, so a setup
run generates nothing and spends nothing.

SudoMock also publishes a [skill file](https://sudomock.com/docs/skill.md) that
tells an agent what this product can do, what a call needs and what an account
allows, so it gets the call right the first time. Install it in a client that is
not connected to the server above.

Install the SudoMock skill into your agent.

npx skills add [https://sudomock.com/docs](https://sudomock.com/docs/index.md)

## MCP server tools

Grouped by the part of the product they touch.

* **PSD mockups**: `upload_psd`, `list_psd_mockups`, `get_psd_mockup`, `render_psd_mockup`, `update_psd_mockup`, `delete_psd_mockup`
* **Photo mockups**: `create_photo_mockup`, `list_photo_mockups`, `get_photo_mockup`, `update_photo_mockup_print_areas`, `render_photo_mockup`, `delete_photo_mockup`
* **Video**: `render_video`
* **Images and files**: `remove_background`, `create_upload_url`
* **Patterns**: `check_seams`, `fix_seams`
* **Fonts**: `list_fonts`
* **Background work**: `get_job`, `list_jobs`, `wait_for_job`
* **Webhooks**: `create_webhook_endpoint`, `list_webhook_endpoints`, `update_webhook_endpoint`, `delete_webhook_endpoint`, `test_webhook_endpoint`, `rotate_webhook_secret`, `list_webhook_deliveries`, `replay_webhook_delivery`, `replay_failed_webhook_deliveries`
* **Account**: `get_account`

The server also publishes four reference resources (`docs://quickstart`,
`docs://pricing`, `docs://formats`, `docs://errors`) and guided prompts. The
`@sudomock/mcp` package for local clients serves the same tools, plus
`upload_local_file` for a file on your own machine. Some tools answer to a second, older name: use
whichever the connection offers, and read its schema rather than assuming it
mirrors the REST endpoint of the same name. There is no batch render tool, so
one call produces one output and several outputs mean several calls.

What an agent does with them:

* [Upload a Photoshop file](https://sudomock.com/docs/psd-mockups/upload-a-psd.md) once, then render it again with new artwork, colours and text
* Turn a product photograph into a reusable mockup and place artwork on its [print areas](https://sudomock.com/docs/photo-mockups/print-areas.md)
* [Edit the text of a template layer](https://sudomock.com/docs/text/how-to-edit-psd-text-by-api.md) without opening Photoshop
* Decide how a design sits in an area with [fit and blend modes](https://sudomock.com/docs/concepts/fit-and-blend-modes.md)
* [Check a pattern tile](https://sudomock.com/docs/concepts/pattern-seams.md) before it is repeated on a product, and fix a visible seam
* Send wide or high volume work to the background and collect it by job or by [webhook](https://sudomock.com/docs/webhooks/overview.md)
* Read the plan and the remaining credits with [the account endpoint](https://sudomock.com/docs/api-reference/account/retrieve-the-current-account.md) before promising a size

## Before you promise a result

An account on trial credits renders at a reduced width and its output carries a
watermark. Check the account with `get_account` first, because a request above
the cap answers [`OUTPUT_RESOLUTION_LIMIT`](https://sudomock.com/docs/errors) rather than a quietly
smaller image.

> [card] [Use an API key instead](https://sudomock.com/docs/authentication.md)
>
> Write the calls yourself from a backend or a job runner.

> [card] [Errors](https://sudomock.com/docs/errors.md)
>
> Every error code, and which statuses are worth retrying.

> [card] [Usage limits](https://sudomock.com/docs/api-reference/usage-limits.md)
>
> The request rate, the parallel ceiling, and the headers.


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