原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。使用 Google 登录即可撰写评价。原型 · 每 30 分钟更新
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

Sudomock MCP

作者:sudomock版本 3.12.1i★ 0i在你的电脑上运行
注册名称io.github.sudomock/mcp

安装方法

What it does

Mockup generator and rendering API: 6,800+ ready-made mockups, or bring your own PSD or photo.

  • Connects 在你的电脑上运行
  • Account or key Needs SUDOMOCK_API_KEY
  • Category 设计、图片与音频

安装

选择你使用的 AI 应用,然后复制设置。

通过 3/3 项检查 · 在你的电脑上运行 · ✓ 命令已检查 2026年11月14日

第一步:你用哪个 AI?

选择你用的应用,步骤会显示在下方。

可连接 Claude,但需要先准备

需要 Sudomock MCP 的密钥(在开发者网站创建) · 需要先在电脑上安装 Node.js(只需一次) · 仅限电脑上的 Claude 应用(Windows 或 Mac),网页和手机不可用

让 AI 帮你安装

把这段话复制到 Claude 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。

请在这台电脑上为 Claude 安装 MCP server Sudomock MCP,按顺序:1) 用 node -v 检查是否有 Node.js。没有的话,请让我从 https://nodejs.org/en/download 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):{ "mcpServers": { "sudomock": { "command": "npx", "args": [ "-y", "@sudomock/mcp" ], "env": { "SUDOMOCK_API_KEY": "your-value" } } } } 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) SUDOMOCK_API_KEY 先保留 "your-value",请我自己把真实值粘贴到文件或应用的输入框里。不要让我在对话里输入密钥。5) 按约定执行,然后确认 Sudomock MCP 的工具真的出现了。

这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。

  1. 安装 Node.js(如果还没有)

    已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter

    node -v
    • 显示版本号(例如 v26.13.1)= 已安装,可跳过这一步
    • 显示 "command not found"(Windows 显示 "is not recognized")= 还没安装,或刚装好但需要关掉终端再重新打开
    怎么打开终端

    Mac:按 ⌘ + Space,输入 Terminal 后按 Enter

    Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”

    还没安装: 打开官方下载页,选择 LTS 版本和点选式安装程序:Mac 用 .pkg · Windows 用 .msi。双击后一路下一步即可,不需要 curl 命令

    打开 Node.js 下载页 ↗

    装好后关掉终端再打开,重新运行同一条命令,应显示版本号: node -v

    安装一次,所有需要 Node.js 的工具都能用

  2. 注册并创建 Sudomock MCP 的密钥

    打开开发者网站,注册账户并创建 API 密钥,下一步要用。价格和免费方案请看开发者网站。

    获取密钥的方法见下方开发者的 README

  3. 打开电脑版 Claude 应用的设置文件

    SettingsDeveloperEdit Config

  4. 粘贴这些设置并保存文件

    {
      "mcpServers": {
        "sudomock": {
          "command": "npx",
          "args": [
            "-y",
            "@sudomock/mcp"
          ],
          "env": {
            "SUDOMOCK_API_KEY": "your-value"
          }
        }
      }
    }

    只把密钥粘贴到应用的输入框里,不要粘贴到聊天中或发给任何人

  5. 退出 Claude 再重新打开

  6. 试一试

    用 Sudomock MCP 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 Claude 说正在使用 Sudomock MCP,或回答中出现 Sudomock MCP 的工具名称,就表示连接成功

菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同

ChatGPT 暂时无法连接 Sudomock MCP

Sudomock MCP 需要安装在你的电脑上,而 ChatGPT 只能连接在网上运行的服务器

你可以改用这些方式

A · 使用能连接 Sudomock MCP 的应用

  • 需要 Sudomock MCP 的密钥(在开发者网站创建) · 需要先在电脑上安装 Node.js(只需一次) · 仅限电脑上的 Claude 应用(Windows 或 Mac),网页和手机不可用
  • 需要 Sudomock MCP 的密钥(在开发者网站创建) · 需要先在电脑上安装 Node.js(只需一次)
  • 需要 Sudomock MCP 的密钥(在开发者网站创建) · 需要先在电脑上安装 Node.js(只需一次)
  • 需要 Sudomock MCP 的密钥(在开发者网站创建) · 需要先在电脑上安装 Node.js(只需一次)

B · 设计、图片与音频 类中能连接 ChatGPT 的其他服务器

从同类中使用较多的里挑选,仅限用地址即可连接、无需密钥的

可连接 Claude Code,但需要先准备

