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

# Start a fix that makes a pattern tile repeat seamlessly

> Validates the image, then starts a job in the background that makes it tile seamlessly under
the requested repeat type, and answers `202` with the job. Poll `GET /v1/jobs/{job_id}`.
Inputs: PNG, JPEG or WebP, at most 40 MB, at least 64 x 64 px, at most 3600 px on a side; an
even height for `half_drop` and an even width for `half_brick`; no transparent pixels near the
edges.

A fix costs one credit, or `Plans.fix_credits.large_credits` for a tile above `large_above_px`
on either side, paid from the account's credits. The credits are reserved when the job starts
and come back when it fails with `no_seamless_candidate`, `service_unavailable` or
`interrupted`. The same image with the same repeat type, fixed before, gets a job that has
already `succeeded`, marked `cached`, at no charge. Sent again while its fix is still `queued`
or `running`, it gets that same job back, at no charge.


```js Node.js theme={"theme":{"light":"github-light","dark":"vesper"}}
import { readFile } from "node:fs/promises";

const form = new FormData();
form.append("file", new Blob([await readFile("tile.png")]), "tile.png");
form.append("repeat", "straight");

const response = await fetch("https://makeseamless.com/v1/fix", {
  method: "POST",
  headers: { "x-api-key": "smls_your_api_key" },
  body: form,
});

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/fix");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "x-api-key: smls_your_api_key",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
    "file" => new CURLFile("tile.png"),
    "repeat" => "straight",
]);

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

echo $response;
```

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

with open("tile.png", "rb") as file:
    response = requests.post(
        "https://makeseamless.com/v1/fix",
        headers={"x-api-key": "smls_your_api_key"},
        files={"file": file},
        data={"repeat": "straight"},
    )

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/fix")
request = Net::HTTP::Post.new(uri)
request["x-api-key"] = "smls_your_api_key"
request.set_form(
  [
    ["file", File.open("tile.png")],
    ["repeat", "straight"],
  ],
  "multipart/form-data",
)

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 (
	"bytes"
	"fmt"
	"io"
	"mime/multipart"
	"net/http"
	"os"
)

func main() {
	var payload bytes.Buffer
	form := multipart.NewWriter(&payload)
	file, err := os.Open("tile.png")
	if err != nil {
		panic(err)
	}
	defer file.Close()
	part, err := form.CreateFormFile("file", "tile.png")
	if err != nil {
		panic(err)
	}
	if _, err := io.Copy(part, file); err != nil {
		panic(err)
	}
	form.WriteField("repeat", "straight")
	form.Close()

	req, err := http.NewRequest("POST", "https://makeseamless.com/v1/fix", &payload)
	if err != nil {
		panic(err)
	}
	req.Header.Set("x-api-key", "smls_your_api_key")
	req.Header.Set("Content-Type", form.FormDataContentType())

	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;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;

String boundary = "makeseamless-form";
List<byte[]> parts = new ArrayList<>();
parts.add(("--" + boundary + "\r\n"
    + "Content-Disposition: form-data; name=\"file\"; filename=\"tile.png\"\r\n\r\n")
    .getBytes(StandardCharsets.UTF_8));
parts.add(Files.readAllBytes(Path.of("tile.png")));
parts.add("\r\n".getBytes(StandardCharsets.UTF_8));
parts.add(("--" + boundary + "\r\n"
    + "Content-Disposition: form-data; name=\"repeat\"\r\n\r\n"
    + "straight\r\n").getBytes(StandardCharsets.UTF_8));
parts.add(("--" + boundary + "--\r\n").getBytes(StandardCharsets.UTF_8));

HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://makeseamless.com/v1/fix"))
    .header("x-api-key", "smls_your_api_key")
    .header("Content-Type", "multipart/form-data; boundary=" + boundary)
    .POST(HttpRequest.BodyPublishers.ofByteArrays(parts))
    .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.Post, "https://makeseamless.com/v1/fix");
