>_
SudoMock
POST

Upload PSD

Upload your Photoshop mockup template for processing. We extract smart objects, generate thumbnails, and prepare your template for rendering.

POST/api/v1/psd/upload

PSD File Requirements

  • File must be accessible via public URL (or signed URL)
  • Maximum file size: 500MB
  • Must contain at least one smart object layer
  • Supported: Photoshop CC 2015 and newer

Request

Headers

X-API-KEYstringRequired

Your SudoMock API key starting with sm_

Content-TypestringRequired

Must be application/json

Request Body

psd_file_urlstringRequired

URL to the PSD file. Must be publicly accessible or a signed URL.

psd_namestring

Human-readable name for the mockup template. Auto-generated from filename if not provided.

Request Body Example
1
{
2
"psd_file_url": "https://your-storage.com/mockup-template.psd",
3
"psd_name": "T-Shirt Mockup Front"
4
}

Code Examples

Upload PSD
bash
1
curl -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

200OK
Response 200 OK
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
"smart_objects": [
8
{
9
"uuid": "128394ee-6758-4f2f-aa36-e2b19b152bd9",
10
"name": "Design Area",
11
"layer_name": "Smart Object 1",
12
"size": {
13
"width": 3000,
14
"height": 3413
15
},
16
"position": {
17
"x": 450,
18
"y": 380,
19
"width": 1200,
20
"height": 1400
21
},
22
"print_area_presets": [
23
{
24
"uuid": "preset-001",
25
"name": "Default",
26
"size": { "width": 3000, "height": 3413 },
27
"position": { "x": 0, "y": 0, "width": 3000, "height": 3413 }
28
}
29
],
30
"blend_mode": "normal",
31
"required": true
32
}
33
],
34
"text_layers": [],
35
"psd": {
36
"uuid": "c315f78f-d2c7-4541-b240-a9372842de94",
37
"name": "T-Shirt Mockup Front"
38
}
39
}
40
}

Response Fields

uuidstringRequired

Unique identifier for the mockup. Use this to render variations.

namestringRequired

Name of the mockup template.

thumbnailstring

URL to the mockup preview image.

smart_objectsarrayRequired

List of editable smart object layers in the PSD.

smart_objects[].uuidstringRequired

UUID of the smart object. Use this when rendering.

smart_objects[].namestringRequired

Human-readable name of the smart object.

smart_objects[].sizeobjectRequired

Original dimensions of the smart object content (width, height).

smart_objects[].positionobjectRequired

Position and size of the smart object in the mockup (x, y, width, height).

Error Responses

400Bad Request
json
1
{
2
"success": false,
3
"detail": "Invalid PSD file URL"
4
}
401Unauthorized
json
1
{
2
"success": false,
3
"detail": "Invalid or missing API key"
4
}
422Validation Error
json
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

POST/api/v1/psd/upload

Upload 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.
Next: Learn how to render mockups with your uploaded templateRender Mockup