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

# What is the PSD file size limit

> The ceiling on each route, and what to do above it.

There are two ceilings, because there are two ways a template gets in.

| Route | Ceiling per file |
| - | - |
| API, fetched from a URL | Adobe's own PSD file size limit, 2 GB |
| Dashboard, read from your disk | 300 MB |

Most templates never approach either. A file in the hundreds of megabytes is
usually carrying layers no render addresses, so removing them is often quicker
than changing route.

## What the rejection looks like

A file over the ceiling is refused with `400` and the error code
`PSD_TOO_LARGE`. Its `details` object carries `file_size_mb` and `max_size_mb`,
so the response names both numbers and you never have to work out which one you
hit. The shape of every error response is on [Errors](/docs/errors).

Pixel dimensions are a separate ceiling, 10000 by 10000, answered with
`DIMENSION_TOO_LARGE`. A file can clear one and fail the other.

## When a template is over the limit

<Steps>
  <Step title="Send it over the API instead of the dashboard.">
    The dashboard reads the bytes from your disk and caps each file at 300 MB.
    The API fetches the file from an address you give it, where the ceiling is
    Adobe's own. Publish the file somewhere it can be downloaded and send that
    address as `psd_file_url`.
    [Upload a PSD](/docs/psd-mockups/upload-a-psd) covers the call.
  </Step>

  <Step title="Upload in the background.">
    Set `is_async` to `true` and the call answers `202` with a job to poll,
    instead of holding the connection open while a large file is read.
  </Step>

  <Step title="Serve the file inside the fetch window.">
    The file is fetched with a 300 second timeout, so the address has to be
    directly downloadable. A share page that redirects through a viewer is the
    usual reason a large file never arrives.
  </Step>

  <Step title="Flatten what no render addresses.">
    Every layer you never target is weight the upload carries and the render
    ignores. Flattening those layers makes the upload faster and changes nothing
    about the result. The full checklist is on
    [Preparing a PSD](/docs/psd-mockups/preparing-a-psd).
  </Step>
</Steps>

## A smaller file pays twice

The file is read once per template rather than once per render, so the saving
lands on the upload and then stays. Author smart object contents at 3000 px or
larger and flatten the scenery around them, and you keep both: the design areas
hold their resolution, and the decoration stops costing anything.

[Preparing a PSD](/docs/psd-mockups/preparing-a-psd) suggests staying under 100 MB
where you can, which is comfortable room on either route.

## Learn more

* [Preparing a PSD](/docs/psd-mockups/preparing-a-psd) for the file requirements.
* [Upload a PSD](/docs/psd-mockups/upload-a-psd) for the call and its background
  mode.
* [Errors](/docs/errors) for every code an upload can answer with.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.