Upload PSD
Upload your Photoshop mockup template for processing. We extract smart objects, generate thumbnails, and prepare your template for rendering.
/api/v1/psd/uploadPSD File Requirements
- File must be accessible via public URL (or signed URL)
- Maximum file size: 300MB
- Must contain at least one smart object layer
- Supported: Photoshop CC 2015 and newer
Request
Headers
X-API-KEYstringRequiredYour SudoMock API key starting with sm_
Content-TypestringRequiredMust be application/json
Request Body
psd_file_urlstringRequiredURL to the PSD file. Must be publicly accessible or a signed URL.
psd_namestringHuman-readable name for the mockup template. Auto-generated from filename if not provided.
1{2 "psd_file_url": "https://your-storage.com/mockup-template.psd",3 "psd_name": "T-Shirt Mockup Front"4}
Code Examples
1curl -X POST "https://api.sudomock.com/api/v1/psd/upload" \2 -H "Content-Type: application/json" \3 -H "X-API-KEY: sm_your_api_key" \4 -d '{5 "psd_file_url": "https://your-storage.com/mockup.psd",6 "psd_name": "My Mockup Template"7 }'
Response
Success Response
1{2 "success": true,3 "data": {4 "uuid": "c315f78f-d2c7-4541-b240-a9372842de94",5 "name": "T-Shirt Mockup Front",6 "thumbnail": "https://cdn.sudomock.com/thumbnails/c315f78f.webp",7 "width": 2000,8 "height": 3000,9 "smart_objects": [10 {11 "uuid": "128394ee-6758-4f2f-aa36-e2b19b152bd9",12 "name": "Design Area",13 "layer_name": "Smart Object 1",14 "size": { "width": 3000, "height": 3413 },15 "position": { "x": 450, "y": 380, "width": 1200, "height": 1400 },16 "quad": null,17 "blend_mode": "normal",18 "print_area_presets": [19 {20 "uuid": "preset-001",21 "name": "Default",22 "size": { "width": 3000, "height": 3413 },23 "position": { "x": 0, "y": 0, "width": 3000, "height": 3413 }24 }25 ]26 }27 ],28 "text_layers": [],29 "collections": [],30 "thumbnails": [31 { "width": 720, "url": "https://cdn.sudomock.com/thumbnails/c315f78f_720.webp" },32 { "width": 480, "url": "https://cdn.sudomock.com/thumbnails/c315f78f_480.webp" },33 { "width": 240, "url": "https://cdn.sudomock.com/thumbnails/c315f78f_240.webp" }34 ]35 },36 "message": ""37}
Response Fields
uuidstringRequiredUnique identifier for the mockup. Use this to render variations.
namestringRequiredName of the mockup template.
thumbnailstringURL to the mockup preview image.
widthintegerOriginal PSD width in pixels.
heightintegerOriginal PSD height in pixels.
smart_objectsarrayRequiredList of editable smart object layers in the PSD.
smart_objects[].uuidstringRequiredUUID of the smart object. Use this when rendering.
smart_objects[].namestringRequiredHuman-readable name of the smart object.
smart_objects[].sizeobjectRequiredOriginal dimensions of the smart object content (width, height).
smart_objects[].positionobjectRequiredPosition and size of the smart object in the mockup (x, y, width, height).
smart_objects[].quadarrayFour [x, y] coordinate pairs representing the corners of the smart object bounds. Useful for canvas rendering.
smart_objects[].blend_modestringLayer blend mode (e.g., normal, multiply). Important for color overlays.
Understanding Smart Object Data
Each smart object returns detailed metadata for seamless integration. The key distinction is between size and position:
| Field | Meaning | Usage |
|---|---|---|
size.width/height | Original embedded content dimensions | Design canvas size - upload assets at this resolution |
position.x/y | Top-left coordinates on mockup canvas | Client-side canvas preview overlays |
position.width/height | Display dimensions after transforms | Drawing design on thumbnail images in browser |
quad | 4-point corner coordinates | Canvas rendering, perspective transforms |
blend_mode | Layer blending mode | Color overlays, special effects |
size vs position
size = Upload your design at this resolution, use these coordinates in render API requests.position = Use for drawing client-side previews on thumbnail images in browser. Not needed for API calls.Error Responses
1{2 "success": false,3 "detail": "Invalid PSD file URL"4}
1{2 "success": false,3 "detail": "Invalid or missing API key"4}
1{2 "detail": [3 {4 "loc": ["body", "psd_file_url"],5 "msg": "field required",6 "type": "value_error.missing"7 }8 ]9}
Try It Live
/api/v1/psd/uploadUpload a PSD file and extract smart objects.
Get your API key from the Dashboard
Best Practices
PSD Preparation Tips
- Name your smart object layers descriptively (e.g., "Front Design", "Back Logo")
- Use high-resolution smart objects (3000x3000px or higher)
- Flatten non-editable layers to reduce file size
- Keep smart objects in separate layer groups if possible
Common Issues
- File not accessible: Ensure your URL is publicly accessible or use a signed URL
- No smart objects found: Convert your design layers to smart objects in Photoshop
- Processing timeout: Very large files (>200MB) may take longer. Consider optimizing.