API reference
Seamless Pattern
Rebuild the seam of a flat pattern so it repeats without a visible join. This is the Pattern Generator tool on the website.
/api/seamless-patternParameters
Send form fields. Poll the task, then download. A failed run refunds the credits and reports seam_join_failed.
- imageUrl / imageRequired
- URL or image file
- JPG, PNG, WebP. Up to 10 MB, max 4096 px long side.
- joinRequired
- both · horizontal · vertical
- Which edges meet. both = all four edges, horizontal = left and right, vertical = top and bottom. No default.
- seamWidth
- narrow · medium · wide
- Default medium. Motifs larger than the seam need a wider band.
- clientRequestId
- your own unique string
- Optional. Makes retries safe: see Task & download.
- dryRun
- true
- Optional. Returns the cost and your balance without charging: see Pricing.
An unknown join or seamWidth returns 400 invalid_preset and nothing is charged.
curl -X POST \
https://printresize.com/api/seamless-pattern \
-H "Authorization: Bearer pr_your_key" \
-F "imageUrl=https://example.com/pattern.png" \
-F "join=both" \
-F "seamWidth=medium"import requests
res = requests.post(
"https://printresize.com/api/seamless-pattern",
headers={"Authorization": "Bearer pr_your_key"},
data={
"imageUrl": "https://example.com/pattern.png",
"join": "both",
"seamWidth": "medium",
},
)
print(res.json())const form = new FormData();
form.set("imageUrl", "https://example.com/pattern.png");
form.set("join", "both");
form.set("seamWidth", "medium");
const res = await fetch("https://printresize.com/api/seamless-pattern", {
method: "POST",
headers: { Authorization: "Bearer pr_your_key" },
body: form,
});
console.log(await res.json());{
"success": true,
"taskId": "f4a2e6c1-...",
"credits": 7
}Source image
Upload one flat, tiled pattern with clean edges and no transparent background, watermark, or blank margin. If motifs are cut off at the edges, trim them off first. The long side can be at most 6 times the short side; a longer image returns 400 unsupported_aspect.
Result size
The result is a PNG of about 1024 px on the short side, and never more than 1536 px on the long side. It keeps the source’s proportions, rounded to a multiple of 16 px. A 4000 × 4000 px source comes back at 1024 × 1024 px; a 3000 × 1000 px source comes back at 1536 × 512 px.
That is a repeat tile, not a print file. To reach print size, send the result to Upscale or Print Resize.
Cost
| Join | Credits | Notes |
|---|---|---|
| All four edges (both) | 7 credits | Seam width does not change the price. |
| Left and right, or top and bottom | 4 credits | Seam width does not change the price. |
