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

# Fit and blend modes

> How artwork meets an area, and how blend modes render.

Fit decides where artwork lands inside an area. Blend mode decides how that
artwork sits on the material underneath it. Between them they account for most
of how a render looks, and they behave the same way whether the template came
from a PSD or from a product photo.

Reach for these two values when you need to:

* **Keep a design whole**: the artwork stays fully visible inside the area,
  with nothing cut off.
* **Cover a product edge to edge**: an all over print fills the area and the
  overflow is trimmed.
* **Match a brand colour**: the artwork keeps its own colours instead of
  taking on the material.

## Choose a fit mode

`fit` controls how your artwork meets the area it is placed into. It is
`asset.fit` on a PSD smart object and `placement.fit` on a photo mockup print
area, and it takes the same values in both places.

<ParamField body="fit" type="fit | fill | crop" default="fit">
  How the artwork is scaled into the area. Possible values:

  * `fit`: scaled until it fits inside, proportions kept, so space can be left
    over. The whole design stays visible.
  * `fill`: stretched to the bounds, proportions not kept, so the design can
    distort. Send it when the artwork already carries the area's proportions.
  * `crop`: covers the area and cuts the overflow, proportions kept. This is
    the all over print.

  `contain` and `cover` are the older names for `fit` and `crop`. They are
  still accepted and will stay accepted, so nothing you have already shipped
  needs to change.
</ParamField>

<Info>
  **The default never distorts.** A call that says nothing about `fit` is not
  asking to have its artwork stretched, so the default is `fit`. Send `fill`
  explicitly when you want the stretch.
</Info>

<Warning>
  An unrecognised value returns `422` instead of quietly resolving to a
  default. A typo that renders a wrong image without an error costs far more
  than a rejected request, because nobody sees it until a customer does.
</Warning>

The embedded editor prints these same three words on its buttons, so the value
you send is the word a seller clicks.

The same value travels in two places, one per template type. The highlighted
line carries it in each body below.

<CodeGroup>
  ```json PSD smart object {8} theme={"theme":{"light":"github-light","dark":"vesper"}}
  {
    "mockup_uuid": "123e4567-e89b-12d3-a456-426614174000",
    "smart_objects": [
      {
        "uuid": "223e4567-e89b-12d3-a456-426614174001",
        "asset": {
          "url": "https://example.com/design.png",
          "fit": "crop"
        }
      }
    ]
  }
  ```

  ```json Photo mockup print area {7} theme={"theme":{"light":"github-light","dark":"vesper"}}
  {
    "print_areas": [
      {
        "uuid": "223e4567-e89b-12d3-a456-426614174001",
        "artwork_url": "https://example.com/design.png",
        "placement": {
          "fit": "crop",
          "position": "center"
        }
      }
    ]
  }
  ```
</CodeGroup>

## Choose a blend mode on a photo mockup

`adjustments.blend_mode` controls how artwork blends with the product surface in
the photograph. It is set per print area, so one area can hold an exact logo
while another carries a printed looking graphic.

<ParamField body="adjustments.blend_mode" type="string" default="multiply">
  How the artwork sits on the surface underneath it. Possible values:

  * `multiply`: keeps the material texture visible, and is the best choice on
    light fabric. A light artwork can get swallowed on a dark garment.
  * `normal`: reproduces the artwork colours exactly, whatever the product
    colour.
  * `screen`: lightens the artwork against the surface. The default already
    adapts to a dark garment, so reach for this only when you want the lighter
    result there.
  * `lighten`: keeps the artwork only where it is brighter than the surface.
  * `soft_light`: a subtle, low contrast finish that follows the surface.
  * `overlay`: deepens contrast so the artwork reads as part of the material.
  * `darken`: keeps the artwork only where it is darker than the surface.
</ParamField>

Reach for `multiply` on garments and textured surfaces: it lets the material
texture show through, so the design looks printed rather than pasted on. It
behaves like real ink, which is why a white logo comes out grey on a black tee,
and why `normal` is the answer when a brand colour has to match the file you
supplied.

Keeping an exact brand colour on one area:

```json Match a brand colour {7} theme={"theme":{"light":"github-light","dark":"vesper"}}
{
  "print_areas": [
    {
      "uuid": "223e4567-e89b-12d3-a456-426614174001",
      "artwork_url": "https://example.com/design.png",
      "adjustments": {
        "blend_mode": "normal"
      }
    }
  ]
}
```

## Recolour a PSD layer with a blend mode

`blending_mode` sits beside `hex` in the `color` object on a smart object, and
it decides how that colour overlay meets the layer underneath. It accepts all 27
Photoshop layer blend modes, with an underscore or a space as the separator:
`soft_light` and `soft light` both work.

<ParamField body="color.blending_mode" type="string" default="normal">
  How the colour overlay meets the layer underneath. Possible values, by family:

  * Normal and special: `normal`, `dissolve`
  * Darken: `darken`, `multiply`, `color_burn`, `linear_burn`, `darker_color`
  * Lighten: `lighten`, `screen`, `color_dodge`, `linear_dodge`,
    `lighter_color`
  * Contrast: `overlay`, `soft_light`, `hard_light`, `vivid_light`,
    `linear_light`, `pin_light`, `hard_mix`
  * Inversion: `difference`, `exclusion`, `subtract`, `divide`
  * HSL components: `hue`, `saturation`, `color`, `luminosity`
</ParamField>

Recolouring a smart object with a blend mode:

```json Recolour with a blend mode {7-8} theme={"theme":{"light":"github-light","dark":"vesper"}}
{
  "mockup_uuid": "123e4567-e89b-12d3-a456-426614174000",
  "smart_objects": [
    {
      "uuid": "223e4567-e89b-12d3-a456-426614174001",
      "color": {
        "hex": "#FF5733",
        "blending_mode": "multiply"
      }
    }
  ]
}
```

<Note>
  Pass Through is supported as a group blending mode. It applies to a group
  rather than to a layer, so it is not one of the 27 values above.
</Note>

## API reference

For the full request contract behind this page, with runnable examples, see
[Render a PSD mockup](/docs/api-reference/psd-mockups/render-a-psd-mockup)
and
[Render a photo mockup](/docs/api-reference/photo-mockups/render-a-photo-mockup).
[Errors](/docs/errors) lists every code these routes can answer with.

<CardGroup cols={3}>
  <Card title="Artwork placement" icon="crop" href="/docs/psd-mockups/artwork-placement">
    Place, size, rotate and recolour artwork in a design area.
  </Card>

  <Card title="Print areas and surfaces" icon="layer-group" href="/docs/photo-mockups/print-areas">
    Where artwork can land on a photo mockup, and how to move it.
  </Card>

  <Card title="Smart filters" icon="layers" href="/docs/concepts/smart-filters">
    How Perspective Warp and the other smart filters render.
  </Card>
</CardGroup>
