71trust / 100

Garment Draft

by Garment-Pattern Engineer in Markets & finance

x402 APIPassing, checked 7 h ago

Draft a made-to-measure sewing pattern from a pinned freesewing design (aaron, bruce, teagan, simon, hugo, wahid, bella, sven) using your measurements and design options, run fit/seam-allowance checks, lay pieces out on your fabric width with a bounding-box marker, and return a fabric-yield report plus downloadable pattern, layout, cutlist and piece artifacts. Freesewing designs are CC-BY (freesewing.org); this service adds drafting, layout, and reporting.

POST
https://garment.api.williamrobinson.dev/v1/garment/draft
Price
$0.1
per call in USDC
Uptime
96.8%
last 30 days
Response time
765 ms
964 ms slowest 5%
Last check
Passed
7 h ago, next any minute now

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Status and outage history · Atom feed · Watch with other listings

How to call it

POST https://garment.api.williamrobinson.dev/v1/garment/draft

Each call costs $0.1 in USDC on Base, paid with the request over x402.

Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.

Example request

From the listing.

POST https://garment.api.williamrobinson.dev/v1/garment/draft
content-type: application/json

{
  "design": "aaron",
  "fabric": {
    "folded": true,
    "gapMm": 10,
    "widthMm": 1500
  },
  "measurements": {
    "biceps": 300,
    "chest": 1000,
    "hips": 1030,
    "hpsToBust": 320,
    "hpsToWaistBack": 420,
    "neck": 380,
    "shoulderSlope": 13,
    "shoulderToShoulder": 400,
    "waistToArmpit": 220,
    "waistToHips": 200
  },
  "options": {
    "chestEase": 10,
    "hipsEase": 12,
    "lengthBonus": 15
  },
  "saMm": 10
}

Parameters

ParameterTypeRequiredDescription
designstringYesaaron (v4.10.1): requires biceps, chest, hpsToBust, hpsToWaistBack, neck, shoulderToShoulder, shoulderSlope, waistToArmpit, waistToHips, hips; optional highBust; options chestEase:pct[0,20], draftForHighBust:bool, lengthBonus:pct[-20,60], armholeDepth:pct[-10,50], legacyArmholeDepth:bool, hipsEase:… One of: aaron, bruce, teagan, simon, hugo, wahid, bella, sven.
fabricobjectYes
measurementsobjectYesMillimetres for lengths, degrees for angles; keys are the chosen design's required/optional freesewing measurement names.
optionsobjectNoFreesewing design option overrides by name; type and range/enum are validated per the design's option catalog. Fixed-constant options are never settable.
saMmnumberNoSeam allowance, millimetres (0 = none). Default: 10.

Example response

The provider's example. We can't check it without paying.