需要 Sudomock MCP 的密钥(在开发者网站创建) · 需要先在电脑上安装 Node.js(只需一次)

让 AI 帮你安装

把这段话复制到 Claude Code 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。

请在这台电脑上为 Claude Code 安装 MCP server Sudomock MCP,按顺序:1) 用 node -v 检查是否有 Node.js。没有的话,请让我从 https://nodejs.org/en/download 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):claude mcp add --scope user sudomock --env SUDOMOCK_API_KEY=your-value -- npx -y @sudomock/mcp 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) SUDOMOCK_API_KEY 先保留 "your-value",请我自己把真实值粘贴到文件或应用的输入框里。不要让我在对话里输入密钥。5) 按约定执行,然后确认 Sudomock MCP 的工具真的出现了。

这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。

  1. 安装 Node.js(如果还没有)

    已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter

    node -v
    • 显示版本号(例如 v26.13.1)= 已安装,可跳过这一步
    • 显示 "command not found"(Windows 显示 "is not recognized")= 还没安装,或刚装好但需要关掉终端再重新打开
    怎么打开终端

    Mac:按 ⌘ + Space,输入 Terminal 后按 Enter

    Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”

    还没安装: 打开官方下载页,选择 LTS 版本和点选式安装程序:Mac 用 .pkg · Windows 用 .msi。双击后一路下一步即可,不需要 curl 命令

    打开 Node.js 下载页 ↗

    装好后关掉终端再打开,重新运行同一条命令,应显示版本号: node -v

    安装一次,所有需要 Node.js 的工具都能用

  2. 注册并创建 Sudomock MCP 的密钥

    打开开发者网站,注册账户并创建 API 密钥,下一步要用。价格和免费方案请看开发者网站。

    获取密钥的方法见下方开发者的 README

  3. 打开终端

    Mac:按 Command+空格,输入 Terminal · Windows:打开 PowerShell

  4. 粘贴这条命令并按 Enter

    claude mcp add --scope user sudomock --env SUDOMOCK_API_KEY=your-value -- npx -y @sudomock/mcp

    按 Enter 前,把“your-value”改成你的密钥

    只把密钥粘贴到应用的输入框里,不要粘贴到聊天中或发给任何人

  5. 在 Claude Code 中输入 /mcp

    应能看到 Sudomock MCP 在列表中并显示已连接

  6. 试一试

    用 Sudomock MCP 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 Claude Code 说正在使用 Sudomock MCP,或回答中出现 Sudomock MCP 的工具名称,就表示连接成功

菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同

可连接 Cursor,但需要先准备

需要 Sudomock MCP 的密钥(在开发者网站创建) · 需要先在电脑上安装 Node.js(只需一次)

让 AI 帮你安装

把这段话复制到 Cursor 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。

请在这台电脑上为 Cursor 安装 MCP server Sudomock MCP,按顺序:1) 用 node -v 检查是否有 Node.js。没有的话,请让我从 https://nodejs.org/en/download 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):{ "mcpServers": { "sudomock": { "command": "npx", "args": [ "-y", "@sudomock/mcp" ], "env": { "SUDOMOCK_API_KEY": "your-value" } } } } 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) SUDOMOCK_API_KEY 先保留 "your-value",请我自己把真实值粘贴到文件或应用的输入框里。不要让我在对话里输入密钥。5) 按约定执行,然后确认 Sudomock MCP 的工具真的出现了。

这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。

  1. 安装 Node.js(如果还没有)

    已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter

    node -v
    • 显示版本号(例如 v26.13.1)= 已安装,可跳过这一步
    • 显示 "command not found"(Windows 显示 "is not recognized")= 还没安装,或刚装好但需要关掉终端再重新打开
    怎么打开终端

    Mac:按 ⌘ + Space,输入 Terminal 后按 Enter

    Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”

    还没安装: 打开官方下载页,选择 LTS 版本和点选式安装程序:Mac 用 .pkg · Windows 用 .msi。双击后一路下一步即可,不需要 curl 命令

    打开 Node.js 下载页 ↗

    装好后关掉终端再打开,重新运行同一条命令,应显示版本号: node -v

    安装一次,所有需要 Node.js 的工具都能用

  2. 注册并创建 Sudomock MCP 的密钥

    打开开发者网站,注册账户并创建 API 密钥,下一步要用。价格和免费方案请看开发者网站。

    获取密钥的方法见下方开发者的 README

  3. 点击这个按钮打开 Cursor

    在 Cursor 中打开

    Cursor 会请你确认安装,点击 Install

  4. 填写你的密钥

    在 Sudomock MCP 的设置中,SUDOMOCK_API_KEY 还是空的,填入你的密钥并保存

    只把密钥粘贴到应用的输入框里,不要粘贴到聊天中或发给任何人

  5. 在 Cursor 中以 Agent 模式打开 AI 聊天

  6. 试一试

    用 Sudomock MCP 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 Cursor 说正在使用 Sudomock MCP,或回答中出现 Sudomock MCP 的工具名称,就表示连接成功

