SudoMock
Mockups
DocsMCPUse CasesPricing
Sign In
Get Started

Start rendering mockups in minutes

From PSD to product mockup in one API call.

Get Free API Key→Browse Templates
99.9% uptime2B+ mockups rendered500+ mockup templates500 free API credits

Site Navigation

SudoMock

SudoMock is a mockup automation platform providing PSD rendering API for e-commerce businesses. At $0.002 per PSD, it serves Etsy, Shopify, and Amazon sellers with automated product mockup generation. Founded in 2025, based in Albuquerque, NM.

SudoMock is a registered DBA
1209 Mountain Rd Pl NE, Ste N
Albuquerque, NM 87110, USA

Product

  • Pricing
  • Dashboard
  • Playground
  • Changelog
  • Start Free

Developers

  • API Overview
  • MCP Server
  • Quick Start
  • Render API
  • Upload PSD API
  • Authentication
  • Error Handling
  • PSD Preparation
  • Integrations

Mockups & Tools

  • All Mockups
  • Apparel Mockups
  • Drinkware Mockups
  • Wall Art Mockups
  • Home & Living
  • By Platform
  • Search Mockups
  • Free Tools

Resources

  • All Use Cases
  • T-Shirt Mockup Generator for Print on Demand
  • Tote Bag Mockup Generator for Sustainable Brands
  • Automate Mug at Scale with SudoMock
  • Blog
  • All Alternatives
  • vs Placeit
  • vs DynamicMockups
  • vs Adobe Photoshop API

Company

  • About
  • Contact
  • Brand Assets
  • System Status (opens in new tab)
  • Feature Requests (opens in new tab)
  • Roadmap (opens in new tab)
Blog

Latest Articles

View all →
  • 01Adobe Firefly API Pricing 2026: Credits, Costs & Alternatives
  • 02SudoMock Now Works with Claude, Cursor, ChatGPT, and Any MCP-Compatible AI Tool
  • 03Smartmockups API: What Happened and What to Use Instead
  • 04Adobe Photoshop API Pricing 2026: Complete Cost Guide & Alternatives

© SudoMock. All rights reserved.

PrivacyTermsRefundsCookies[email protected]
Back to Blog
TechnicalDec 5, 20254 min readSudoMock Team

Understanding Mockup API Data Models: A Technical Guide

Deep dive into mockup API response structures. Learn how smart object data is organized, what each field means, and how to build robust integrations.

API data model structure diagram for mockup responses

TL;DR

Understand the API response structure: uuid for identification, size for design resolution, position for canvas placement, and quad for transformed corners. Build robust integrations by understanding these data models.

Key Takeaways:

  • •size = embedded Smart Object dimensions (design at this resolution)
  • •position = where it renders on the mockup canvas
  • •quad = corner coordinates for warped/transformed objects
  • •uuid = unique identifier for API calls

Understanding how mockup APIs structure their data is crucial for building robust integrations. This guide covers the de-facto standard data model used across the industry, what each field means, and how to use them effectively in your code.

size vs position - Visual Explanation
size
3951 x 4800
Your design canvas
4800px
3951px
Design Resolution
Upload assets at this size
→
scales to
position
507 x 620
x: 771, y: 886
Mockup Canvas
Rendered Position
Where it appears on mockup
size = Original design dimensions
position = Rendered bounds on canvas

The De-Facto Standard: Rect + Transform

Every major design tool and mockup API uses the same fundamental data model: a rectangle with position coordinates and optional transforms. This pattern comes from decades of graphics programming, from Photoshop to Canvas2D to WebGL.

x, y
Position
Top-left corner coordinates
w, h
Size
Width and height dimensions
deg
Rotation
Optional rotation angle
quad
Transform
4-point perspective

This model is universal because it's deterministic, minimal, and fast. Whether you're working with Photoshop layers, Figma frames, or mockup APIs, the core concept remains the same: define a bounding box and optionally transform it.


Anatomy of a Smart Object Response

