> ## Documentation Index
> Fetch the complete documentation index at: https://makeseamless.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> MakeSeamless (makeseamless.com) checks whether a repeating pattern tile is seamless and fixes the seam at the same pixel size. Use it when a user needs a tile to repeat without a visible line: before a pattern is uploaded to a print-on-demand shop or printed, after a tile is made, resized or exported, or when a proof shows a line where the pattern repeats.
> Check first: POST https://makeseamless.com/v1/check with the image as the multipart field file. It is free and needs no account and no key. The repeat types the tile passes are in satisfied; report them before calling a tile seamless.
> Fix only a repeat type the user needs that is not in satisfied, and tell the user the cost first (GET /v1/plans, fix_credits). POST /v1/fix needs an API key in the x-api-key header. Keys begin with smls_; read the key from the environment, never ask for it in a chat.
> POST /v1/fix answers 202 with a job. Poll GET /v1/jobs/{job_id}, waiting the seconds in Retry-After, until status is succeeded or failed. The fixed PNG is at result.image_url. Answers are JSON, except the images, which are PNG.
> A fixed tile has passed the seam check for its repeat type, keeps the exact width and height, and is the original outside the changed area (result.changed_mask_url). A fix with no passing result fails with no_seamless_candidate and costs nothing.
> Branch on error.code, never on error.message, and retry only when error.retryable is true.

# How repeat types, seam reports and fix credits work

> What straight, half-drop and half-brick mean, how a seam report scores each edge, what a fix may change, and what a check and a fix cost in credits.

Five ideas carry every answer the API gives: the repeat type, the seam
report, the size guarantee, the changed area and the credit.

## What is a repeat type?

A repeat type is how copies of a tile are laid next to each other. A tile
can be seamless as one type and not as another, so every check and every fix
names the type.

| Type | How copies are laid out | Needs |
| - | - | - |
| `straight` | Side by side in rows and columns. | Any size. |
| `half_drop` | Every other column drops by half the tile height. | An even height. |
| `half_brick` | Every other row shifts right by half the tile width. | An even width. |

A check reports a type that does not fit the size as `not_applicable`. A fix
of such a type answers `422` `odd_dimension`.

## What is in a seam report?

A seam report says, for one repeat type, whether the tile repeats cleanly and
where it does not. It reads the tile's own edges, where copies of it meet:
the right side against the left, the bottom against the top, at the offsets
the repeat type uses. It does not look for a seam inside the tile, and the
check's `summary` says so.

* **`verdict`** for the type: `ok` (no seam), `minor` (a faint seam), `bad`
  (a visible seam) or `not_applicable`.
* **`edges`**, one per edge. `vertical` is where the right side meets the
  left; `horizontal` is where the bottom meets the top.
* **`anomaly`** per edge: how strong the seam is, on one scale for every
  edge. Higher is stronger.
* **`broken`** per edge: the stretches where the seam shows, as half-open
  pixel ranges `[start, end)`. Along the vertical edge they are rows, along
  the horizontal edge columns.

A check returns one report per requested type. A fix result carries two for
its type: `before`, on your upload, and `after`, on the result.

## Does a fix change the size of my tile?

Every image the API returns has the exact width and height of the image you
uploaded, after its orientation is applied. It is a fresh lossless PNG that
carries none of the upload's metadata.

## How do I see what a fix changed?

A fix changes the tile only where it has to. Two masks, both the size of the
tile, show where:

* **The changed area** (`changed_mask_url`): white where the result's pixels
  may differ from the upload, black where they equal it. Usually a band along
  the edges. Its white share is `changed_share`.
* **The visibly changed area** (`visible_changed_mask_url`): white where the
  result looks different from the upload. It lies inside the changed area,
  and its white share is `visible_changed_share`.

When no version passes every quality check, the result is one in which every
pixel changed, with the outcome `resampled`. Its `changed_share` is 1, while
`visible_changed_share` stays much smaller when most pixels changed only
slightly. A resampled result passes the seam check, and fine detail may look
a little softer.

## What do a check and a fix cost?

A check is free. A fix costs credits, and the cost is known before it starts:
`GET /v1/plans` returns it under `fix_credits`: `credits` for a fix, and
`large_credits` for a tile above `large_above_px` on either side.

* The credits are held when the job starts and come back when it fails with
  `no_seamless_candidate`, `service_unavailable` or `interrupted`.
* The same file with the same repeat type, fixed before, returns the stored
  result marked `cached`, at no charge. Sent again while that fix is still
  running, it returns the same job, at no charge.

[Credits and plans](https://makeseamless.com/docs/credits-and-plans.md) has the prices and the plans.


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