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

# Artwork placement

> Place, size, rotate and recolour artwork in a design area.

Everything about how your artwork lands inside a design area is set by the
`asset` object on a smart object entry, plus two optional siblings for colour
and tone. The request that carries them is
[Render a PSD mockup](/docs/api-reference/psd-mockups/render-a-psd-mockup).

<Info>
  **Recommendation:** author artwork at the area's own `size`, which the upload
  response reports, and send only `fit`. Reach for `size`, `position` and
  `rotate` when the default placement is not where the design belongs.
</Info>

## Point the asset at your artwork

Give `asset` a `url` that is public, directly reachable and immutable: one URL,
one image, for good. To change a design, publish it at a new URL and render
with that. A URL reused for different content can return the earlier image.

Google Drive is where this bites most often. **Replace file** and **Manage
versions** keep the same link, so the link keeps resolving to the original
design. Upload the new design as a new file, which gets its own link. See
[why a render shows old artwork](/docs/faq/why-is-my-render-showing-old-artwork).

When artwork is generated on the fly and has no stable address, send the bytes
instead. `base64` carries the image with no `data:` prefix and `content_type`
says how to read it, defaulting to `image/png`. Bytes take priority over a URL.

## Fit, size and rotation

Four values on `asset` decide where the design sits once the render has it.

| Field      | Values                      | What it does                                       |
| ---------- | --------------------------- | -------------------------------------------------- |
| `fit`      | `fit`, `crop`, `fill`       | How the artwork meets the area. Defaults to `fit`. |
| `size`     | `width`, `height` in pixels | The artwork's own dimensions inside the area.      |
| `position` | `top`, `left` in pixels     | Offset from the top left of the area.              |
| `rotate`   | -360 to 360                 | Degrees. Turns the artwork, not the area.          |

`fit` keeps the whole design visible, `crop` covers the area and cuts the
overflow, and `fill` stretches to the bounds. `crop` is the common choice for
product mockups because it covers the area without distorting the design. The
older `contain` and `cover` spellings are still accepted, and full detail is on
[Fit and blend modes](/docs/concepts/fit-and-blend-modes).

The upload response gives each area a `size` of its own, for example
`3000 x 3413`. Author artwork at those dimensions, render with the area's uuid,
and placement into the visible bounds is handled for you. Larger is fine,
smaller costs quality. The `position` that same response reports is where the
area sits on the canvas, for drawing a preview in a browser rather than for a
render body.

Set `size` and `position` on the asset only when the artwork belongs somewhere
other than the area's default placement, and set both together. A logo pinned
to one corner and a pattern that starts at a known offset are the two cases
that need them. `rotate` turns the artwork inside the area, and the perspective
and warp the designer built stay where they are.

## Colour and tone

Two optional siblings of `asset` sit on the same entry. `color` takes a `hex`
value and a `blending_mode`, which gives you product colourways from a single
artwork file. It accepts all 27 Photoshop layer blend modes, with an underscore
or a space as the separator. `multiply` keeps the material texture readable
under the colour, which is what makes a dark garment look printed rather than
painted.

`adjustment_layers` tunes the artwork itself. Send any subset, and every value
you leave out stays at its default.

| Parameter    | Range       | Default |
| ------------ | ----------- | ------- |
| `brightness` | -150 to 150 | 0       |
| `contrast`   | -100 to 100 | 0       |
| `saturation` | -100 to 100 | 0       |
| `vibrance`   | -100 to 100 | 0       |
| `opacity`    | 0 to 100    | 100     |
| `blur`       | 0 to 100    | 0       |

## Learn more

<CardGroup cols={2}>
  <Card title="Smart objects" icon="box" href="/docs/psd-mockups/smart-objects">
    Read what an area describes before you fill it.
  </Card>

  <Card title="Fit and blend modes" icon="layers" href="/docs/concepts/fit-and-blend-modes">
    Choose how artwork meets the area and sits on the material.
  </Card>
</CardGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Render a PSD mockup" icon="image" href="/docs/api-reference/psd-mockups/render-a-psd-mockup">
    Send the request, with runnable examples in eight languages.
  </Card>

  <Card title="Render a PSD without Photoshop" icon="play" href="/docs/psd-mockups/render-a-psd-without-photoshop">
    Follow the two request path from template to image.
  </Card>
</CardGroup>