request.Headers.Add("x-api-key", "smls_your_api_key");
var form = new MultipartFormDataContent();
form.Add(new ByteArrayContent(File.ReadAllBytes("tile.png")), "file", "tile.png");
form.Add(new StringContent("straight"), "repeat");
request.Content = form;

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 POST "https://makeseamless.com/v1/fix" \
  -H "x-api-key: smls_your_api_key" \
  -F "file=@tile.png" \
  -F "repeat=straight"
```

```json Response theme={"theme":{"light":"github-light","dark":"vesper"}}
{
  "id": "job_2432c1827f32450f800694e552e9915c",
  "status": "queued",
  "stage": "queued",
  "repeat": "straight",
  "cached": false,
  "input": {
    "sha256": "9cf95d486b4c7d1bd6022a3e51d7c89b89ba5239d0378033c9a9f53413dd7770",
    "width": 256,
    "height": 256,
    "format": "PNG",
    "has_alpha": true
  },
  "created_at": "2026-11-03T15:24:08.435Z",
  "started_at": null,
  "finished_at": null,
  "result": null,
  "error": null,
  "candidates": []
}
```


## OpenAPI

````yaml openapi.json POST /v1/fix
openapi: 3.1.0
info:
  title: MakeSeamless API
  version: 1.0.0
  summary: Check whether an image tiles seamlessly, and make it tile seamlessly.
  description: >
    Check a pattern tile for seams where its copies meet, and fix it so that it
    repeats without a

    visible seam.


    - A check is free and needs no account. A fix needs an API key and costs
    credits (`GET /v1/plans`).

    - A fix runs in the background: `POST /v1/fix` answers `202` with a job.
    Poll
      `GET /v1/jobs/{job_id}` until its `status` is `succeeded` or `failed`, waiting the seconds that
      `Retry-After` gives.
    - Every image the API returns has the exact width and height of the uploaded
    image (after its
      orientation is applied), as a fresh lossless PNG that carries no metadata of the upload.
    - Breaking changes come only under a new prefix (`/v2`). Fields may be added
    to responses; ignore
      the fields you do not know.
    - Error codes are stable: read `error.code`, not `error.message`. Any
    request may also fail with
      `500` and the code `internal_error`.
  license:
    name: Proprietary
servers:
  - url: https://makeseamless.com
security: []
tags:
  - name: check
    description: Seam check, answered at once.
  - name: fix
    description: Fix job, run in the background.
  - name: jobs
    description: Job status, result images and ratings.
  - name: health
    description: Service status.
  - name: account
    description: The account, its plan and credits.
paths:
  /v1/fix:
    post:
      tags:
        - fix
      summary: Start a fix
      description: >
        Validates the image, then starts a job in the background that makes it
        tile seamlessly under

        the requested repeat type, and answers `202` with the job. Poll `GET
        /v1/jobs/{job_id}`.

        Inputs: PNG, JPEG or WebP, at most 40 MB, at least 64 x 64 px, at most
        3600 px on a side; an

        even height for `half_drop` and an even width for `half_brick`; no
        transparent pixels near the

        edges.


        A fix costs one credit, or `Plans.fix_credits.large_credits` for a tile
        above `large_above_px`

        on either side, paid from the account's credits. The credits are
        reserved when the job starts

        and come back when it fails with `no_seamless_candidate`,
        `service_unavailable` or

        `interrupted`. The same image with the same repeat type, fixed before,
        gets a job that has

        already `succeeded`, marked `cached`, at no charge. Sent again while its
        fix is still `queued`

        or `running`, it gets that same job back, at no charge.
      operationId: createFixJob
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
                - repeat
              properties:
                file:
                  type: string
                  format: binary
                  description: The image file (PNG, JPEG or WebP).
                repeat:
                  $ref: '#/components/schemas/RepeatType'
      responses:
        '202':
          description: The job, `queued`, or already `succeeded` when `cached`.
          headers:
            Location:
              $ref: '#/components/headers/Location'
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Job'
              example:
                id: job_2432c1827f32450f800694e552e9915c
                status: queued
                stage: queued
                repeat: straight
                cached: false
                input:
                  sha256: >-
                    9cf95d486b4c7d1bd6022a3e51d7c89b89ba5239d0378033c9a9f53413dd7770
                  width: 256
                  height: 256
                  format: PNG
                  has_alpha: true
                created_at: '2026-11-03T15:24:08.435Z'
                started_at: null
                finished_at: null
                result: null
                error: null
                candidates: []
        '401':
          $ref: '#/components/responses/AuthRequired'
        '402':
          description: >
            Not enough credits for the fix (`insufficient_credits`);
            `details.credits_needed` is what it

            costs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: insufficient_credits
                  message: Not enough credits for this fix.
                  retryable: false
                  details:
                    credits_needed: 1
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '422':
          $ref: '#/components/responses/InvalidInput'
        '429':
          description: >
            Not now; `Retry-After` says when to try again.
            `daily_capacity_reached`: the service's

            fixes for the day are at capacity. `too_many_running_fixes`: the
            account already has 3

            fixes queued or running.
          headers:
            Retry-After:
              $ref: '#/components/headers/RetryAfterLimit'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - apiKey: []
      x-codeSamples:
        - lang: js
          label: Node.js
          source: >-
            import { readFile } from "node:fs/promises";


            const form = new FormData();

            form.append("file", new Blob([await readFile("tile.png")]),
            "tile.png");

            form.append("repeat", "straight");


            const response = await fetch("https://makeseamless.com/v1/fix", {
              method: "POST",
              headers: { "x-api-key": "smls_your_api_key" },
              body: form,
            });


            const data = await response.json();

            console.log(data);
        - lang: php
          label: PHP
          source: |-
            <?php

            $ch = curl_init("https://makeseamless.com/v1/fix");
            curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($ch, CURLOPT_HTTPHEADER, [
                "x-api-key: smls_your_api_key",
            ]);
            curl_setopt($ch, CURLOPT_POSTFIELDS, [
                "file" => new CURLFile("tile.png"),
                "repeat" => "straight",
            ]);

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

            echo $response;
        - lang: python
          label: Python
          source: |-
            import requests

            with open("tile.png", "rb") as file:
                response = requests.post(
                    "https://makeseamless.com/v1/fix",
                    headers={"x-api-key": "smls_your_api_key"},
                    files={"file": file},
                    data={"repeat": "straight"},
                )

            response.raise_for_status()
            print(response.json())
        - lang: ruby
          label: Ruby
          source: >-
            require "net/http"

            require "uri"


            uri = URI("https://makeseamless.com/v1/fix")

            request = Net::HTTP::Post.new(uri)

            request["x-api-key"] = "smls_your_api_key"

            request.set_form(
              [
                ["file", File.open("tile.png")],
                ["repeat", "straight"],
              ],
              "multipart/form-data",
            )


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


            puts response.body
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"mime/multipart\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tvar payload bytes.Buffer\n\tform := multipart.NewWriter(&payload)\n\tfile, err := os.Open(\"tile.png\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer file.Close()\n\tpart, err := form.CreateFormFile(\"file\", \"tile.png\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tif _, err := io.Copy(part, file); err != nil {\n\t\tpanic(err)\n\t}\n\tform.WriteField(\"repeat\", \"straight\")\n\tform.Close()\n\n\treq, err := http.NewRequest(\"POST\", \"https://makeseamless.com/v1/fix\", &payload)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"x-api-key\", \"smls_your_api_key\")\n\treq.Header.Set(\"Content-Type\", form.FormDataContentType())\n\n\tres, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer res.Body.Close()\n\n\tbody, _ := io.ReadAll(res.Body)\n\tfmt.Println(string(body))\n}"
        - lang: java
          label: Java
          source: >-
            import java.net.URI;

            import java.net.http.HttpClient;

            import java.net.http.HttpRequest;

            import java.net.http.HttpResponse;

            import java.nio.charset.StandardCharsets;

            import java.nio.file.Files;

            import java.nio.file.Path;

            import java.util.ArrayList;

            import java.util.List;


            String boundary = "makeseamless-form";

            List<byte[]> parts = new ArrayList<>();

            parts.add(("--" + boundary + "\r\n"
                + "Content-Disposition: form-data; name=\"file\"; filename=\"tile.png\"\r\n\r\n")
                .getBytes(StandardCharsets.UTF_8));
            parts.add(Files.readAllBytes(Path.of("tile.png")));

            parts.add("\r\n".getBytes(StandardCharsets.UTF_8));

            parts.add(("--" + boundary + "\r\n"
                + "Content-Disposition: form-data; name=\"repeat\"\r\n\r\n"
                + "straight\r\n").getBytes(StandardCharsets.UTF_8));
            parts.add(("--" + boundary +
            "--\r\n").getBytes(StandardCharsets.UTF_8));


            HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create("https://makeseamless.com/v1/fix"))
                .header("x-api-key", "smls_your_api_key")
                .header("Content-Type", "multipart/form-data; boundary=" + boundary)
                .POST(HttpRequest.BodyPublishers.ofByteArrays(parts))
                .build();

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

            System.out.println(response.body());
        - lang: csharp
          label: .NET
          source: >-
            using System.Net.Http;


            var request = new HttpRequestMessage(HttpMethod.Post,
            "https://makeseamless.com/v1/fix");

            request.Headers.Add("x-api-key", "smls_your_api_key");

            var form = new MultipartFormDataContent();

            form.Add(new ByteArrayContent(File.ReadAllBytes("tile.png")),
            "file", "tile.png");

            form.Add(new StringContent("straight"), "repeat");

            request.Content = form;


            var client = new HttpClient();

            var response = await client.SendAsync(request);


            Console.WriteLine(await response.Content.ReadAsStringAsync());
        - lang: bash
          label: cURL
          source: |-
            curl -X POST "https://makeseamless.com/v1/fix" \
              -H "x-api-key: smls_your_api_key" \
              -F "file=@tile.png" \
              -F "repeat=straight"
components:
  schemas:
    RepeatType:
      type: string
      enum:
        - straight
        - half_drop
        - half_brick
      description: >
        `straight`: plain repeat on both axes. `half_drop`: the next column is
        shifted down by half the

        height (needs an even height). `half_brick`: the next row is shifted
        right by half the width

        (needs an even width).
    Job:
      type: object
      additionalProperties: false
      required:
        - id
        - status
        - stage
        - repeat
        - cached
        - input
        - created_at
        - started_at
        - finished_at
        - result
        - error
        - candidates
      properties:
        id:
          type: string
          pattern: ^job_[0-9a-f]{32}$
        status:
          $ref: '#/components/schemas/JobStatus'
        stage:
          $ref: '#/components/schemas/JobStage'
        repeat:
          $ref: '#/components/schemas/RepeatType'
        cached:
          type: boolean
          description: >-
            True when the same image was fixed before and this result was served
            again, at no charge.
        input:
          $ref: '#/components/schemas/InputInfo'
        created_at:
          type: string
          format: date-time
        started_at:
          type:
            - string
            - 'null'
          format: date-time
        finished_at:
          type:
            - string
            - 'null'
          format: date-time
        result:
          oneOf:
            - $ref: '#/components/schemas/FixResult'
            - type: 'null'
          description: Present when `status` is `succeeded`.
        error:
          oneOf:
            - $ref: '#/components/schemas/ErrorBody'
            - type: 'null'
          description: Present when `status` is `failed`.
        candidates:
          type: array
          description: >
            The other images of a succeeded job, `candidate_a` (the
            `result.alternative`) first. Empty

            until the job succeeded, and for a failed job.
          items:
            $ref: '#/components/schemas/Candidate'
    Error:
      type: object
      additionalProperties: false
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
    JobStatus:
      type: string
      enum:
        - queued
        - running
        - succeeded
        - failed
    JobStage:
      type: string
      enum:
        - queued
        - fixing
        - finishing
        - finished
      description: >
        Progress for display; it only moves forward. `queued`: waiting to start.
        `fixing`: seamless

        versions of the image are being made. `finishing`: the result and its
        files are being

        prepared. `finished`: the job succeeded or failed.
    InputInfo:
      type: object
      additionalProperties: false
      required:
        - sha256
        - width
        - height
        - format
        - has_alpha
      properties:
        sha256:
          type: string
          pattern: ^[0-9a-f]{64}$
          description: SHA-256 of the uploaded file bytes.
        width:
          type: integer
          minimum: 64
          description: Width in px, after the image's orientation is applied.
        height:
          type: integer
          minimum: 64
          description: Height in px, after the image's orientation is applied.
        format:
          type: string
          enum:
            - PNG
            - JPEG
            - WEBP
        has_alpha:
          type: boolean
    FixResult:
      type: object
      additionalProperties: false
      required:
        - outcome
        - image_url
        - changed_mask_url
        - width
        - height
        - sha256
        - resampled
        - changed_share
        - seam_report
        - alternative
      properties:
        outcome:
          $ref: '#/components/schemas/Outcome'
        image_url:
          type: string
          description: '`/v1/jobs/{job_id}/result`.'
        changed_mask_url:
          type: string
          description: '`/v1/jobs/{job_id}/changed_mask`, the changed area.'
        visible_changed_mask_url:
          type: string
          description: >
            `/v1/jobs/{job_id}/visible_mask`, the visibly changed area. Absent
            on results made before

            it was offered.
        width:
          type: integer
          description: Always the uploaded image's width.
        height:
          type: integer
          description: Always the uploaded image's height.
        sha256:
          type: string
          pattern: ^[0-9a-f]{64}$
          description: SHA-256 of the result PNG bytes.
        resampled:
          type: boolean
          description: >-
            True when every pixel changed (outcome `resampled`); fine detail may
            look a little softer.
        changed_share:
          type: number
          minimum: 0
          maximum: 1
          description: >
            Share of the image inside the changed area (the white share of
            `changed_mask_url`): the

            band along the edges, or 1 when every pixel changed.
        visible_changed_share:
          type: number
          minimum: 0
          maximum: 1
          description: >
            Share of the image that looks different from the upload (the white
            share of

            `visible_changed_mask_url`), never more than `changed_share`. When
            every pixel changed but

            most only slightly, `changed_share` is 1 and this share is much
            smaller. Absent on results

            made before it was offered.
        seam_report:
          $ref: '#/components/schemas/SeamReport'
        alternative:
          oneOf:
            - $ref: '#/components/schemas/Alternative'
            - type: 'null'
          description: Null when the fix made no other image.
    ErrorBody:
      type: object
      additionalProperties: false
      required:
        - code
        - message
        - retryable
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          description: Plain-language explanation; it may change, do not parse it.
        retryable:
          type: boolean
          description: >-
            True when the same request can succeed later (a new fix, or polling
            again).
        details:
          type: object
          description: 'Optional machine-readable context, for example `{"max_side": 3600}`.'
    Candidate:
      type: object
      additionalProperties: false
      required:
        - id
        - image_url
        - passed
        - changed_share
        - resampled
      description: An image the fix made besides the result.
      properties:
        id:
          $ref: '#/components/schemas/CandidateId'
        image_url:
          type: string
          description: '`/v1/jobs/{job_id}/candidates/{id}`.'
        passed:
          type: boolean
          description: True when it passed the same checks as a result.
        changed_share:
          type: number
          minimum: 0
          maximum: 1
          description: Share of the image inside its changed area.
        resampled:
          type: boolean
          description: >-
            True when every pixel changed (outcome `resampled`); fine detail may
            look a little softer.
    Outcome:
      type: string
      enum:
        - ok
        - resampled
      description: >
        `ok`: the result passed every quality check. `resampled`: no version
        passed every quality

        check, so the result is one in which every pixel changed; it passes the
        seam check, and fine

        detail may look a little softer.
    SeamReport:
      type: object
      additionalProperties: false
      required:
        - before
        - after
      description: >-
        The seam report for the requested repeat type, on the upload and on the
        result.
      properties:
        before:
          $ref: '#/components/schemas/RepeatVerdict'
        after:
          $ref: '#/components/schemas/RepeatVerdict'
    Alternative:
      type: object
      additionalProperties: false
      required:
        - id
        - image_url
        - passed
        - changed_share
      description: The other candidate shown next to the result.
      properties:
        id:
          $ref: '#/components/schemas/CandidateId'
        image_url:
          type: string
          description: '`/v1/jobs/{job_id}/candidates/{id}`.'
        passed:
          type: boolean
          description: >-
            True when it passed the same checks as a result. Offer its download
            only when true.
        changed_share:
          type: number
          minimum: 0
          maximum: 1
          description: Share of the image inside its changed area.
    ErrorCode:
      type: string
      enum:
        - validation_error
        - payload_too_large
        - unsupported_format
        - decode_failed
        - too_small
        - too_large
        - odd_dimension
        - transparent_seam_band
        - not_found
        - result_not_ready
        - no_result
        - no_seamless_candidate
        - service_unavailable
        - interrupted
        - internal_error
        - auth_required
        - insufficient_credits
        - daily_capacity_reached
        - too_many_running_fixes
        - rate_limited
        - already_subscribed
        - pro_required
        - no_subscription
        - rating_closed
      description: >
        Stable codes. Of a failed job: `no_seamless_candidate` (no version of
        the image tiled

        seamlessly), `service_unavailable` (the fix could not run for now; try
        again later),

        `interrupted` (the service stopped while the job ran; start the fix
        again) and

        `internal_error`.
    CandidateId:
      type: string
      pattern: ^candidate_[a-z]+$
      description: >
        The id of an image of the job other than the result: `candidate_a`,
        `candidate_b` and so on.

        Ids are per job.
    RepeatVerdict:
      type: object
      additionalProperties: false
      required:
        - repeat
        - verdict
        - edges
      description: The verdict for one repeat type, with its seam report per edge.
      properties:
        repeat:
          $ref: '#/components/schemas/RepeatType'
        verdict:
          $ref: '#/components/schemas/Verdict'
        edges:
          type: array
          description: Empty when the verdict is `not_applicable`.
          items:
            $ref: '#/components/schemas/EdgeReport'
    Verdict:
      type: string
      enum:
        - ok
        - minor
        - bad
        - not_applicable
      description: >-
        `ok`: no seam. `minor`: a faint seam. `bad`: a visible seam.
        `not_applicable`: the repeat type does not fit this size.
    EdgeReport:
      type: object
      additionalProperties: false
      required:
        - edge
        - verdict
        - anomaly
        - broken
      description: >
        One edge where copies of the tile meet. Positions along the `vertical`
        edge are rows of the

        tile; along the `horizontal` edge, columns.
      properties:
        edge:
          type: string
          enum:
            - vertical
            - horizontal
          description: >-
            `vertical`: where the right side meets the left. `horizontal`: where
            the bottom meets the top.
        verdict:
          type: string
          enum:
            - ok
            - minor
            - bad
          description: The level of `anomaly`.
        anomaly:
          type: number
          minimum: 0
          description: >-
            How strong the seam is, on one scale for every edge; higher is
            stronger.
        broken:
          type: array
          description: The stretches of the edge where the seam shows.
          items:
            $ref: '#/components/schemas/Range'
    Range:
      type: array
      description: Half-open pixel range `[start, end)` along an edge.
      items:
        type: integer
        minimum: 0
      minItems: 2
      maxItems: 2
  headers:
    Location:
      description: Path of the job, `/v1/jobs/{job_id}`.
      schema:
        type: string
    RetryAfter:
      description: Seconds to wait before polling again.
      schema:
        type: integer
        minimum: 1
    RetryAfterLimit:
      description: Seconds to wait before trying again.
      schema:
        type: integer
        minimum: 1
  responses:
    AuthRequired:
      description: |
        No API key, or one that is revoked or unknown (`auth_required`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    PayloadTooLarge:
      description: >
        The image file is larger than 40 MB (`payload_too_large`); refused
        before it is read in full.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InvalidInput:
      description: >
        The request or the image cannot be used. Codes: `validation_error`,
        `unsupported_format`,

        `decode_failed`, `too_small`, `too_large`, `odd_dimension` (fix only),
        `transparent_seam_band`

        (fix only).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        An API key of your account, created on makeseamless.com and sent in the
        `x-api-key` header. Keys start with `smls_`.

````

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