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

# API rate limits, image size limits and credit spend limits

> How many checks a client can send a minute, how many fixes an account can run at once, the image size limits, and what a fix can spend in credits.

Three ceilings answer with a `429` and `Retry-After`, and `error.code` tells
them apart. Spending is bounded by the credits a fix shows before it starts.

## How many requests can I send?

| What | Limit | When it is reached |
| - | - | - |
| Checks from one client | 30 a minute | `429` `rate_limited` |
| Fixes of one account queued or running | 3 at a time | `429` `too_many_running_fixes` |
| Fixes across the service | a daily capacity | `429` `daily_capacity_reached` |

* A client is counted by its IP address, and an IPv6 client by its /64
  network. A check needs no key, so the limit is per client, not per account.
* `Retry-After` on `rate_limited` is the seconds until the oldest check of
  the last minute leaves the window.
* `too_many_running_fixes` clears as soon as one of the account's fixes
  finishes. Wait the seconds in `Retry-After`, then send the fix again.
* `daily_capacity_reached` lifts on its own: `Retry-After` says when, at the
  latest the next UTC midnight.
* Poll a job as its `Retry-After` says, not faster.

## How large can an image be?

| | Check | Fix |
| - | - | - |
| Formats | PNG, JPEG, WebP | PNG, JPEG, WebP |
| File size | 40 MB | 40 MB |
| Smallest | 64 x 64 px | 64 x 64 px |
| Largest | 64 megapixels | 3600 px on a side |
| `half_drop` | an odd height is `not_applicable` | needs an even height |
| `half_brick` | an odd width is `not_applicable` | needs an even width |
| Edges | any | no transparent pixels near the edges |

## How much can a fix spend?

A fix never spends more than it shows before it starts.

* **The cost is known up front.** `GET /v1/plans` returns it under
  `fix_credits`, with its own figure for a large tile. The credits are held
  when the job starts; a fix that cannot be paid for answers `402`
  `insufficient_credits` and starts nothing.
* **A failure gives the credits back** when it ends with
  `no_seamless_candidate`, `service_unavailable` or `interrupted`.
* **A repeat costs nothing.** The same file with the same repeat type returns
  the stored result, and a second send while the first still runs returns the
  same job.
* **A key cannot buy credits.** Plans and top-ups are bought signed in on
  makeseamless.com, so a leaked key can spend only the credits already on the
  account. Revoke it on the Account page and it stops at once.
* **One top-up purchase** is 10 to 10,000 credits.

## How long are jobs and images kept?

| What | Kept for | After that |
| - | - | - |
| A job's images | 30 days | `404` `not_found` |
| Rating a job | 30 days after it was created | `409` `rating_closed` |


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