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

# Retrieve the plan and credits of the account behind a key

> The plan, tier, billing interval and credits left by kind of the account behind your API key, to read before a fix. Costs nothing to call.

```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"
```

```json Response theme={"theme":{"light":"github-light","dark":"vesper"}}
{
  "account_id": "user-ada",
  "email": "ada@shop.test",
  "plan": "free",
  "tier": null,
  "interval": null,
  "subscription_status": null,
  "unlimited": false,
  "credits": {
    "subscription": 0,
    "bonus": 0,
    "topup": 5,
    "total": 5
  },
  "period_credits": null,
  "credits_used_this_period": 0,
  "current_period_start": null,
  "current_period_end": null
}
```


## OpenAPI

````yaml openapi.json GET /v1/me
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/me:
    get:
      tags:
        - account
      summary: Your account, plan and credits
      operationId: getMe
      responses:
        '200':
          description: The account of the API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Me'
              example:
                account_id: user-ada
                email: ada@shop.test
                plan: free
                tier: null
                interval: null
                subscription_status: null
                unlimited: false
                credits:
                  subscription: 0
                  bonus: 0
                  topup: 5
                  total: 5
                period_credits: null
                credits_used_this_period: 0
                current_period_start: null
                current_period_end: null
        '401':
          $ref: '#/components/responses/AuthRequired'
      security:
        - apiKey: []
      x-codeSamples:
        - lang: js
          label: Node.js
          source: |-
            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);
        - lang: php
          label: PHP
          source: |-
            <?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;
        - lang: python
          label: Python
          source: |-
            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())
        - lang: ruby
          label: Ruby
          source: >-
            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
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n)\n\nfunc main() {\n\treq, err := http.NewRequest(\"GET\", \"https://makeseamless.com/v1/me\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"x-api-key\", \"smls_your_api_key\")\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;

            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());
        - lang: csharp
          label: .NET
          source: >-
            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());
        - lang: bash
          label: cURL
          source: |-
            curl -X GET "https://makeseamless.com/v1/me" \
              -H "x-api-key: smls_your_api_key"
components:
  schemas:
    Me:
      type: object
      additionalProperties: false
      required:
        - account_id
        - email
        - plan
        - tier
        - interval
        - subscription_status
        - unlimited
        - credits
        - period_credits
        - credits_used_this_period
        - current_period_start
        - current_period_end
      properties:
        account_id:
          type: string
        email:
          type:
            - string
            - 'null'
        plan:
          $ref: '#/components/schemas/PlanName'
        tier:
          type:
            - integer
            - 'null'
          description: The Pro tier (its monthly credits); null on other plans.
        interval:
          type:
            - string
            - 'null'
          enum:
            - month
            - year
            - null
        subscription_status:
          type:
            - string
            - 'null'
          description: >-
            The subscription's status: `active`, `past_due`, `cancelled`,
            `incomplete`, `expired`, `unpaid` or `paused`; null without one. The
            plan is Pro while it is `active` or `past_due`.
        unlimited:
          type: boolean
          description: True when fixes cost no credit.
        credits:
          $ref: '#/components/schemas/Credits'
        period_credits:
          type:
            - integer
            - 'null'
          description: >-
            The plan's allowance; for a monthly plan the plan credits each paid
            invoice sets, for a yearly plan the year's credits as written (plan
            credits left plus used this period, so credits an upgrade carried in
            count); null off Pro.
        credits_used_this_period:
          type: integer
          minimum: 0
          description: Plan credits spent since the last paid invoice.
        current_period_start:
          type:
            - string
            - 'null'
          format: date-time
        current_period_end:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            When the plan renews, or ends when a cancellation is set; null off
            Pro.
    PlanName:
      type: string
      enum:
        - free
        - pro
        - enterprise
    Credits:
      type: object
      additionalProperties: false
      required:
        - subscription
        - bonus
        - topup
        - total
      description: Credits left by kind, in the order fixes spend them.
      properties:
        subscription:
          type: integer
          minimum: 0
        bonus:
          type: integer
          minimum: 0
          description: Signup credits.
        topup:
          type: integer
          minimum: 0
        total:
          type: integer
          minimum: 0
    Error:
      type: object
      additionalProperties: false
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
    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}`.'
    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`.
  responses:
    AuthRequired:
      description: |
        No API key, or one that is revoked or unknown (`auth_required`).
      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.