菜单名称已于 2026年11月11日 对照 Cursor 帮助页面核实 · 你的界面可能因版本略有不同

可连接 VS Code,但需要先准备

需要 Sudomock MCP 的密钥(在开发者网站创建) · 需要先在电脑上安装 Node.js(只需一次)

让 AI 帮你安装

把这段话复制到 VS Code 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。

请在这台电脑上为 VS Code 安装 MCP server Sudomock MCP,按顺序:1) 用 node -v 检查是否有 Node.js。没有的话,请让我从 https://nodejs.org/en/download 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):{ "servers": { "sudomock": { "type": "stdio", "command": "npx", "args": [ "-y", "@sudomock/mcp" ], "env": { "SUDOMOCK_API_KEY": "your-value" } } } } 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) SUDOMOCK_API_KEY 先保留 "your-value",请我自己把真实值粘贴到文件或应用的输入框里。不要让我在对话里输入密钥。5) 按约定执行,然后确认 Sudomock MCP 的工具真的出现了。

这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。

  1. 安装 Node.js(如果还没有)

    已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter

    node -v
    • 显示版本号(例如 v26.13.1)= 已安装,可跳过这一步
    • 显示 "command not found"(Windows 显示 "is not recognized")= 还没安装,或刚装好但需要关掉终端再重新打开
    怎么打开终端

    Mac:按 ⌘ + Space,输入 Terminal 后按 Enter

    Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”

    还没安装: 打开官方下载页,选择 LTS 版本和点选式安装程序:Mac 用 .pkg · Windows 用 .msi。双击后一路下一步即可,不需要 curl 命令

    打开 Node.js 下载页 ↗

    装好后关掉终端再打开,重新运行同一条命令,应显示版本号: node -v

    安装一次,所有需要 Node.js 的工具都能用

  2. 注册并创建 Sudomock MCP 的密钥

    打开开发者网站,注册账户并创建 API 密钥,下一步要用。价格和免费方案请看开发者网站。

    获取密钥的方法见下方开发者的 README

  3. 点击这个按钮打开 VS Code

    在 VS Code 中打开

    VS Code 会请你确认安装,点击 Install

  4. 填写你的密钥

    在 Sudomock MCP 的设置中,SUDOMOCK_API_KEY 还是空的,填入你的密钥并保存

    只把密钥粘贴到应用的输入框里,不要粘贴到聊天中或发给任何人

  5. 在 VS Code 中以 Agent 模式打开 AI 聊天

  6. 试一试

    用 Sudomock MCP 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 VS Code 说正在使用 Sudomock MCP,或回答中出现 Sudomock MCP 的工具名称,就表示连接成功

菜单名称已于 2026年11月11日 对照 VS Code 帮助页面核实 · 你的界面可能因版本略有不同

其他支持 MCP 的应用(如 Windsurf、Zed、Gemini CLI)添加方式各不相同,请在应用列表中查看

查看所有支持 MCP 的应用 →

JSON 设置在下方“开发者专用”中

卡住了?问问正在用 Sudomock MCP 的人💬 讨论 →
开发者专用:终端命令和 JSON 设置

安装在电脑上

Claude Code

claude mcp add --scope user sudomock --env SUDOMOCK_API_KEY=your-value -- npx -y @sudomock/mcp

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "sudomock": {
      "command": "npx",
      "args": [
        "-y",
        "@sudomock/mcp"
      ],
      "env": {
        "SUDOMOCK_API_KEY": "your-value"
      }
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "sudomock": {
      "command": "npx",
      "args": [
        "-y",
        "@sudomock/mcp"
      ],
      "env": {
        "SUDOMOCK_API_KEY": "your-value"
      }
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "sudomock": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@sudomock/mcp"
      ],
      "env": {
        "SUDOMOCK_API_KEY": "your-value"
      }
    }
  }
}

需要你填写的值

  • SUDOMOCK_API_KEY 机密 必填 env
    Your SudoMock API key starting with sm_

