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

# Preparing a PSD

> Author a Photoshop template that renders as designed.

A template you prepare once is rendered thousands of times, so the half hour
you spend in Photoshop is the cheapest half hour you will spend on it.
Everything here happens before the first upload.

<Info>
  Photoshop is needed only to author the template. Every render after the
  upload runs without it.
</Info>

## File requirements

| Requirement       | Value                                                                                |
| ----------------- | ------------------------------------------------------------------------------------ |
| Format            | `.psd` or `.psb`                                                                     |
| Photoshop version | CC 2015 or newer                                                                     |
| Contents          | At least one visible smart object or one text layer                                  |
| Colour mode       | RGB. Other modes are converted on upload.                                            |
| Bit depth         | 8-bit or 16-bit                                                                      |
| Size              | Up to Adobe's own PSD file size limit over the API, and 300 MB through the dashboard |

Keep the file under 100 MB when you can. Flattening the layers you never
address makes the upload faster and changes nothing about the render.

## What carries through from Photoshop

Transforms on a smart object are preserved, so build the geometry into the file
rather than into your request body.

| Transform | Use it for                                    |
| --------- | --------------------------------------------- |
| Distort   | Angled surfaces such as boxes and signage     |
| Warp      | Curved surfaces such as mugs and fabric folds |
| Rotate    | Angled placement inside the scene             |
| Scale     | The size of the area relative to the canvas   |

Perspective Warp stays live and renders to match Photoshop, so leave it in
place instead of baking it into pixels. Blend modes, opacity, masks, Drop
Shadow, Stroke, Glow, Bevel and Blend If render as authored. Rasterize 3D
layers and video layers before upload.
[Smart filters](/docs/concepts/smart-filters) covers what stays live, and
[PSD compatibility](/docs/psd-mockups/psd-compatibility) has the row-by-row table.

## Build the template

<Steps>
  <Step title="Convert each design area to a smart object.">
    Select the layers that will carry the design, right-click, and choose
    **Convert to Smart Object**. Its contents set the size of the design area.
  </Step>

  <Step title="Author the smart object contents at 3000 px or larger.">
    Scaling down keeps quality and scaling up does not, so author larger than
    you expect to need. Print work needs the pixels.
  </Step>

  <Step title="Name every smart object and text layer for a human.">
    Layer names come back in the upload response and are the only readable
    handle your integration has. `Front Design` still means something six
    months later. `Layer 1` and `Copy of Layer` parse fine and tell you
    nothing.
  </Step>

  <Step title="Make the layers you intend to address visible.">
    A hidden smart object is not exposed as a slot. A hidden text layer stays a
    fillable slot instead, which is how one template carries optional lines.
    Both rules are in [PSD compatibility](/docs/psd-mockups/psd-compatibility).
  </Step>

  <Step title="Stack adjustments and overlays above the design areas.">
    Background at the bottom, then the product layers, then the design areas,
    then overlays such as texture and shadow, and adjustments on top. In that
    order a texture or a colour grade reads across the artwork the way it does
    on the finished product.
  </Step>

  <Step title="Flatten the layers you never address." />

  <Step title="Embed any linked smart object.">
    Linked content renders from its placement geometry, so this is optional.
    **Layer > Smart Objects > Embed Linked** ends the file's dependence on
    external content.
  </Step>

  <Step title="Save the file as .psd or .psb in RGB." />

  <Step title="Publish the file at a URL that answers without a session.">
    The file is fetched server-side. A signed URL works. A link that redirects
    to a sign-in page does not, whatever your browser shows while you are
    logged in.

    <Tip>
      Open the URL in a private window before you upload. A file that starts
      downloading is reachable. A sign-in page or a `403` is not.
    </Tip>
  </Step>

  <Step title="Upload the file and read back the slots you can address.">
    The response lists every smart object, text layer and group layer it
    detected, under the names you gave them. A layer missing from that list is
    one your integration cannot address. The call is
    [Create a mockup from a PSD](/docs/api-reference/psd-mockups/create-a-mockup-from-a-psd);
    [Upload a PSD](/docs/psd-mockups/upload-a-psd) explains every field. Render once
    at full size before the template goes into production.
  </Step>
</Steps>

## Learn more

<CardGroup cols={2}>
  <Card title="PSD compatibility" icon="table" href="/docs/psd-mockups/psd-compatibility">
    Check a Photoshop feature before you build a template on it.
  </Card>

  <Card title="Smart objects" icon="layers" href="/docs/psd-mockups/smart-objects">
    See how a design area is described and addressed.
  </Card>
</CardGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Upload a PSD" icon="upload" href="/docs/psd-mockups/upload-a-psd">
    Register the template once and read back every slot in it.
  </Card>

  <Card title="Render a PSD" icon="image" href="/docs/psd-mockups/render-a-psd-without-photoshop">
    Turn those slots into a finished image.
  </Card>
</CardGroup>
