Compile a structured product-label spec (dimensions, EU FIC or US FDA ruleset, ingredients
Compile a structured product-label spec (dimensions, EU FIC or US FDA ruleset, ingredients/allergens, nutrition, GS1 barcode, brand style) into a deterministic print-ready PDF with trim/bleed/safe boxes and embedded fonts, an SVG proof, a dieline, and a report auditing x-height legibility, allergen emphasis, nutrition order, and barcode check digits/quiet zones. Not a legal review of packaging compliance.
150000 (raw units)
price
1
calls / 30d
1
unique payers
2026-09-11
updated
Provider
label.api.williamrobinson.dev · discovered, not yet claimed by its owner
Payment (x402 accepts[])
[
{
"scheme": "exact",
"network": "eip155:8453",
"payTo": "0x26026370fe8b2bb17af9092a17691c76519366da",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "150000",
"maxTimeoutSeconds": 300
}
]Output schema
{
"bazaar": {
"info": {
"input": {
"body": {
"barcode": {
"data": "5901234123457",
"humanReadable": true,
"symbology": "ean13"
},
"format": {
"bleedMm": 2,
"cornerRadiusMm": 3,
"heightMm": 60,
"safeMm": 2,
"widthMm": 100
},
"ingredients": [
{
"allergen": true,
"text": "Wheat flour"
},
{
"allergen": false,
"text": "Sunflower oil"
},
{
"allergen": false,
"text": "Sourdough culture"
},
{
"allergen": false,
"text": "Sea salt"
},
{
"allergen": true,
"text": "Sesame seeds"
}
],
"nutrition": {
"basis": "100g",
"carbohydrateG": 68.5,
"energyKcal": 442,
"energyKj": 1850,
"fatG": 14.2,
"fibreG": 3.4,
"proteinG": 10.6,
"saltG": 1.2,
"saturatesG": 1.8,
"sugarsG": 2.1
},
"product": {
"brand": "Stonebake",
"business": {
"address": "14 Mill Lane, Bristol BS1 4ST, United Kingdom",
"name": "Stonebake Bakery Ltd"
},
"dateLine": "Best before: see lid",
"description": "Crisp sourdough crackers baked with stone-milled wheat flour.",
"name": "Stonebake Sourdough Crackers",
"netQuantity": {
"unit": "g",
"value": 150
},
"origin": "Baked in Italy",
"storage": "Store in a cool, dry place. Reseal after opening."
},
"ruleset": "eu-fic",
"style": {
"accent": {
"rgb": "#8a3b12"
},
"background": {
"rgb": "#ffffff"
},
"fontFamily": "liberation-sans",
"text": {
"rgb": "#000000"
}
},
"warnings": [
"May contain traces of milk."
]
},
"bodyType": "json",
"method": "POST",
"type": "http"
},
"output": {
"example": {
"allergens": {
"detectedUnmarked": [],
"marked": [
"Wheat flour",
"Sesame seeds"
]
},
"artifacts": [
{
"href": "https://label.api.williamrobinson.dev/v1/label/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/label.pdf",
"mediaType": "application/pdf",
"name": "label.pdf",
"sha256": "20361c4fe6d39dfdc1c9dc7af8b44ef2022c178a6934170fda56863dbc642d45",
"sizeBytes": 23309
},
{
"href": "https://label.api.williamrobinson.dev/v1/label/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/label.svg",
"mediaType": "image/svg+xml",
"name": "label.svg",
"sha256": "b664f2085d9bbb0da3438681f726fd2e168cf9bc29fb8e4d5848890fdfdc5eaa",
"sizeBytes": 5472
},
{
"href": "https://label.api.williamrobinson.dev/v1/label/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/proof.png",
"mediaType": "image/png",
"name": "proof.png",
"sha256": "18debfc496d9ea19cb5b0455faf7524c88884b28d161f4b33396640c1ba17e0b",
"sizeBytes": 154380
},
{
"href": "https://label.api.williamrobinson.dev/v1/label/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/dieline.svg",
"mediaType": "image/svg+xml",
"name": "dieline.svg",
"sha256": "d36b7424a763ec866f7f71eabbf6205e0949794ba8bc6a14fb3bc1e15a7ef44c",
"sizeBytes": 609
},
{
"href": "https://label.api.williamrobinson.dev/v1/label/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/report.json",
"mediaType": "application/json",
"name": "report.json",
"sha256": "7c1f3db881e8538063b3925a7c5066db13f26aa0c77a06dfff5c1eaf421d7ebc",
"sizeBytes": 8226
}
],
"barcode": {
"checkDigitValid": true,
"data": "5901234123457",
"heightMm": 22.400000000000002,
"magnification": 0.8753016894609815,
"moduleMm": 0.28884955752212393,
"quietZoneLeftMm": 3.1773451327433633,
"quietZoneRightMm": 2.0219469026548675,
"symbology": "ean13",
"truncated": true,
"widthMm": 32.64
},
"checks": [
{
"code": "RULESET_SUPPORTED",
"detail": "\"eu-fic\" is a supported ruleset",
"status": "passed"
},
{
"code": "MANDATORY_BLOCKS",
"detail": "Every mandatory particular for \"eu-fic\" is present: product name, net quantity, business name/address, date line",
"status": "passed"
},
{
"code": "ALLERGEN_EMPHASIS",
"detail": "Every allergen keyword match in the ingredient list is marked allergen: true",
"status": "passed"
},
{
"code": "NUTRITION_ORDER",
"detail": "Nutrition rendered in the eu-fic declaration order: energy, fat, saturates, carbohydrate, sugars, fibre, protein, salt",
"status": "passed"
},
{
"code": "LOGO_VALID",
"detail": "No logo was supplied",
"status": "not_checked"
},
{
"code": "TEXT_FITS",
"detail": "All mandatory text fits within the safe area at or above the legal minimum text size, with no line wider than its column",
"status": "passed"
},
{
"code": "MIN_X_HEIGHT",
"detail": "Every mandatory text box meets or exceeds its 0.9 mm x-height floor",
"status": "passed"
},
{
"code": "SAFE_ZONE",
"detail": "Every drawn element, including ink extents and the barcode column, stays within the 2 mm safe zone",
"status": "passed"
},
{
"code": "NUTRITION_FORMAT",
"detail": "Nutrition declared in tabular format with the values aligned (FIC Art. 34(2))",
"status": "passed"
},
{
"code": "NET_QUANTITY_PLACEMENT",
"detail": "Only enforced under us-fda (21 CFR 101.105(f))",
"status": "not_checked"
},
{
"code": "BARCODE_VALID",
"detail": "Check digit valid for \"5901234123457\"",
"status": "passed"
},
{
"code": "BARCODE_MAGNIFICATION",
"detail": "Magnification 0.88x",
"status": "passed"
},
{
"code": "BARCODE_QUIET_ZONE",
"detail": "Quiet zones drawn: 3.18 mm left, 2.02 mm right",
"status": "passed"
},
{
"code": "QR_MODULE_SIZE",
"detail": "Only applies to 2D symbologies",
"status": "not_checked"
},
{
"code": "CONTRAST",
"detail": "Contrast ratio 7.73:1 meets the 4.5:1 target",
"status": "passed"
},
{
"code": "GLYPH_COVERAGE",
"detail": "Every character is covered by liberation-sans",
"status": "passed"
},
{
"code": "FONTS_EMBEDDED",
"detail": "2 embedded TrueType font program(s) found (regular + bold)",
"status": "passed"
},
{
"code": "PDF_BOXES",
"detail": "TrimBox and BleedBox are present in the generated PDF",
"status": "passed"
}
],
"contrast": {
"accentOnBackground": 7.73487762982462,
"textOnBackground": 21
},
"expiresAt": "2026-09-13T17:27:50.368Z",
"fonts": {
"bold": "LiberationSans-Bold.ttf",
"family": "liberation-sans",
"regular": "LiberationSans-Regular.ttf"
},
"format": {
"areaCm2": 60,
"bleedMm": 2,
"cornerRadiusMm": 3,
"heightMm": 60,
"safeMm": 2,
"smallPack": true,
"widthMm": 100
},
"layout": [
{
"block": "header.brand",
"bold": true,
"fontSizePt": 7.5,
"heightMm": 2.955891927083333,
"lines": 1,
"widthMm": 96,
"xHeightMm": 1.3978474934895833,
"xMm": 4,
"yMm": 4
},
{
"block": "header.name",
"bold": true,
"fontSizePt": 12.5,
"heightMm": 4.926486545138888,
"lines": 1,
"widthMm": 96,
"xHeightMm": 2.329745822482639,
"xMm": 4,
"yMm": 7.255891927083333
},
{
"block": "header.description",
"bold": false,
"fontSizePt": 6.5,
"heightMm": 2.561773003472222,
"lines": 1,
"widthMm": 96,
"xHeightMm": 1.211467827690972,
"xMm": 4,
"yMm": 12.482378472222223
},
{
"block": "body.ingredients",
"bold": false,
"fontSizePt": 6.5,
"heightMm": 4.969481336805556,
"lines": 2,
"widthMm": 59.56959149810366,
"xHeightMm": 1.211467827690972,
"xMm": 4,
"yMm": 16.344151475694446
},
{
"block": "body.nutrition",
"bold": false,
"fontSizePt": 6.5,
"heightMm": 21.82343967013889,
"lines": 9,
"widthMm": 59.56959149810366,
"xHeightMm": 1.211467827690972,
"xMm": 4,
"yMm": 21.613632812500004
},
{
"block": "body.nutrition.values",
"bold": false,
"fontSizePt": 6.5,
"heightMm": 21.82343967013889,
"lines": 9,
"widthMm": 59.56959149810366,
"xHeightMm": 1.211467827690972,
"xMm": 4,
"yMm": 21.613632812500004
},
{
"block": "footer.netQuantity",
"bold": true,
"fontSizePt": 5.5,
"heightMm": 2.167654079861111,
"lines": 1,
"widthMm": 59.56959149810366,
"xHeightMm": 1.025088161892361,
"xMm": 4,
"yMm": 44.737072482638894
},
{
"block": "footer.storage",
"bold": false,
"fontSizePt": 5.5,
"heightMm": 2.167654079861111,
"lines": 1,
"widthMm": 59.56959149810366,
"xHeightMm": 1.025088161892361,
"xMm": 4,
"yMm": 47.2047265625
},
{
"block": "footer.origin",
"bold": false,
"fontSizePt": 5.5,
"heightMm": 2.167654079861111,
"lines": 1,
"widthMm": 59.56959149810366,
"xHeightMm": 1.025088161892361,
"xMm": 4,
"yMm": 49.672380642361105
},
{
"block": "footer.business",
"bold": false,
"fontSizePt": 5.5,
"heightMm": 4.204945746527777,
"lines": 2,
"widthMm": 59.56959149810366,
"xHeightMm": 1.025088161892361,
"xMm": 4,
"yMm": 52.14003472222221
},
{
"block": "warnings.0",
"bold": false,
"fontSizePt": 5.5,
"heightMm": 2.167654079861111,
"lines": 1,
"widthMm": 59.56959149810366,
"xHeightMm": 1.025088161892361,
"xMm": 4,
"yMm": 56.644980468749985
}
],
"limitations": [
"This is an automated heuristic compliance check, not a legal review; consult qualified counsel before printing regulated packaging.",
"Allergen detection is a fixed keyword match against ingredient text, not a food-science parser; it can both miss and over-match unusual phrasing.",
"x-height is measured from the embedded font's own OS/2.xHeight metric, which can differ from a caliper measurement of printed type.",
"eu-fic's \"largest surface\" area test and us-fda's principal-display-panel area test both use the label's own trim area as a proxy; a real pack's largest surface may differ.",
"CMYK colours are converted to sRGB with a naive (1-c)(1-k) formula for the SVG/PNG preview, with no ICC profile; the PDF's own CMYK fills are exact and unaffected.",
"The generated PDF is not PDF/X-1a certified: it carries no OutputIntent or ICC profile.",
"Layout uses fixed header/body/footer/barcode-zone templates; no freeform positioning.",
"Only Latin-script text covered by the Liberation Sans/Serif glyph sets is supported; unsupported characters are reported by GLYPH_COVERAGE.",
"us-fda's Nutrition Facts graphic format (21 CFR 101.9(d)) is not verified, only the declared nutrient order.",
"Allergens are emphasised by capitalisation (FIC Art. 21(1)(b) / FALCPA), not bold weight; mixed-weight runs inside one line are not supported."
],
"minimumXHeightMm": 0.9,
"ruleset": "eu-fic",
"status": "passed",
"timings": {
"layoutMs": 22.255515999999943,
"renderMs": 289.43764899999996,
"totalMs": 324.87831199999994
},
"warnings": [
"Barcode height was truncated to 22.40 mm to fit the available space."
]
},
"type": "json"
}
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"body": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"barcode": {
"additionalProperties": false,
"properties": {
"data": {
"description": "Exactly 13 digits (with GS1 check digit) for ean13, exactly 12 for upca; any UTF-8 text up to 512 bytes for qrcode/datamatrix.",
"maxLength": 512,
"minLength": 1,
"type": "string"
},
"humanReadable": {
"default": true,
"description": "Draw the human-readable digits (1D only).",
"type": "boolean"
},
"symbology": {
"enum": [
"ean13",
"upca",
"qrcode",
"datamatrix"
],
"type": "string"
},
"widthMm": {
"description": "Requested symbol width incl. quiet zones; omitted = GS1 nominal / 20 mm for 2D.",
"maximum": 300,
"minimum": 5,
"type": "number"
}
},
"required": [
"symbology",
"data"
],
"type": "object"
},
"format": {
"additionalProperties": false,
"properties": {
"bleedMm": {
"default": 2,
"maximum": 5,
"minimum": 0,
"type": "number"
},
"cornerRadiusMm": {
"default": 0,
"description": "Must not exceed min(widthMm, heightMm) / 2; validated against the format's own dimensions.",
"minimum": 0,
"type": "number"
},
"heightMm": {
"description": "Trim height, millimetres.",
"maximum": 400,
"minimum": 20,
"type": "number"
},
"safeMm": {
"default": 2,
"description": "Inside the trim; mandatory text never enters it.",
"maximum": 10,
"minimum": 0,
"type": "number"
},
"widthMm": {
"description": "Trim width, millimetres.",
"maximum": 400,
"minimum": 20,
"type": "number"
}
},
"required": [
"widthMm",
"heightMm"
],
"type": "object"
},
"ingredients": {
"items": {
"additionalProperties": false,
"properties": {
"allergen": {
"description": "Emphasised in the ingredient list and fed into the allergen-statement/scan checks.",
"type": "boolean"
},
"text": {
"maxLength": 120,
"minLength": 1,
"type": "string"
}
},
"required": [
"text",
"allergen"
],
"type": "object"
},
"maxItems": 200,
"type": "array"
},
"nutrition": {
"additionalProperties": false,
"properties": {
"addedSugarsG": {
"maximum": 100000,
"minimum": 0,
"type": "number"
},
"basis": {
"enum": [
"100g",
"100ml",
"serving"
],
"type": "string"
},
"carbohydrateG": {
"maximum": 100000,
"minimum": 0,
"type": "number"
},
"cholesterolMg": {
"maximum": 100000,
"minimum": 0,
"type": "number"
},
"energyKcal": {
"maximum": 100000,
"minimum": 0,
"type": "number"
},
"energyKj": {
"maximum": 100000,
"minimum": 0,
"type": "number"
},
"fatG": {
"maximum": 100000,
"minimum": 0,
"type": "number"
},
"fibreG": {
"maximum": 100000,
"minimum": 0,
"type": "number"
},
"proteinG": {
"maximum": 100000,
"minimum": 0,
"type": "number"
},
"saltG": {
"maximum": 100000,
"minimum": 0,
"type": "number"
},
"saturatesG": {
"maximum": 100000,
"minimum": 0,
"type": "number"
},
"servingSize": {
"maxLength": 40,
"minLength": 1,
"type": "string"
},
"sodiumMg": {
"maximum": 100000,
"minimum": 0,
"type": "number"
},
"sugarsG": {
"maximum": 100000,
"minimum": 0,
"type": "number"
},
"transFatG": {
"maximum": 100000,
"minimum": 0,
"type": "number"
}
},
"required": [
"basis"
],
"type": "object"
},
"product": {
"additionalProperties": false,
"properties": {
"brand": {
"maxLength": 120,
"minLength": 1,
"type": "string"
},
"business": {
"additionalProperties": false,
"properties": {
"address": {
"maxLength": 300,
"minLength": 1,
"type": "string"
},
"name": {
"maxLength": 120,
"minLength": 1,
"type": "string"
}
},
"required": [
"name",
"address"
],
"type": "object"
},
"dateLine": {
"description": "Rendered verbatim, e.g. \"Best before: see base\".",
"maxLength": 80,
"minLength": 1,
"type": "string"
},
"description": {
"maxLength": 400,
"minLength": 1,
"type": "string"
},
"name": {
"maxLength": 120,
"minLength": 1,
"type": "string"
},
"netQuantity": {
"additionalProperties": false,
"properties": {
"unit": {
"enum": [
"g",
"kg",
"ml",
"l",
"oz",
"fl oz",
"lb",
"pcs"
],
"type": "string"
},
"value": {
"exclusiveMinimum": 0,
"maximum": 100000,
"type": "number"
}
},
"required": [
"value",
"unit"
],
"type": "object"
},
"origin": {
"maxLength": 80,
"minLength": 1,
"type": "string"
},
"storage": {
"maxLength": 200,
"minLength": 1,
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"ruleset": {
"description": "eu-fic = EU Reg. 1169/2011 mandatory-particulars/x-height/allergen-emphasis/nutrition-order checks; us-fda = 21 CFR 101 PDP/type-size/FALCPA \"Contains:\"/Nutrition-Facts-order checks; generic = advisory x-height only, no mandatory-particulars checks.",
"enum": [
"eu-fic",
"us-fda",
"generic"
],
"type": "string"
},
"style": {
"additionalProperties": false,
"properties": {
"accent": {
"default": {
"rgb": "#000000"
},
"oneOf": [
{
"additionalProperties": false,
"properties": {
"rgb": {
"pattern": "^#[0-9a-fA-F]{6}$",
"type": "string"
}
},
"required": [
"rgb"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"cmyk": {
"items": {
"maximum": 100,
"minimum": 0,
"type": "number"
},
"maxItems": 4,
"minItems": 4,
"type": "array"
}
},
"required": [
"cmyk"
],
"type": "object"
}
]
},
"background": {
"default": {
"rgb": "#ffffff"
},
"oneOf": [
{
"additionalProperties": false,
"properties": {
"rgb": {
"pattern": "^#[0-9a-fA-F]{6}$",
"type": "string"
}
},
"required": [
"rgb"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"cmyk": {
"items": {
"maximum": 100,
"minimum": 0,
"type": "number"
},
"maxItems": 4,
"minItems": 4,
"type": "array"
}
},
"required": [
"cmyk"
],
"type": "object"
}
]
},
"fontFamily": {
"default": "liberation-sans",
"enum": [
"liberation-sans",
"liberation-serif"
],
"type": "string"
},
"logoHeightMm": {
"default": 10,
"maximum": 50,
"minimum": 3,
"type": "number"
},
"logoPngBase64": {
"contentEncoding": "base64",
"description": "PNG, base64, at most 256 KiB decoded, at most 2000 px per side; checked for a valid PNG signature and re-encoded before embedding.",
"type": "string"
},
"text": {
"default": {
"rgb": "#000000"
},
"oneOf": [
{
"additionalProperties": false,
"properties": {
"rgb": {
"pattern": "^#[0-9a-fA-F]{6}$",
"type": "string"
}
},
"required": [
"rgb"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"cmyk": {
"items": {
"maximum": 100,
"minimum": 0,
"type": "number"
},
"maxItems": 4,
"minItems": 4,
"type": "array"
}
},
"required": [
"cmyk"
],
"type": "object"
}
]
}
},
"type": "object"
},
"warnings": {
"default": [],
"items": {
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"maxItems": 20,
"type": "array"
}
},
"required": [
"format",
"ruleset",
"product"
],
"type": "object"
},
"bodyType": {
"enum": [
"json",
"form-data",
"text"
],
"type": "string"
},
"method": {
"enum": [
"POST"
],
"type": "string"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method",
"bodyType",
"body"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"$defs": {
"check": {
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"detail": {
"maxLength": 4096,
"type": "string"
},
"status": {
"enum": [
"passed",
"failed",
"not_checked"
],
"type": "string"
}
},
"required": [
"code",
"status",
"detail"
],
"type": "object"
},
"textBox": {
"additionalProperties": false,
"properties": {
"block": {
"type": "string"
},
"bold": {
"type": "boolean"
},
"fontSizePt": {
"exclusiveMinimum": 0,
"type": "number"
},
"heightMm": {
"minimum": 0,
"type": "number"
},
"lines": {
"minimum": 0,
"type": "integer"
},
"widthMm": {
"minimum": 0,
"type": "number"
},
"xHeightMm": {
"minimum": 0,
"type": "number"
},
"xMm": {
"type": "number"
},
"yMm": {
"type": "number"
}
},
"required": [
"block",
"xMm",
"yMm",
"widthMm",
"heightMm",
"fontSizePt",
"xHeightMm",
"lines",
"bold"
],
"type": "object"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"allergens": {
"additionalProperties": false,
"properties": {
"detectedUnmarked": {
"items": {
"additionalProperties": false,
"properties": {
"ingredient": {
"type": "string"
},
"term": {
"type": "string"
}
},
"required": [
"ingredient",
"term"
],
"type": "object"
},
"type": "array"
},
"marked": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"marked",
"detectedUnmarked"
],
"type": "object"
},
"artifacts": {
"items": {
"additionalProperties": false,
"properties": {
"href": {
"format": "uri",
"type": "string"
},
"mediaType": {
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"name": {
"enum": [
"label.pdf",
"label.svg",
"proof.png",
"dieline.svg",
"report.json"
],
"type": "string"
},
"sha256": {
"pattern": "^[a-f0-9]{64}$",
"type": "string"
},
"sizeBytes": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"name",
"mediaType",
"sizeBytes",
"sha256",
"href"
],
"type": "object"
},
"maxItems": 5,
"type": "array"
},
"barcode": {
"additionalProperties": false,
"properties": {
"checkDigitValid": {
"type": [
"boolean",
"null"
]
},
"data": {
"type": "string"
},
"heightMm": {
"minimum": 0,
"type": "number"
},
"magnification": {
"type": [
"number",
"null"
]
},
"moduleMm": {
"minimum": 0,
"type": "number"
},
"quietZoneLeftMm": {
"minimum": 0,
"type": "number"
},
"quietZoneRightMm": {
"minimum": 0,
"type": "number"
},
"symbology": {
"enum": [
"ean13",
"upca",
"qrcode",
"datamatrix"
],
"type": "string"
},
"truncated": {
"type": "boolean"
},
"widthMm": {
"minimum": 0,
"type": "number"
}
},
"required": [
"symbology",
"data",
"checkDigitValid",
"moduleMm",
"magnification",
"widthMm",
"heightMm",
"quietZoneLeftMm",
"quietZoneRightMm",
"truncated"
],
"type": [
"object",
"null"
]
},
"checks": {
"items": {
"$ref": "#/properties/output/properties/example/$defs/check"
},
"type": "array"
},
"contrast": {
"additionalProperties": false,
"properties": {
"accentOnBackground": {
"minimum": 0,
"type": "number"
},
"textOnBackground": {
"minimum": 0,
"type": "number"
}
},
"required": [
"textOnBackground",
"accentOnBackground"
],
"type": "object"
},
"expiresAt": {
"format": "date-time",
"type": "string"
},
"fonts": {
"additionalProperties": false,
"properties": {
"bold": {
"type": "string"
},
"family": {
"enum": [
"liberation-sans",
"liberation-serif"
],
"type": "string"
},
"regular": {
"type": "string"
}
},
"required": [
"family",
"regular",
"bold"
],
"type": "object"
},
"format": {
"additionalProperties": false,
"properties": {
"areaCm2": {
"minimum": 0,
"type": "number"
},
"bleedMm": {
"type": "number"
},
"cornerRadiusMm": {
"type": "number"
},
"heightMm": {
"type": "number"
},
"safeMm": {
"type": "number"
},
"smallPack": {
"description": "Trim area below the ruleset's small-pack threshold (EU FIC Art. 13(3): 80 cm²).",
"type": "boolean"
},
"widthMm": {
"type": "number"
}
},
"required": [
"widthMm",
"heightMm",
"bleedMm",
"safeMm",
"cornerRadiusMm",
"areaCm2",
"smallPack"
],
"type": "object"
},
"layout": {
"items": {
"$ref": "#/properties/output/properties/example/$defs/textBox"
},
"type": "array"
},
"limitations": {
"items": {
"maxLength": 4096,
"type": "string"
},
"type": "array"
},
"minimumXHeightMm": {
"minimum": 0,
"type": "number"
},
"ruleset": {
"enum": [
"eu-fic",
"us-fda",
"generic"
],
"type": "string"
},
"status": {
"enum": [
"passed",
"rejected"
],
"type": "string"
},
"timings": {
"additionalProperties": false,
"properties": {
"layoutMs": {
"minimum": 0,
"type": "number"
},
"renderMs": {
"minimum": 0,
"type": "number"
},
"totalMs": {
"minimum": 0,
"type": "number"
}
},
"required": [
"layoutMs",
"renderMs",
"totalMs"
],
"type": "object"
},
"warnings": {
"items": {
"maxLength": 4096,
"type": "string"
},
"type": "array"
}
},
"required": [
"status",
"ruleset",
"format",
"minimumXHeightMm",
"fonts",
"layout",
"barcode",
"allergens",
"contrast",
"checks",
"warnings",
"limitations",
"timings",
"expiresAt",
"artifacts"
],
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
"required": [
"input"
],
"type": "object"
}
},
"builder-code": {
"info": {
"s": [
"cdp_sdk_server"
]
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"a": {
"description": "App builder code",
"pattern": "^[a-z0-9_]{1,32}$",
"type": "string"
},
"s": {
"description": "Service builder codes",
"items": {
"pattern": "^[a-z0-9_]{1,32}$",
"type": "string"
},
"maxItems": 11,
"type": "array"
},
"w": {
"description": "Wallet builder code",
"pattern": "^[a-z0-9_]{1,32}$",
"type": "string"
}
},
"type": "object"
}
},
"eip2612GasSponsoring": {},
"erc20ApprovalGasSponsoring": {},
"payment-identifier": {
"info": {
"required": true
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"id": {
"maxLength": 128,
"minLength": 16,
"pattern": "^[a-zA-Z0-9_-]+$",
"type": "string"
},
"required": {
"type": "boolean"
}
},
"required": [
"required"
],
"type": "object"
}
}
}Use it
curl
curl "https://label.api.williamrobinson.dev/v1/label/compile" # -> 402 Payment Required, accepts[] lists how to pay # retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid
JavaScript
const res = await fetch("https://label.api.williamrobinson.dev/v1/label/compile");
if (res.status === 402) {
const { accepts } = await res.json();
// pay one of accepts[] via an x402 client, then retry with the payment header
}Python
import httpx
res = httpx.get("https://label.api.williamrobinson.dev/v1/label/compile")
if res.status_code == 402:
accepts = res.json()["accepts"]
# pay one of accepts[] via an x402 client, then retry with the payment headerMachine-readable
Everything on this page is also available as clean JSON at /resources/8199.json, and this resource appears in /discovery/resources and /discovery/search.