说明仍为英文原文。

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

一览

每周下载量i
1,055/周
连接方式
在你的电脑上运行
最新版本i
3.12.1
发布到注册中心i
2026年11月14日
代码最后更新i
2026年11月14日
作者
sudomock
软件包
npm: @sudomock/mcp
注册状态
活跃

哪些应用可以使用它

依据这个服务器的连接方式和各应用自己的文档,检查于 2026年11月10日。

在你的电脑上运行,适用于

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

全部应用及其优缺点 →

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月15日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 sudomock 验证,该账户拥有此仓库

  • ✓ 通过

    仍在维护

    代码最后更新于昨天

  • ✓ 通过

    有许可证

    使用 MIT

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

已公开的漏洞(OSV.dev)

OSV.dev 中没有 @sudomock/mcp@3.12.1 的记录

只检查这个版本的包本身,不包括所有依赖 · 检查于 2026年11月15日

我们检查什么 → · JSON

作者:申请重新检查或报告信息错误

讨论

提问、分享技巧或报告无法使用。按“有帮助”数量排序。

还没有帖子,欢迎第一个提问或分享。

此处内容由用户撰写,不代表 PopNx 团队。

登录后发帖

用户评价

还没有评价

登录后写评价

与“设计、图片与音频”中的其他服务器比较i

  • 星标数多于此分类中其他 3072 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 3072 个服务器的 96% 更新
  • 基础检查结果等于或优于此分类中其他 3072 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

Sudomock MCP 安全吗?

它在 3 项适用的基础检查中通过了 3 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

你需要填写:SUDOMOCK_API_KEY

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于昨天,最新版本(3.12.1)于昨天进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。

有什么可以替代它?

同一分类中有:Pascal 3D Editor, Figma MCP Server, Remocn: Remotion MCP server, Harness, ChatCut

功能相近的其他选择

同一分类、其他作者、命令已通过检查。官方的排在前面,再按星标排序。

如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

Pascal 3D Editor

Create, inspect, validate, and save editable 3D building scenes with Pascal's MCP server.

作者:pascalorg广泛使用↓ 1037/周★ 2.6万 整个仓库的星标前天更新

电脑或云端✓ 服务方 · pascal.app

Figma MCP Server

The Figma MCP server brings Figma design context directly into your AI workflow.

作者:figma广泛使用★ 218613个月前更新

在云端运行✓ 服务方 · mcp.figma.com

Remocn: Remotion MCP server

Hosted MCP for Remotion videos: search Remocn components, read docs, plan a video, preview it.

作者:Remocn正在增长★ 17055天前更新

在云端运行✓ 服务方 · remocn.dev

Harness

Start Claude Code and Codex agents the person can watch, wait for them and read their answers.

作者:autonomous-ai正在增长↓ 87/周★ 148727天前更新

在你的电脑上运行✓ harness.autonomous.ai

ChatCut

AI video editor for agents: cut footage, add captions and motion graphics, export editable edits.

作者:ChatCut-Inc正在增长★ 104116天前更新

在云端运行✓ 服务方 · chatcut.io
  • Pascal 3D Editor — 云端或安装在电脑上都可以 · 不需要密钥
  • Figma MCP Server — 在云端运行,无需安装 · 不需要密钥 · 在 Claude 的目录中
  • Remocn: Remotion MCP server — 在云端运行,无需安装 · 不需要密钥
  • Harness — 需要安装在电脑上 · 不需要密钥
  • ChatCut — 在云端运行,无需安装 · 不需要密钥

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

SudoMock MCP Server

Generate photorealistic product mockups from Claude, Cursor, Windsurf, and VS Code.

Model Context Protocol server for the SudoMock mockup generation API. Upload PSD templates, place artwork onto smart objects, edit supported text layers, and get rendered image URLs -- all through natural language.

Quick Start

This is a local stdio server: your MCP client launches it as a child process via npx and authenticates with your SUDOMOCK_API_KEY.

claude mcp add sudomock \

-e SUDOMOCK_API_KEY=sm_your_key_here \ -- npx -y @sudomock/mcp

Get your API key at sudomock.com/dashboard/api-keys.

JSON config for other clients (Cursor, Windsurf, VS Code)

{

"mcpServers": { "sudomock": { "command": "npx", "args": ["-y", "@sudomock/mcp"], "env": { "SUDOMOCK_API_KEY": "sm_your_key_here" } } } }

Note: A hosted remote (HTTP/OAuth) transport is not available yet. This

package only ships the local stdio server shown above.

