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

# How to check a pattern tile before you render it on a mockup

> Catch a seam in a repeating tile before a buyer does.

Run a seam check on the tile before you repeat it. A check costs nothing,
answers in the same call, and tells you whether the copies of the tile meet
cleanly. Do it before the render, because a seam is cheap to fix in the file
and expensive to find on a product photo a buyer has already seen.

## Why one line becomes many

A pattern is one tile placed again and again, edge to edge. If the right edge
of the tile does not run on into its left edge, the break shows at every join.
On a mug that is a few lines; on a duvet cover or a wallpaper sample it is a
grid across the whole surface. Most of these tiles look fine on their own,
which is why the problem tends to be found on the finished mockup rather than
in the design file.

A check only matters when the copies touch, so it applies to a pattern with no
gap between tiles. With `tile_spacing` above `0`, each copy stands on its own
and there is no join to check.

## From the API

Send the tile to [Check seams](https://sudomock.com/docs/api-reference/patterns/check-seams.md) as a URL
or as base64. If the render will use `fit` set to `crop`, add `crop_aspect`,
the tile's width divided by its height, so the check looks at the same cut the
render makes.

```bash cURL theme={"theme":{"light":"github-light","dark":"vesper"}}
curl -X POST "https://api.sudomock.com/api/v1/check-seams" \
  -H "x-api-key: sm_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://example.com/pattern-tile.png" }'
```

Read `data.status`:

* `seamless`: render as it is.
* `faint_seam`: a slight line. Fine for most products; fix it for a print seen
  up close.
* `visible_seam`: a line most people will notice. Fix it before you render.

## From an agent

An agent connected over MCP has the same two steps as tools: `check_seams`,
which is free, and `fix_seams`, which spends credits. A good agent checks every
pattern before it renders one, and asks you before it starts a fix.
[Connect an agent](https://sudomock.com/docs/connect-an-agent.md) covers the connection.

## When the answer is a seam

[Fix seams](https://sudomock.com/docs/api-reference/patterns/fix-seams.md) repairs the tile as a job and
gives you a new file to render with. Its credits come back if the fix fails,
and a tile you have already fixed is returned by the next check rather than
charged again. A tile with transparent edges cannot be fixed; fill the edges
in the design file first. [Check and fix pattern
seams](https://sudomock.com/docs/concepts/pattern-seams.md) walks through the whole flow, the job and the
webhook.

> [card] [Check and fix pattern seams](https://sudomock.com/docs/concepts/pattern-seams.md)
>
> The check, the fix, the job and the webhook in one place.


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