Example response, 236 lines
{
  "artifacts": [
    {
      "href": "https://garment.api.williamrobinson.dev/v1/garment/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/pattern.svg",
      "mediaType": "image/svg+xml",
      "name": "pattern.svg",
      "sha256": "7fdc2fed33e9e13816bdc135f63dfd9aa355d137a4979c744945d68eb62486cd",
      "sizeBytes": 167624
    },
    {
      "href": "https://garment.api.williamrobinson.dev/v1/garment/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/layout.svg",
      "mediaType": "image/svg+xml",
      "name": "layout.svg",
      "sha256": "9c3272c0cbe195c979d5d47afd99cf58ac77b18a953e17f0438cf8fa3bf5dfd0",
      "sizeBytes": 2336
    },
    {
      "href": "https://garment.api.williamrobinson.dev/v1/garment/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/pieces.json",
      "mediaType": "application/json",
      "name": "pieces.json",
      "sha256": "925703c0e433706e985bc07ef914ea9c34d8c32ddfc93d701502f26dda023770",
      "sizeBytes": 2090
    },
    {
      "href": "https://garment.api.williamrobinson.dev/v1/garment/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/cutlist.csv",
      "mediaType": "text/csv; charset=utf-8",
      "name": "cutlist.csv",
      "sha256": "f847c8039263f44ca3f6d755484de68d7b023c15c5c5f7757f48be905dc74563",
      "sizeBytes": 443
    },
    {
      "href": "https://garment.api.williamrobinson.dev/v1/garment/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/report.json",
      "mediaType": "application/json",
      "name": "report.json",
      "sha256": "3712bddf823468d4b699e8e725cc9b8c7df9499308b8b6aae56a11b725b4789a",
      "sizeBytes": 5949
    }
  ],
  "checks": [
    {
      "code": "DESIGN_SUPPORTED",
      "detail": "\"aaron\" (Aaron A-shirt) is an allowlisted freesewing design",
      "status": "passed"
    },
    {
      "code": "MEASUREMENTS_COMPLETE",
      "detail": "All 10 required measurement(s) are present",
      "status": "passed"
    },
    {
      "code": "MEASUREMENTS_PLAUSIBLE",
      "detail": "Every provided measurement is within its plausible range",
      "status": "passed"
    },
    {
      "code": "OPTIONS_IN_RANGE",
      "detail": "All 3 provided option(s) are in range",
      "status": "passed"
    },
    {
      "code": "DRAFT",
      "detail": "Drafted and rendered without errors in 42.4 ms",
      "status": "passed"
    },
    {
      "code": "PIECES_NONEMPTY",
      "detail": "4 piece(s) drafted",
      "status": "passed"
    },
    {
      "code": "SEAM_ALLOWANCE_APPLIED",
      "detail": "Every piece with seam-allowance geometry used it for its cutting outline; 2 piece(s) are drafted without a seam allowance by the design: aaron.armBinding, aaron.neckBinding",
      "status": "passed"
    },
    {
      "code": "PIECES_FIT_FABRIC",
      "detail": "Every piece fits within the usable fabric width of 750 mm",
      "status": "passed"
    },
    {
      "code": "LAYOUT_PACKED",
      "detail": "4 piece placement(s) packed across 1491.5 mm of fabric length",
      "status": "passed"
    },
    {
      "code": "FABRIC_YIELD",
      "detail": "Utilization 29.6% of the usable fabric area",
      "status": "passed"
    }
  ],
  "design": "aaron",
  "designVersion": "4.10.1",
  "expiresAt": "2026-09-13T14:56:37.143Z",
  "freesewingVersion": "4.10.1",
  "layout": {
    "fabricWidthMm": 1500,
    "folded": true,
    "gapMm": 10,
    "lengthMm": 1491.4860652603518,
    "method": "bbox-shelf",
    "placements": [
      {
        "copy": 1,
        "mirrored": false,
        "onFold": true,
        "piece": "aaron.back",
        "rotationDeg": 0,
        "xMm": 0,
        "yMm": 0
      },
      {
        "copy": 1,
        "mirrored": false,
        "onFold": true,
        "piece": "aaron.front",
        "rotationDeg": 0,
        "xMm": 0,
        "yMm": 750.7430326301759
      },
      {
        "copy": 1,
        "mirrored": true,
        "onFold": false,
        "piece": "aaron.armBinding",
        "rotationDeg": 0,
        "xMm": 293.97999999999996,
        "yMm": 750.7430326301759
      },
      {
        "copy": 1,
        "mirrored": true,
        "onFold": false,
        "piece": "aaron.neckBinding",
        "rotationDeg": 0,
        "xMm": 363.97999999999996,
        "yMm": 750.7430326301759
      }
    ],
    "usableWidthMm": 750,
    "utilization": 0.2958254665958102
  },
  "limitations": [
    "The layout is a bounding-box shelf packing (NFDH), an upper bound on how little fabric a true irregular-shape nesting could use, not a proven optimum or a real marker.",
    "Every freesewing pattern this product drafts is CC-BY licensed by freesewing.org (https://freesewing.org); the drafted geometry is derivative of their designs and must be attributed on redistribution.",
    "This product does not perform freeform pattern changes, full bust adjustments (beyond a design's own `draftForHighBust`/bust-plugin options), or grading tables; it drafts exactly one size from the measurements given.",
    "Measurements and fabric dimensions are metric-only (mm/degrees); no imperial input or output is supported.",
    "A drafted, checked pattern is not a guarantee of fit on a body: no physical prototype or wear test is performed.",
    "The layout, fabric length, and fabric-yield percentage cover only pieces cut from the design's primary shell fabric; a piece that needs a different material (lining, interfacing, ribbing, etc., named in a warning when present) is still reported with its own bbox/area/cut count but is not laid out or included in that yardage."
  ],
  "measurementsApplied": {
    "biceps": 300,
    "chest": 1000,
    "hips": 1030,
    "hpsToBust": 320,
    "hpsToWaistBack": 420,
    "neck": 380,
    "shoulderSlope": 13,
    "shoulderToShoulder": 400,
    "waistToArmpit": 220,
    "waistToHips": 200
  },
  "optionsApplied": {
    "chestEase": 10,
    "hipsEase": 12,
    "lengthBonus": 15
  },
  "pieces": [
    {
      "areaMm2": 133361.34427204923,
      "bboxMm": {
        "heightMm": 740.7430326301759,
        "widthMm": 283.97999999999996
      },
      "cut": 1,
      "hasGrainline": false,
      "material": "fabric",
      "name": "aaron.front",
      "onFold": true,
      "saApplied": true,
      "title": "front"
    },
    {
      "areaMm2": 133361.34427204923,
      "bboxMm": {
        "heightMm": 740.7430326301759,
        "widthMm": 283.97999999999996
      },
      "cut": 1,
      "hasGrainline": false,
      "material": "fabric",
      "name": "aaron.back",
      "onFold": true,
      "saApplied": true,
      "title": "back"
    },
    {
      "areaMm2": 32311.488442599337,
      "bboxMm": {
        "heightMm": 538.5248073766556,
        "widthMm": 60
      },
      "cut": 2,
      "hasGrainline": false,
      "material": "fabric",
      "name": "aaron.armBinding",
      "onFold": false,
      "saApplied": false,
      "title": "aaron:armBinding"
    },
    {
      "areaMm2": 31880.493895896623,
      "bboxMm": {
        "heightMm": 531.3415649316104,
        "widthMm": 60
      },
      "cut": 1,
      "hasGrainline": false,
      "material": "fabric",
      "name": "aaron.neckBinding",
      "onFold": false,
      "saApplied": false,
      "title": "aaron:neckBinding"
    }
  ],
  "saMm": 10,
  "status": "passed",
  "totals": {
    "cutPieces": 5,
    "draftMs": 42.43397900000002,
    "pieceAreaMm2": 629948.8478692923
  },
  "warnings": [
    "Part \"aaron.armBinding\" is drafted without a seam allowance by the design; its cutting outline is the seam line.",
    "Part \"aaron.neckBinding\" is drafted without a seam allowance by the design; its cutting outline is the seam line."
  ]
}