Tools

ToolDescriptionCredits
list_mockupsList your uploaded mockup templates0
get_mockup_detailsGet smart object UUIDs, dimensions, blend modes; with include_layers, every layer and its UUID, including the layers inside smart objects0
render_mockupRender a mockup with artwork and/or editable text; hidden_layers leaves chosen layers out1
remove_backgroundGet a transparent-PNG cutout at a public URL that stays available for 7 days5
check_seamsCheck whether a repeating pattern tile joins without a visible seam0
fix_seamsRepair a pattern tile's seams so it repeats cleanly (always async)60
list_fontsList the fonts available for text layers, including your uploads0
create_upload_urlGet an upload URL for a local file and the file URL it will have0
create_2d_mockupCreate a photo mockup and detect printable surfaces automatically25
render_2d_surfacePrint artwork across a whole surface (all-over)5
render_2d_print_areaPrint artwork into one saved print area (a drawn zone)5
render_videoAnimate a mockup into a video clip (always async)cost-based (one per account at no charge, then cost-based)
upload_psdUpload a Photoshop PSD/PSB template (sync or async)0
list_2d_mockupsList saved photo mockup templates; use customizable_only for shopper-ready items0
get_2d_mockupGet one photo mockup's saved print areas and its surfaces0
update_2d_print_areasReplace a photo mockup's print-area geometry0
delete_2d_mockupDelete a photo mockup template0
get_jobCheck the status of an async job by job_id0
wait_for_jobPoll an async job until it succeeds or fails0
list_jobsList async render, video, upload, and photo mockup jobs0
get_accountCheck plan, credits, prepaid balance, and usage0
update_mockupRename a mockup template0
delete_mockupDelete a mockup template0
create_webhook_endpointRegister a webhook for async job completion, pinned to an event naming0
list_webhook_endpointsList your webhook endpoints0
update_webhook_endpointEdit or enable/disable a webhook endpoint0
delete_webhook_endpointDelete a webhook endpoint0
rotate_webhook_secretRotate a webhook signing secret0
test_webhook_endpointSend a signed webhook.test event0
list_webhook_deliveriesList delivery attempts for an endpoint0
replay_webhook_deliveryReplay a single failed delivery0
replay_failed_webhook_deliveriesReplay every failed delivery for an endpoint0
Both spellings work

The product calls its two kinds of template PSD mockups and photo mockups, and the tools answer to those names too. Nothing above was renamed: every name in the table keeps working exactly as it always has, and the spelling beside it is the same tool with the same arguments. Reach for either.

Name in the tableAlso answers to
list_mockupslist_psd_mockups
get_mockup_detailsget_psd_mockup
update_mockupupdate_psd_mockup
delete_mockupdelete_psd_mockup
render_mockuprender_psd_mockup
create_2d_mockupcreate_photo_mockup
list_2d_mockupslist_photo_mockups
get_2d_mockupget_photo_mockup
update_2d_print_areasupdate_photo_mockup_print_areas
delete_2d_mockupdelete_photo_mockup
render_2d_surface, render_2d_print_arearender_photo_mockup
get_2d_mockupget_2d_mockup_details
test_webhook_endpointsend_webhook_test_event
render_photo_mockuprender_2d_mockup

render_photo_mockup is the one that is not simply a second name for a single tool. It renders either kind of target from one tool: pass the mockup as mockup_id and name exactly one of surface_uuid (sized by coverage or an explicit width + height) or print_area_uuid (sized by fit or an explicit width + height). Picking the target by picking a tool, with mockup_uuid, is what render_2d_surface and render_2d_print_area still do. render_2d_mockup is render_photo_mockup under a second name, with the mockup passed as mockup_uuid.

Async jobs

render_mockup, upload_psd, create_2d_mockup, and both photo mockup render tools accept is_async: true, and render_video and fix_seams are always async. These return a job_id immediately (HTTP 202) instead of a final result. (create_2d_mockup and the photo mockup render tools are synchronous by default and return the mockup / render directly.) Poll it with get_job, or let wait_for_job block until the job reaches a terminal status and hands back result_url, mockup_uuid, credits_charged, and payg ({credits, unit_price, cost} for pay-as-you-go jobs, otherwise null).

For a photo mockup render, pick the tool that matches the target you read from get_2d_mockup. Every printable product in the photo, and the main wall of a room photo, is a surface with its own surface_uuid: render_2d_surface prints across the whole of one, and takes either a coverage percentage or an explicit width + height. A print area is a bounded zone somebody drew on a product, such as a chest logo: render_2d_print_area takes its print_area_uuid, and either a fit or an explicit width + height. A product can have both, and they are separate targets -- a saved print area does not close off the surface it sits on.

