Apply deterministic parameter edits to a self-contained OpenSCAD model, verify preserve co
Apply deterministic parameter edits to a self-contained OpenSCAD model, verify preserve constraints against the baseline, slice it with PrusaSlicer, and return checked alternatives (orientations, partial edits) when goals are unmet.
150000 (raw units)
price
1
calls / 30d
1
unique payers
2026-09-11
updated
Provider
prototype.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": {
"edits": [
{
"delta": 10,
"kind": "offset",
"name": "shelf"
}
],
"goals": {
"maxSizeMm": [
220,
220,
250
],
"noSupports": true
},
"maxAlternatives": 3,
"orientationSearch": true,
"parameters": {
"height": 60
},
"preserve": [
{
"axis": "z",
"kind": "bounds_axis",
"toleranceMm": 0.05
}
],
"profile": "fdm-pla-0.4",
"source": "wall = 5; shelf = 40; height = 60; depth = 30;\nunion() {\n cube([wall, depth, height]);\n translate([0, 0, height - wall]) cube([shelf, depth, wall]);\n}\n"
},
"bodyType": "json",
"method": "POST",
"type": "http"
},
"output": {
"example": {
"alternatives": [
{
"artifact": "alternative-1.gcode",
"editFraction": null,
"kind": "orientation",
"meetsAllGoals": true,
"mesh": {
"boundsMm": {
"max": [
50,
1.83697019872103e-15,
30.000000000000004
],
"min": [
0,
-60,
0
],
"size": [
50,
60,
30.000000000000004
]
},
"triangleCount": 20,
"volumeMm3": 15750,
"watertight": true
},
"orientation": "+y",
"parametersApplied": null,
"slice": {
"estimatedPrintTimeMin": 48.06666666666667,
"filamentG": 10.05,
"filamentMm": 3370.97,
"layerCount": 150,
"needsSupport": false,
"supportFilamentMm": 0
}
},
{
"artifact": "alternative-2.gcode",
"editFraction": null,
"kind": "orientation",
"meetsAllGoals": true,
"mesh": {
"boundsMm": {
"max": [
50,
60,
3.67394039744206e-15
],
"min": [
0,
0,
-30
],
"size": [
50,
60,
30.000000000000004
]
},
"triangleCount": 20,
"volumeMm3": 15750,
"watertight": true
},
"orientation": "-y",
"parametersApplied": null,
"slice": {
"estimatedPrintTimeMin": 48.1,
"filamentG": 10.05,
"filamentMm": 3371.2,
"layerCount": 150,
"needsSupport": false,
"supportFilamentMm": 0
}
},
{
"artifact": "alternative-3.gcode",
"editFraction": null,
"kind": "orientation",
"meetsAllGoals": true,
"mesh": {
"boundsMm": {
"max": [
3.061616997868383e-16,
30,
50.00000000000001
],
"min": [
-60,
0,
0
],
"size": [
60,
30,
50.00000000000001
]
},
"triangleCount": 20,
"volumeMm3": 15750,
"watertight": true
},
"orientation": "+x",
"parametersApplied": null,
"slice": {
"estimatedPrintTimeMin": 55.266666666666666,
"filamentG": 9.92,
"filamentMm": 3326.3,
"layerCount": 250,
"needsSupport": false,
"supportFilamentMm": 0
}
}
],
"artifacts": [
{
"href": "https://prototype.api.williamrobinson.dev/v1/prototype/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/revised.scad",
"mediaType": "text/plain; charset=utf-8",
"name": "revised.scad",
"sha256": "6c8f087904109cd19d9a6994a3cfe9eb88d8784730b1f0a4f1e50e41d9a48ab1",
"sizeBytes": 153
},
{
"href": "https://prototype.api.williamrobinson.dev/v1/prototype/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/baseline.stl",
"mediaType": "model/stl",
"name": "baseline.stl",
"sha256": "21dfae091297d772a86b87186a6804950e88b4ca35fc0bd323a979beddb049ad",
"sizeBytes": 1084
},
{
"href": "https://prototype.api.williamrobinson.dev/v1/prototype/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/revised.stl",
"mediaType": "model/stl",
"name": "revised.stl",
"sha256": "81d262c41426000dc34d0da6e2a240a035522d57bc9e7250442a22dba9b2b945",
"sizeBytes": 1084
},
{
"href": "https://prototype.api.williamrobinson.dev/v1/prototype/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/revised.gcode",
"mediaType": "text/plain; charset=utf-8",
"name": "revised.gcode",
"sha256": "1e7175a999f29ec0fedea7a2d247b12df599eea7c54e4649356df2f5f7ef7e24",
"sizeBytes": 737838
},
{
"href": "https://prototype.api.williamrobinson.dev/v1/prototype/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/profile.ini",
"mediaType": "text/plain; charset=utf-8",
"name": "profile.ini",
"sha256": "c69f01a9e2b8aafaf09486afa03a5c2aceffb879d90409b6273a70403c9e4297",
"sizeBytes": 582
},
{
"href": "https://prototype.api.williamrobinson.dev/v1/prototype/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/report.json",
"mediaType": "application/json",
"name": "report.json",
"sha256": "72fd8c40face6f6400b4e6a26e11dff9a26cd4f323ecda5bc89ef256d3d8e269",
"sizeBytes": 7647
},
{
"href": "https://prototype.api.williamrobinson.dev/v1/prototype/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/changes.diff",
"mediaType": "text/x-diff; charset=utf-8",
"name": "changes.diff",
"sha256": "6876ee6a6ac29b7b73885aed99280aeeb238beef5ce6929c5428c337e12ea994",
"sizeBytes": 254
},
{
"href": "https://prototype.api.williamrobinson.dev/v1/prototype/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/alternative-1.gcode",
"mediaType": "text/plain; charset=utf-8",
"name": "alternative-1.gcode",
"sha256": "c4b0c15fa7b5b087e9e8f08b765358f33b899d162c659da0e34d244e3e24646f",
"sizeBytes": 483111
},
{
"href": "https://prototype.api.williamrobinson.dev/v1/prototype/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/alternative-2.gcode",
"mediaType": "text/plain; charset=utf-8",
"name": "alternative-2.gcode",
"sha256": "8d1349486f3965ef380a6a553560d7e5790abed5d162a39833d348945e8a65ee",
"sizeBytes": 491287
},
{
"href": "https://prototype.api.williamrobinson.dev/v1/prototype/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/alternative-3.gcode",
"mediaType": "text/plain; charset=utf-8",
"name": "alternative-3.gcode",
"sha256": "81bc546b42fc6bcada971e3cbfc8af154020233f69dbaca207e901c23ef7ab08",
"sizeBytes": 375942
},
{
"href": "https://prototype.api.williamrobinson.dev/v1/prototype/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/preview.png",
"mediaType": "image/png",
"name": "preview.png",
"sha256": "8c760f9b61e1bebd29e64089781b4ba39081dc72325eed7883ff34671eb020a0",
"sizeBytes": 7861
}
],
"baseline": {
"boundsMm": {
"max": [
40,
30,
60
],
"min": [
0,
0,
0
],
"size": [
40,
30,
60
]
},
"triangleCount": 20,
"volumeMm3": 14250,
"watertight": true
},
"changes": [
{
"after": 50,
"before": 40,
"name": "shelf"
}
],
"checks": [
{
"code": "SOURCE_SELF_CONTAINED",
"detail": "No external file-reading OpenSCAD constructs were found",
"status": "passed"
},
{
"code": "PARAMETERS_APPLIED",
"detail": "1 named source parameters were patched",
"status": "passed"
},
{
"code": "EDITS_APPLIED",
"detail": "1 edits were applied in order",
"status": "passed"
},
{
"code": "PRESERVE_PARAMETER",
"detail": "No parameter preserve constraint was requested",
"status": "not_checked"
},
{
"code": "BASELINE_COMPILE",
"detail": "OpenSCAD rendered the baseline model",
"status": "passed"
},
{
"code": "CAD_COMPILE",
"detail": "OpenSCAD rendered the revised model",
"status": "passed"
},
{
"code": "MESH_VALIDITY",
"detail": "Binary STL has finite vertices and no degenerate triangles",
"status": "passed"
},
{
"code": "MESH_WATERTIGHT",
"detail": "Every undirected triangle edge appears exactly twice",
"status": "passed"
},
{
"code": "MESH_ENCLOSED_VOLUME",
"detail": "15750.000 mm³ enclosed volume",
"status": "passed"
},
{
"code": "PRESERVE_BOUNDS",
"detail": "Every preserved axis stayed within its tolerance",
"status": "passed"
},
{
"code": "PRESERVE_VOLUME",
"detail": "No volume preserve constraint was requested",
"status": "not_checked"
},
{
"code": "PRINTER_BED",
"detail": "50.000 × 30.000 × 60.000 mm against 220 × 220 × 250 mm printer bed",
"status": "passed"
},
{
"code": "SLICER",
"detail": "PrusaSlicer produced bounded G-code with the fixed profile",
"status": "passed"
},
{
"code": "EXTRUSION_TOOLPATH",
"detail": "G-code contains at least one extrusion move",
"status": "passed"
},
{
"code": "GOAL_NO_SUPPORTS",
"detail": "Support filament used: 3669.318 mm",
"status": "failed"
},
{
"code": "GOAL_PRINT_TIME",
"detail": "No maxPrintTimeMin goal was requested",
"status": "not_checked"
},
{
"code": "GOAL_FILAMENT",
"detail": "No maxFilamentG goal was requested",
"status": "not_checked"
},
{
"code": "GOAL_FIT",
"detail": "50.000 × 30.000 × 60.000 mm against requested 220 × 220 × 250 mm",
"status": "passed"
},
{
"code": "ORIENTATION_SEARCH",
"detail": "Every orientation candidate needed by the search budget and maxAlternatives was evaluated",
"status": "passed"
},
{
"code": "PREVIEW",
"detail": "Headless OpenSCAD rendered preview.png",
"status": "passed"
}
],
"delta": {
"sizeMm": [
10,
0,
0
],
"volumeMm3": 1500,
"volumePercent": 10.526315789473683
},
"evaluations": [
{
"goals": {
"filament": true,
"fit": true,
"noSupports": false,
"printTime": true
},
"orientation": "+z",
"overhang": {
"bedContactAreaMm2": 150,
"footprintMm": [
50,
30
],
"heightMm": 60,
"overhangAreaMm2": 1350
},
"rotation": {
"xDeg": 0,
"yDeg": 0
},
"slice": {
"estimatedPrintTimeMin": 84.75,
"filamentG": 20.94,
"filamentMm": 7020.67,
"layerCount": 480,
"needsSupport": true,
"supportFilamentMm": 3669.3182300001085
},
"sliced": true
},
{
"goals": null,
"orientation": "-z",
"overhang": {
"bedContactAreaMm2": 1500,
"footprintMm": [
50,
30.000000000000007
],
"heightMm": 60.00000000000001,
"overhangAreaMm2": 0
},
"rotation": {
"xDeg": 180,
"yDeg": 0
},
"slice": null,
"sliced": false
},
{
"goals": {
"filament": true,
"fit": true,
"noSupports": true,
"printTime": true
},
"orientation": "+x",
"overhang": {
"bedContactAreaMm2": 1800,
"footprintMm": [
60,
30
],
"heightMm": 50.00000000000001,
"overhangAreaMm2": 0
},
"rotation": {
"xDeg": 0,
"yDeg": -90
},
"slice": {
"estimatedPrintTimeMin": 55.266666666666666,
"filamentG": 9.92,
"filamentMm": 3326.3,
"layerCount": 250,
"needsSupport": false,
"supportFilamentMm": 0
},
"sliced": true
},
{
"goals": null,
"orientation": "-x",
"overhang": {
"bedContactAreaMm2": 150,
"footprintMm": [
60,
30
],
"heightMm": 50.00000000000001,
"overhangAreaMm2": 1650
},
"rotation": {
"xDeg": 0,
"yDeg": 90
},
"slice": null,
"sliced": false
},
{
"goals": {
"filament": true,
"fit": true,
"noSupports": true,
"printTime": true
},
"orientation": "+y",
"overhang": {
"bedContactAreaMm2": 525,
"footprintMm": [
50,
60
],
"heightMm": 30.000000000000004,
"overhangAreaMm2": 0
},
"rotation": {
"xDeg": 90,
"yDeg": 0
},
"slice": {
"estimatedPrintTimeMin": 48.06666666666667,
"filamentG": 10.05,
"filamentMm": 3370.97,
"layerCount": 150,
"needsSupport": false,
"supportFilamentMm": 0
},
"sliced": true
},
{
"goals": {
"filament": true,
"fit": true,
"noSupports": true,
"printTime": true
},
"orientation": "-y",
"overhang": {
"bedContactAreaMm2": 525,
"footprintMm": [
50,
60
],
"heightMm": 30.000000000000004,
"overhangAreaMm2": 0
},
"rotation": {
"xDeg": -90,
"yDeg": 0
},
"slice": {
"estimatedPrintTimeMin": 48.1,
"filamentG": 10.05,
"filamentMm": 3371.2,
"layerCount": 150,
"needsSupport": false,
"supportFilamentMm": 0
},
"sliced": true
}
],
"expiresAt": "2026-09-13T12:43:55.474Z",
"limitations": [
"The service validates CAD, mesh closure, dimensions, preserve constraints, and slicer output only; it does not verify physical printability, strength, tolerances, or material certification.",
"OpenSCAD coordinates are interpreted as millimetres; no automatic unit conversion is performed.",
"Overhang analysis is a pure 45°-surface-normal geometric heuristic; the needsSupport goal is decided by PrusaSlicer's own automatic support generator, which can disagree with the heuristic.",
"G-code is not byte-deterministic across runs (seam placement jitters by a few microns); only the parsed header metrics are treated as stable.",
"This service charges for every outcome it returns — passed, goals_unmet, or rejected — because CAD compilation, mesh inspection, and slicing work is performed before the outcome is known."
],
"parametersApplied": {
"height": 60
},
"profile": "fdm-pla-0.4",
"recommendations": [
{
"code": "BETTER_ORIENTATION",
"message": "A different axis-aligned orientation meets every requested goal; see the orientation alternatives."
}
],
"requested": {
"goals": {
"filament": true,
"fit": true,
"noSupports": false,
"printTime": true
},
"orientation": "+z",
"overhang": {
"bedContactAreaMm2": 150,
"footprintMm": [
50,
30
],
"heightMm": 60,
"overhangAreaMm2": 1350
},
"rotation": {
"xDeg": 0,
"yDeg": 0
},
"slice": {
"estimatedPrintTimeMin": 84.75,
"filamentG": 20.94,
"filamentMm": 7020.67,
"layerCount": 480,
"needsSupport": true,
"supportFilamentMm": 3669.3182300001085
},
"sliced": true
},
"revised": {
"boundsMm": {
"max": [
50,
30,
60
],
"min": [
0,
0,
0
],
"size": [
50,
30,
60
]
},
"triangleCount": 20,
"volumeMm3": 15750,
"watertight": true
},
"status": "goals_unmet",
"timings": {
"compileMs": 117.91681300000005,
"previewMs": 336.740849,
"searchMs": 487.178505,
"sliceMs": 258.936095,
"totalMs": 1349.33955
},
"tools": {
"openscad": "OpenSCAD version 2021.01",
"slicer": "PrusaSlicer-2.5.0+UNKNOWN based on Slic3r (with GUI support)"
},
"warnings": []
},
"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": {
"edits": {
"default": [],
"description": "Deterministic edits applied in order to a top-level scalar assignment: set a literal, offset a numeric value, or scale it by a positive factor.",
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"kind": {
"const": "set"
},
"name": {
"pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
"type": "string"
},
"value": {
"anyOf": [
{
"description": "Maximum 512 UTF-8 bytes.",
"maxLength": 512,
"type": "string"
},
{
"maximum": 1000000,
"minimum": -1000000,
"type": "number"
},
{
"type": "boolean"
}
]
}
},
"required": [
"kind",
"name",
"value"
]
},
{
"additionalProperties": false,
"properties": {
"delta": {
"maximum": 1000000,
"minimum": -1000000,
"type": "number"
},
"kind": {
"const": "offset"
},
"name": {
"pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
"type": "string"
}
},
"required": [
"kind",
"name",
"delta"
]
},
{
"additionalProperties": false,
"properties": {
"factor": {
"exclusiveMinimum": 0,
"maximum": 1000000,
"type": "number"
},
"kind": {
"const": "scale"
},
"name": {
"pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
"type": "string"
}
},
"required": [
"kind",
"name",
"factor"
]
}
],
"type": "object"
},
"maxItems": 16,
"type": "array"
},
"goals": {
"additionalProperties": false,
"default": {},
"properties": {
"maxFilamentG": {
"maximum": 100000,
"minimum": 0.01,
"type": "number"
},
"maxPrintTimeMin": {
"maximum": 100000,
"minimum": 1,
"type": "number"
},
"maxSizeMm": {
"default": [
220,
220,
250
],
"items": {
"exclusiveMinimum": 0,
"maximum": 1000,
"type": "number"
},
"maxItems": 3,
"minItems": 3,
"type": "array"
},
"noSupports": {
"default": true,
"type": "boolean"
}
},
"type": "object"
},
"maxAlternatives": {
"default": 3,
"maximum": 4,
"minimum": 0,
"type": "integer"
},
"orientationSearch": {
"default": true,
"description": "Evaluate the other five axis-aligned orientations as alternatives.",
"type": "boolean"
},
"parameters": {
"additionalProperties": {
"anyOf": [
{
"description": "Maximum 512 UTF-8 bytes.",
"maxLength": 512,
"type": "string"
},
{
"maximum": 1000000,
"minimum": -1000000,
"type": "number"
},
{
"type": "boolean"
}
]
},
"default": {},
"description": "Overrides must name unique top-level scalar literal assignments, not derived expressions or reserved names.",
"maxProperties": 64,
"propertyNames": {
"pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$"
},
"type": "object"
},
"preserve": {
"default": [],
"description": "Constraints the revision must not violate: an edit must not target a named parameter, a bounding-box axis must stay within a tolerance, or the volume must stay within a percentage.",
"items": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"kind": {
"const": "parameter"
},
"name": {
"pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
"type": "string"
}
},
"required": [
"kind",
"name"
]
},
{
"additionalProperties": false,
"properties": {
"axis": {
"enum": [
"x",
"y",
"z"
],
"type": "string"
},
"kind": {
"const": "bounds_axis"
},
"toleranceMm": {
"default": 0.05,
"maximum": 1000,
"minimum": 0,
"type": "number"
}
},
"required": [
"kind",
"axis"
]
},
{
"additionalProperties": false,
"properties": {
"kind": {
"const": "volume"
},
"tolerancePercent": {
"default": 1,
"maximum": 100,
"minimum": 0,
"type": "number"
}
},
"required": [
"kind"
]
}
],
"type": "object"
},
"maxItems": 16,
"type": "array"
},
"profile": {
"default": "fdm-pla-0.4",
"enum": [
"fdm-pla-0.4",
"fdm-petg-0.4"
],
"type": "string"
},
"source": {
"description": "Self-contained OpenSCAD, interpreted in millimetres; maximum 16 KiB UTF-8. External imports are prohibited.",
"maxLength": 16384,
"minLength": 1,
"type": "string"
}
},
"required": [
"source"
],
"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": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"alternatives": {
"items": {
"additionalProperties": false,
"properties": {
"artifact": {
"anyOf": [
{
"type": "null"
},
{
"enum": [
"alternative-1.gcode",
"alternative-2.gcode",
"alternative-3.gcode",
"alternative-4.gcode"
],
"type": "string"
}
]
},
"editFraction": {
"anyOf": [
{
"type": "null"
},
{
"maximum": 1,
"minimum": 0,
"type": "number"
}
]
},
"kind": {
"enum": [
"orientation",
"partial_edit"
],
"type": "string"
},
"meetsAllGoals": {
"type": "boolean"
},
"mesh": {
"anyOf": [
{
"type": "null"
},
{
"additionalProperties": false,
"properties": {
"boundsMm": {
"additionalProperties": false,
"properties": {
"max": {
"items": {
"type": "number"
},
"maxItems": 3,
"minItems": 3,
"type": "array"
},
"min": {
"items": {
"type": "number"
},
"maxItems": 3,
"minItems": 3,
"type": "array"
},
"size": {
"items": {
"type": "number"
},
"maxItems": 3,
"minItems": 3,
"type": "array"
}
},
"required": [
"min",
"max",
"size"
],
"type": "object"
},
"triangleCount": {
"minimum": 0,
"type": "integer"
},
"volumeMm3": {
"minimum": 0,
"type": "number"
},
"watertight": {
"type": "boolean"
}
},
"required": [
"triangleCount",
"boundsMm",
"volumeMm3",
"watertight"
],
"type": "object"
}
]
},
"orientation": {
"enum": [
"+z",
"-z",
"+x",
"-x",
"+y",
"-y"
],
"type": "string"
},
"parametersApplied": {
"anyOf": [
{
"type": "null"
},
{
"additionalProperties": {
"anyOf": [
{
"description": "Maximum 512 UTF-8 bytes.",
"maxLength": 512,
"type": "string"
},
{
"maximum": 1000000,
"minimum": -1000000,
"type": "number"
},
{
"type": "boolean"
}
]
},
"default": {},
"description": "Overrides must name unique top-level scalar literal assignments, not derived expressions or reserved names.",
"maxProperties": 64,
"propertyNames": {
"pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$"
},
"type": "object"
}
]
},
"slice": {
"additionalProperties": false,
"properties": {
"estimatedPrintTimeMin": {
"minimum": 0,
"type": "number"
},
"filamentG": {
"minimum": 0,
"type": "number"
},
"filamentMm": {
"minimum": 0,
"type": "number"
},
"layerCount": {
"minimum": 0,
"type": "integer"
},
"needsSupport": {
"type": "boolean"
},
"supportFilamentMm": {
"minimum": 0,
"type": "number"
}
},
"required": [
"estimatedPrintTimeMin",
"filamentG",
"filamentMm",
"supportFilamentMm",
"layerCount",
"needsSupport"
],
"type": "object"
}
},
"required": [
"kind",
"artifact",
"orientation",
"parametersApplied",
"editFraction",
"mesh",
"slice",
"meetsAllGoals"
],
"type": "object"
},
"maxItems": 4,
"type": "array"
},
"artifacts": {
"items": {
"additionalProperties": false,
"properties": {
"href": {
"format": "uri",
"type": "string"
},
"mediaType": {
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"name": {
"enum": [
"revised.scad",
"changes.diff",
"baseline.stl",
"revised.stl",
"revised.gcode",
"alternative-1.gcode",
"alternative-2.gcode",
"alternative-3.gcode",
"alternative-4.gcode",
"profile.ini",
"preview.png",
"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": 12,
"type": "array"
},
"baseline": {
"anyOf": [
{
"type": "null"
},
{
"additionalProperties": false,
"properties": {
"boundsMm": {
"additionalProperties": false,
"properties": {
"max": {
"items": {
"type": "number"
},
"maxItems": 3,
"minItems": 3,
"type": "array"
},
"min": {
"items": {
"type": "number"
},
"maxItems": 3,
"minItems": 3,
"type": "array"
},
"size": {
"items": {
"type": "number"
},
"maxItems": 3,
"minItems": 3,
"type": "array"
}
},
"required": [
"min",
"max",
"size"
],
"type": "object"
},
"triangleCount": {
"minimum": 0,
"type": "integer"
},
"volumeMm3": {
"minimum": 0,
"type": "number"
},
"watertight": {
"type": "boolean"
}
},
"required": [
"triangleCount",
"boundsMm",
"volumeMm3",
"watertight"
],
"type": "object"
}
]
},
"changes": {
"items": {
"additionalProperties": false,
"properties": {
"after": {
"anyOf": [
{
"description": "Maximum 512 UTF-8 bytes.",
"maxLength": 512,
"type": "string"
},
{
"maximum": 1000000,
"minimum": -1000000,
"type": "number"
},
{
"type": "boolean"
}
]
},
"before": {
"anyOf": [
{
"description": "Maximum 512 UTF-8 bytes.",
"maxLength": 512,
"type": "string"
},
{
"maximum": 1000000,
"minimum": -1000000,
"type": "number"
},
{
"type": "boolean"
}
]
},
"name": {
"type": "string"
}
},
"required": [
"name",
"before",
"after"
],
"type": "object"
},
"maxItems": 16,
"type": "array"
},
"checks": {
"items": {
"additionalProperties": false,
"properties": {
"code": {
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"detail": {
"maxLength": 4096,
"type": "string"
},
"status": {
"enum": [
"passed",
"failed",
"not_checked"
],
"type": "string"
}
},
"required": [
"code",
"status",
"detail"
],
"type": "object"
},
"maxItems": 32,
"type": "array"
},
"delta": {
"anyOf": [
{
"type": "null"
},
{
"additionalProperties": false,
"properties": {
"sizeMm": {
"items": {
"type": "number"
},
"maxItems": 3,
"minItems": 3,
"type": "array"
},
"volumeMm3": {
"type": "number"
},
"volumePercent": {
"type": "number"
}
},
"required": [
"sizeMm",
"volumeMm3",
"volumePercent"
],
"type": "object"
}
]
},
"evaluations": {
"items": {
"additionalProperties": false,
"properties": {
"goals": {
"anyOf": [
{
"type": "null"
},
{
"additionalProperties": false,
"properties": {
"filament": {
"type": "boolean"
},
"fit": {
"type": "boolean"
},
"noSupports": {
"type": "boolean"
},
"printTime": {
"type": "boolean"
}
},
"required": [
"noSupports",
"printTime",
"filament",
"fit"
],
"type": "object"
}
]
},
"orientation": {
"enum": [
"+z",
"-z",
"+x",
"-x",
"+y",
"-y"
],
"type": "string"
},
"overhang": {
"additionalProperties": false,
"properties": {
"bedContactAreaMm2": {
"minimum": 0,
"type": "number"
},
"footprintMm": {
"items": {
"type": "number"
},
"maxItems": 2,
"minItems": 2,
"type": "array"
},
"heightMm": {
"minimum": 0,
"type": "number"
},
"overhangAreaMm2": {
"minimum": 0,
"type": "number"
}
},
"required": [
"overhangAreaMm2",
"bedContactAreaMm2",
"heightMm",
"footprintMm"
],
"type": "object"
},
"rotation": {
"additionalProperties": false,
"properties": {
"xDeg": {
"type": "number"
},
"yDeg": {
"type": "number"
}
},
"required": [
"xDeg",
"yDeg"
],
"type": "object"
},
"slice": {
"anyOf": [
{
"type": "null"
},
{
"additionalProperties": false,
"properties": {
"estimatedPrintTimeMin": {
"minimum": 0,
"type": "number"
},
"filamentG": {
"minimum": 0,
"type": "number"
},
"filamentMm": {
"minimum": 0,
"type": "number"
},
"layerCount": {
"minimum": 0,
"type": "integer"
},
"needsSupport": {
"type": "boolean"
},
"supportFilamentMm": {
"minimum": 0,
"type": "number"
}
},
"required": [
"estimatedPrintTimeMin",
"filamentG",
"filamentMm",
"supportFilamentMm",
"layerCount",
"needsSupport"
],
"type": "object"
}
]
},
"sliced": {
"type": "boolean"
}
},
"required": [
"orientation",
"rotation",
"overhang",
"slice",
"goals",
"sliced"
],
"type": "object"
},
"maxItems": 6,
"type": "array"
},
"expiresAt": {
"format": "date-time",
"type": "string"
},
"limitations": {
"items": {
"maxLength": 4096,
"type": "string"
},
"maxItems": 16,
"type": "array"
},
"parametersApplied": {
"additionalProperties": {
"anyOf": [
{
"description": "Maximum 512 UTF-8 bytes.",
"maxLength": 512,
"type": "string"
},
{
"maximum": 1000000,
"minimum": -1000000,
"type": "number"
},
{
"type": "boolean"
}
]
},
"default": {},
"description": "Overrides must name unique top-level scalar literal assignments, not derived expressions or reserved names.",
"maxProperties": 64,
"propertyNames": {
"pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$"
},
"type": "object"
},
"profile": {
"enum": [
"fdm-pla-0.4",
"fdm-petg-0.4"
],
"type": "string"
},
"recommendations": {
"items": {
"additionalProperties": false,
"properties": {
"code": {
"maxLength": 128,
"type": "string"
},
"message": {
"maxLength": 4096,
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"maxItems": 32,
"type": "array"
},
"requested": {
"anyOf": [
{
"type": "null"
},
{
"additionalProperties": false,
"properties": {
"goals": {
"anyOf": [
{
"type": "null"
},
{
"additionalProperties": false,
"properties": {
"filament": {
"type": "boolean"
},
"fit": {
"type": "boolean"
},
"noSupports": {
"type": "boolean"
},
"printTime": {
"type": "boolean"
}
},
"required": [
"noSupports",
"printTime",
"filament",
"fit"
],
"type": "object"
}
]
},
"orientation": {
"enum": [
"+z",
"-z",
"+x",
"-x",
"+y",
"-y"
],
"type": "string"
},
"overhang": {
"additionalProperties": false,
"properties": {
"bedContactAreaMm2": {
"minimum": 0,
"type": "number"
},
"footprintMm": {
"items": {
"type": "number"
},
"maxItems": 2,
"minItems": 2,
"type": "array"
},
"heightMm": {
"minimum": 0,
"type": "number"
},
"overhangAreaMm2": {
"minimum": 0,
"type": "number"
}
},
"required": [
"overhangAreaMm2",
"bedContactAreaMm2",
"heightMm",
"footprintMm"
],
"type": "object"
},
"rotation": {
"additionalProperties": false,
"properties": {
"xDeg": {
"type": "number"
},
"yDeg": {
"type": "number"
}
},
"required": [
"xDeg",
"yDeg"
],
"type": "object"
},
"slice": {
"anyOf": [
{
"type": "null"
},
{
"additionalProperties": false,
"properties": {
"estimatedPrintTimeMin": {
"minimum": 0,
"type": "number"
},
"filamentG": {
"minimum": 0,
"type": "number"
},
"filamentMm": {
"minimum": 0,
"type": "number"
},
"layerCount": {
"minimum": 0,
"type": "integer"
},
"needsSupport": {
"type": "boolean"
},
"supportFilamentMm": {
"minimum": 0,
"type": "number"
}
},
"required": [
"estimatedPrintTimeMin",
"filamentG",
"filamentMm",
"supportFilamentMm",
"layerCount",
"needsSupport"
],
"type": "object"
}
]
},
"sliced": {
"type": "boolean"
}
},
"required": [
"orientation",
"rotation",
"overhang",
"slice",
"goals",
"sliced"
],
"type": "object"
}
]
},
"revised": {
"anyOf": [
{
"type": "null"
},
{
"additionalProperties": false,
"properties": {
"boundsMm": {
"additionalProperties": false,
"properties": {
"max": {
"items": {
"type": "number"
},
"maxItems": 3,
"minItems": 3,
"type": "array"
},
"min": {
"items": {
"type": "number"
},
"maxItems": 3,
"minItems": 3,
"type": "array"
},
"size": {
"items": {
"type": "number"
},
"maxItems": 3,
"minItems": 3,
"type": "array"
}
},
"required": [
"min",
"max",
"size"
],
"type": "object"
},
"triangleCount": {
"minimum": 0,
"type": "integer"
},
"volumeMm3": {
"minimum": 0,
"type": "number"
},
"watertight": {
"type": "boolean"
}
},
"required": [
"triangleCount",
"boundsMm",
"volumeMm3",
"watertight"
],
"type": "object"
}
]
},
"status": {
"enum": [
"passed",
"goals_unmet",
"rejected"
],
"type": "string"
},
"timings": {
"additionalProperties": false,
"properties": {
"compileMs": {
"minimum": 0,
"type": "number"
},
"previewMs": {
"minimum": 0,
"type": "number"
},
"searchMs": {
"minimum": 0,
"type": "number"
},
"sliceMs": {
"minimum": 0,
"type": "number"
},
"totalMs": {
"minimum": 0,
"type": "number"
}
},
"required": [
"compileMs",
"sliceMs",
"searchMs",
"previewMs",
"totalMs"
],
"type": "object"
},
"tools": {
"additionalProperties": false,
"properties": {
"openscad": {
"type": "string"
},
"slicer": {
"type": "string"
}
},
"required": [
"openscad",
"slicer"
],
"type": "object"
},
"warnings": {
"items": {
"maxLength": 4096,
"type": "string"
},
"maxItems": 32,
"type": "array"
}
},
"required": [
"status",
"profile",
"tools",
"parametersApplied",
"changes",
"baseline",
"revised",
"delta",
"requested",
"evaluations",
"alternatives",
"checks",
"warnings",
"recommendations",
"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://prototype.api.williamrobinson.dev/v1/prototype/revise" # -> 402 Payment Required, accepts[] lists how to pay # retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid
JavaScript
const res = await fetch("https://prototype.api.williamrobinson.dev/v1/prototype/revise");
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://prototype.api.williamrobinson.dev/v1/prototype/revise")
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/8200.json, and this resource appears in /discovery/resources and /discovery/search.