When you upload a PSD to SudoMock, each smart object layer returns detailed metadata. Let's break down what each field means and how to use it:

Smart Object Response Structure
json
1

Understanding Each Field


size vs position: The Key Distinction

The most important concept to understand is the difference between size and position. They represent two different things:

Think of it this way

size = "Upload your design at this resolution, send coordinates in render API"
position = "Use this for drawing previews on thumbnail images in browser"

In the example above, a 3951x4800 design gets scaled down to 507x620 when rendered on the mockup canvas. The scale factor is approximately 0.128x (507/3951).


Working with Quad Coordinates

The quad array contains four [x, y] coordinate pairs representing the corners of the smart object's bounding box. This is especially useful for:

Using quad coordinates in JavaScript
javascript
1

Integration Patterns

Integration Flow
📤
Upload PSD
/psd/upload
→
📋
Get Metadata
size, position, quad
→
🎨
Render
/renders
→
🖼️
Result
WebP/PNG URL

Pattern 1: Basic Render Request

The most common pattern is uploading a PSD, storing the smart object metadata, then using it to render variations:

Complete integration flow
javascript
1

Pattern 2: Using Position Data for Custom Rendering

If you're building a custom preview or need to render locally, the position data tells you exactly where to place the design:

Custom canvas preview
javascript
1

Design Resolution

For best quality, prepare your design at the size dimensions (e.g., 3951x4800), not the position dimensions. The API handles scaling automatically.


Working with Blend Modes

The blend_mode field indicates how the smart object layer blends with layers below it in the PSD. Common modes include:

For color smart objects (used to change product colors), MULTIPLY is typically used so the design texture shows through the color overlay — common in drinkware mockups and apparel templates.


Next.js Integration Examples

Here are practical examples for integrating SudoMock into your Next.js application. You can use any template from SudoMock's mockup library as a starting point. These examples show how to use the smart object metadata in real frontend code.

SudoMock Client Utility

First, create a reusable client for making API calls to SudoMock:

lib/sudomock.ts
typescript
1

React Hook for Managing Mockups

A custom hook that manages mockup state and provides useful computed values from the smart object metadata:

hooks/useMockupEditor.ts
typescript
1

Live Preview with Canvas

Use the position data to create a real-time preview before rendering:

components/MockupPreview.tsx
typescript
1

Server Action for Batch Rendering

Process multiple designs in parallel using Next.js Server Actions:

actions/batch-render.ts
typescript
1

Environment Variables

Store your SudoMock API key in .env.local as SUDOMOCK_API_KEY. Never expose it in client-side code - always call SudoMock from Server Components, Server Actions, or API routes.


Key Takeaways


Related Resources

Upload PSD API Reference

Complete documentation for the upload endpoint

Render API Reference

All render options and parameters

Smart Objects Guide

Best practices for preparing PSD templates

API Best Practices

Error handling and parallel processing

Frequently Asked Questions

SudoMock Team
SudoMock Team
View profile →

Related Articles

SudoMock Now Works with Claude, Cursor, ChatGPT, and Any MCP-Compatible AI Tool
Technical5 min read

SudoMock Now Works with Claude, Cursor, ChatGPT, and Any MCP-Compatible AI Tool

Render product mockups directly from any AI assistant that supports MCP. Claude, Cursor, VS Code, ChatGPT, Windsurf, and more.

Mar 23, 2026Read
API integration best practices code example
Technical2 min read

API Integration Best Practices

Build robust API integrations. Implement parallel processing, retry logic, and error handling.

Nov 5, 2025Read

Explore by Use Case

See SudoMock in action for your specific product category

Bulk Mockup Generation API for Enterprise ScalePrint on Demand Mockup Automation for POD SellersAutomate Shopify Product Mockups at ScaleT-Shirt Mockup Generator API for Print on DemandHoodie Mockup Generator APIAutomate Mug Mockups at Scale with SudoMock API

Ready to Try SudoMock?

Start automating your mockups with 500 free API credits.

Start Free View Docs