> ## 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 to authenticate MakeSeamless API requests with a key

> Send an API key that starts with smls_ in the x-api-key header. Only a fix, a rating and the account call need one; the seam check works without a key.

A call that spends credits or reads your account carries an API key in the
`x-api-key` header. Keys start with `smls_`.

```text theme={"theme":{"light":"github-light","dark":"vesper"}}
x-api-key: smls_your_api_key
```

Three calls need a key: [start a fix](https://makeseamless.com/docs/api-reference/fix/start-a-fix.md),
[rate an image](https://makeseamless.com/docs/api-reference/jobs/rate-an-image.md) and
[read your account](https://makeseamless.com/docs/api-reference/account/retrieve-the-current-account.md).
Everything else answers without one: the check, a job and its images, the
plans and the service status.

## How do I get an API key?

Keys are created on the **Account** page at
[makeseamless.com/app/account](https://makeseamless.com/app/account), under
**API keys**. The key is shown in full once, when you create it, so copy it
then into wherever your service reads its secrets. The list shows each key by
its first characters and when it was last used.

Create one key per integration and name it after what holds it, so a leak
costs you that integration and nothing else.

## How do I check that a key works?

`GET /v1/me` returns the account behind the key: its plan and its credits.
It costs nothing, so it is the way to confirm a key is live.

```js Node.js theme={"theme":{"light":"github-light","dark":"vesper"}}
const response = await fetch("https://makeseamless.com/v1/me", {
  method: "GET",
  headers: { "x-api-key": "smls_your_api_key" },
});

const data = await response.json();
console.log(data);
```

```php PHP theme={"theme":{"light":"github-light","dark":"vesper"}}
<?php

$ch = curl_init("https://makeseamless.com/v1/me");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "x-api-key: smls_your_api_key",
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
```

```python Python theme={"theme":{"light":"github-light","dark":"vesper"}}
import requests

response = requests.get(
    "https://makeseamless.com/v1/me",
    headers={"x-api-key": "smls_your_api_key"},
)

response.raise_for_status()
print(response.json())
```

```ruby Ruby theme={"theme":{"light":"github-light","dark":"vesper"}}
require "net/http"
require "uri"

uri = URI("https://makeseamless.com/v1/me")
request = Net::HTTP::Get.new(uri)
request["x-api-key"] = "smls_your_api_key"

response = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
  http.request(request)
end

puts response.body
```

```go Go theme={"theme":{"light":"github-light","dark":"vesper"}}
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, err := http.NewRequest("GET", "https://makeseamless.com/v1/me", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("x-api-key", "smls_your_api_key")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
```

```java Java theme={"theme":{"light":"github-light","dark":"vesper"}}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://makeseamless.com/v1/me"))
    .header("x-api-key", "smls_your_api_key")
    .GET()
    .build();

HttpResponse<String> response = HttpClient.newHttpClient()
    .send(request, HttpResponse.BodyHandlers.ofString());

System.out.println(response.body());
```

```csharp .NET theme={"theme":{"light":"github-light","dark":"vesper"}}
using System.Net.Http;

var request = new HttpRequestMessage(HttpMethod.Get, "https://makeseamless.com/v1/me");
request.Headers.Add("x-api-key", "smls_your_api_key");

var client = new HttpClient();
var response = await client.SendAsync(request);

Console.WriteLine(await response.Content.ReadAsStringAsync());
```

```bash cURL theme={"theme":{"light":"github-light","dark":"vesper"}}
curl -X GET "https://makeseamless.com/v1/me" \
  -H "x-api-key: smls_your_api_key"
```

## Where should I keep the key?

The key starts fixes and spends credits, so it belongs in your backend or in
an environment variable, never in client-side code or a public repository.
An agent reads it from the environment and never asks for it in a
conversation.

A key cannot create keys, revoke keys or change billing. Those are done
signed in on makeseamless.com. If a key is exposed, revoke it on the
**Account** page: it stops working at once. Then create a new one and update
the places that held the old one.

## What does it mean when a key is rejected?

A missing, revoked or unknown key answers `401` with the code
`auth_required`, in the error shape described in [Errors](https://makeseamless.com/docs/errors.md).

## Next steps

> [card] [Fix your first tile](https://makeseamless.com/docs/quickstart.md)
>
> A check, a fix and the download.

> [card] [API introduction](https://makeseamless.com/docs/api-reference/introduction.md)
>
> The base URL and what each status means.

> [card] [Rate and spend limits](https://makeseamless.com/docs/api-reference/limits.md)
>
> The ceilings a key works inside.

> [card] [Try it on your account](https://makeseamless.com/docs/api-reference/account/retrieve-the-current-account.md)
>
> Run the account call with your own key.


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