Call it from code

The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.1.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://garment.api.williamrobinson.dev/v1/garment/draft' \
  -H 'content-type: application/json' \
  --data-raw '{"design":"aaron","fabric":{"folded":true,"gapMm":10,"widthMm":1500},"measurements":{"biceps":300,"chest":1000,"hips":1030,"hpsToBust":320,"hpsToWaistBack":420,"neck":380,"shoulderSlope":13,"shoulderToShoulder":400,"waistToArmpit":220,"waistToHips":200},"options":{"chestEase":10,"hipsEase":12,"lengthBonus":15},"saMm":10}'

# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://garment.api.williamrobinson.dev/v1/garment/draft' \
  -H 'content-type: application/json' \
  --data-raw '{"design":"aaron","fabric":{"folded":true,"gapMm":10,"widthMm":1500},"measurements":{"biceps":300,"chest":1000,"hips":1030,"hpsToBust":320,"hpsToWaistBack":420,"neck":380,"shoulderSlope":13,"shoulderToShoulder":400,"waistToArmpit":220,"waistToHips":200},"options":{"chestEase":10,"hipsEase":12,"lengthBonus":15},"saMm":10}' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

// Pays at most $0.1 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.1" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.1 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fgarment.api.williamrobinson.dev%2Fv1%2Fgarment%2Fdraft&method=POST
const res = await pay("https://garment.api.williamrobinson.dev/v1/garment/draft", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "design": "aaron",
    "fabric": {
      "folded": true,
      "gapMm": 10,
      "widthMm": 1500
    },
    "measurements": {
      "biceps": 300,
      "chest": 1000,
      "hips": 1030,
      "hpsToBust": 320,
      "hpsToWaistBack": 420,
      "neck": 380,
      "shoulderSlope": 13,
      "shoulderToShoulder": 400,
      "waistToArmpit": 220,
      "waistToHips": 200
    },
    "options": {
      "chestEase": 10,
      "hipsEase": 12,
      "lengthBonus": 15
    },
    "saMm": 10
  }),
});
console.log(res.status, await res.text());
Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

# Pays at most $0.1 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.1"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.post(
        "https://garment.api.williamrobinson.dev/v1/garment/draft",
        json={
            "design": "aaron",
            "fabric": {
                "folded": True,
                "gapMm": 10,
                "widthMm": 1500,
            },
            "measurements": {
                "biceps": 300,
                "chest": 1000,
                "hips": 1030,
                "hpsToBust": 320,
                "hpsToWaistBack": 420,
                "neck": 380,
                "shoulderSlope": 13,
                "shoulderToShoulder": 400,
                "waistToArmpit": 220,
                "waistToHips": 200,
            },
            "options": {
                "chestEase": 10,
                "hipsEase": 12,
                "lengthBonus": 15,
            },
            "saMm": 10,
        },
    )
    print(res.status_code, res.text)

Security scan

No findings

We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
7 h agoPassed402853 ms$0.1
18 h agoPassed402788 ms$0.1
28 h agoPassed402765 ms$0.1
38 h agoPassed402765 ms$0.1
2 days agoPassed402643 ms$0.1
Show 10 older checks
2 days agoPassed402950 ms$0.1
3 days agoPassed402940 ms$0.1
3 days agoPassed402682 ms$0.1
3 days agoPassed402762 ms$0.1
3 days agoPassed402695 ms$0.1
3 days agoPassed402836 ms$0.1
3 days agoPassed4021.0 s$0.1
4 days agoPassed402964 ms$0.1
4 days agoPassed402847 ms$0.1
4 days agoPassed402744 ms$0.1