Sizing has one answer per render: send the relative option or the exact box, never both, and send width and height together. position, offset_x, offset_y and rotation place the artwork on either kind of target. Anything you leave out is left out of the request, so the renderer's own default applies rather than a copy of it kept here.

Each entry in a photo mockup's surfaces carries a label, what was detected there, such as pillow or wall, so you can tell surfaces apart before you pick one. update_2d_print_areas takes an optional print_area_id on each area: an area that sends one of the mockup's ids keeps it, and an area without one gets a new id.

Patterns

tile repeats the artwork as a pattern across the whole target, and tile_spacing leaves a gap between the tiles: a percentage of the tile size, 0 to 100, so the horizontal gap is that percent of the tile width and the vertical gap that percent of the tile height. It is used only when tile is true.

  • On a PSD template both go in a smart_objects entry's asset on render_mockup. size is one tile, fit places the artwork inside each tile, and position sets where the grid starts.
  • render_video takes them as parameters for the smart object it fills, with asset_width and asset_height as the size of one tile.
  • The photo mockup render tools take them as parameters. The sizing answer (coverage, fit, or width and height) is one tile, and position with offset_x and offset_y sets where the grid starts.

A tile needs a size; without one the API answers 422.

Check the tile with check_seams before you render it. It answers at once, at no charge, with status: seamless, faint_seam or visible_seam. seams lists each side that does not join cleanly, left_right (where the right edge meets the left) or top_bottom (where the bottom edge meets the top), with the pixel ranges along it. fixable and unfixable_reason (transparent_edges or too_large) say whether the tile can be repaired, and previous_fix holds your latest fix of the same image, if there is one. Pass crop_aspect, the width divided by the height of one tile in your render, to check the image cropped to that shape the way fit: "crop" crops it.

fix_seams takes the same input and repairs the tile so it repeats without a visible seam. It is always async: read the job with get_job or wait_for_job. The finished job carries result_url, alternative_url (a second repaired version when one is available, otherwise null), result_status (the seam check of the result) and changes (edges or whole_tile); while it runs, stage reads queued, fixing or finishing. A fix that fails with error_code TILE_NOT_FIXABLE carries error_details.reason: not_a_pattern_tile or no_clean_result. Seam fix: 60 credits, refunded automatically if the fix fails; seam check: free.

Background removal

remove_background returns a transparent-PNG URL valid for 7 days. You can pass that URL straight back as artwork_url during that window. To clean artwork inline during a single render instead, pass remove_background: true to render_mockup or either photo mockup render tool. Either way it costs 5 credits per artwork, refunded automatically if processing fails.

Webhooks

Register an endpoint with create_webhook_endpoint to be notified when async jobs finish. Deliveries are signed with TWO headers: X-SudoMock-Signature (a hex HMAC-SHA256 over ${timestamp}.${rawBody} using the secret returned at creation/rotation) and X-SudoMock-Timestamp (unix seconds). Verify in constant time and reject if |now - timestamp| > 300s.

Render, upload, and video job deliveries use {event, job_id, kind, status, result_url, error, created_at}. The typed photo mockup creation events add version, mockup_id, name, and either print_areas (ready) or reason (rejected). The typed photo mockup render events carry mockup_id, result_url, a public {error_code, message} failure when applicable, and optional export_format / duration_ms. Event types: render.succeeded, render.failed, upload.succeeded, video.succeeded, video.failed, photo_mockup.ready, photo_mockup.rejected, photo_mockup.failed, photo_mockup_render.succeeded, photo_mockup_render.failed, seam_fix.succeeded, seam_fix.failed, webhook.test. Seam fix deliveries carry result_url and alternative_url.

The five photo mockup events also have a legacy spelling: 2d_mockup.ready, 2d_mockup.rejected, 2d_mockup.failed, 2d_render.succeeded, 2d_render.failed (with kind 2d_create / 2d_render in the payload). Which spelling an endpoint receives is its event_naming pin, set at create_webhook_endpoint and returned on every endpoint: current (the names above) or legacy. A create without a pin takes current only when event_types names photo mockup events by their family names alone, and legacy otherwise, including an empty list. Endpoints registered before the pin existed stay on legacy, so a receiver written against the old names keeps working unchanged. Once that

只显示了开头部分;其余内容请在仓库中阅读