{"openapi":"3.1.0","info":{"title":"3D Build API","version":"1.1.0","description":"Draw it, squish it, print it. A free 3D maker that runs in the browser, built for fingers on an iPad and for AI agents over MCP. Build exact 3D models (mm) from a JSON parts list. No key needed. Full guide: https://3dbuild.thetempleofdoom.com/llms-full.txt"},"servers":[{"url":"https://3dbuild.thetempleofdoom.com"}],"paths":{"/api/v1":{"get":{"operationId":"getIndex","summary":"Endpoints, rules, schema and examples","responses":{"200":{"description":"OK"}}}},"/api/v1/health":{"get":{"operationId":"health","summary":"Status and version","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"version":{"type":"string","description":"Git short hash of the running code."}}}}}}}}},"/api/v1/parts":{"get":{"operationId":"listParts","summary":"Part types, their parameters, rules and examples","responses":{"200":{"description":"OK"}}}},"/api/v1/models":{"post":{"operationId":"buildModel","summary":"Build a model from a parts list","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Spec"},"example":{"name":"Mug","join":true,"parts":[{"type":"cylinder","d":80,"h":95,"name":"body"},{"type":"cylinder","d":72,"h":95,"at":[0,0,51.5],"op":"cut"},{"type":"torus","d":60,"t":10,"rotate":[90,0,0],"at":[44,0,48]},{"type":"cylinder","d":71,"h":90,"at":[0,0,50],"op":"cut"}]}}}},"responses":{"201":{"description":"Built","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"size_mm":{"type":"array","items":{"type":"number"}},"downloads":{"type":"object","additionalProperties":{"type":"string","format":"uri"}},"open_in_editor":{"type":"string","format":"uri"},"expires":{"type":"string","format":"date"}},"additionalProperties":true}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Short machine-readable reason, for example rate_limited."},"message":{"type":"string","description":"What went wrong, in plain words."}}}}}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Short machine-readable reason, for example rate_limited."},"message":{"type":"string","description":"What went wrong, in plain words."}}}}}}}}}}},"/api/v1/gallery":{"get":{"operationId":"listGallery","summary":"Models people shared and the site owner approved","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parts":{"type":"integer"},"picture":{"type":"string","format":"uri"},"open":{"type":"string","format":"uri"}}}}}}}}}}}},"/api/v1/models/{id}":{"get":{"operationId":"getModel","summary":"Look up a built model and its spec","parameters":[{"name":"id","in":"path","required":true,"description":"Model id returned when it was built (16 hex characters).","schema":{"type":"string","pattern":"^[a-f0-9]{16}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"size_mm":{"type":"array","items":{"type":"number"}},"downloads":{"type":"object","additionalProperties":{"type":"string","format":"uri"}},"open_in_editor":{"type":"string","format":"uri"},"expires":{"type":"string","format":"date"}},"additionalProperties":true}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Short machine-readable reason, for example rate_limited."},"message":{"type":"string","description":"What went wrong, in plain words."}}}}}}}}}}},"/assets/{id}/{file}":{"get":{"operationId":"downloadFile","summary":"Download a model file or picture","parameters":[{"name":"id","in":"path","required":true,"description":"Model id.","schema":{"type":"string"}},{"name":"file","in":"path","required":true,"description":"Which file of the model to download.","schema":{"type":"string","enum":["model.stl","model.glb","model.3mf","model.obj","preview.png","views.png"]}}],"responses":{"200":{"description":"The file"},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Short machine-readable reason, for example rate_limited."},"message":{"type":"string","description":"What went wrong, in plain words."}}}}}}}}}}}},"components":{"schemas":{"Spec":{"type":"object","required":["parts"],"additionalProperties":true,"properties":{"name":{"type":"string","description":"Short name for the model, used as its title."},"parts":{"type":"array","minItems":1,"maxItems":60,"description":"The parts, in build order. Sizes in mm, Z up, floor at z = 0. Call list_parts first for every type and its parameters.","items":{"type":"object","required":["type"],"additionalProperties":true,"properties":{"type":{"type":"string","description":"Part type: box, cylinder, sphere, cone, torus, wedge, tube, plate, pyramid, prism, dome, capsule, star, heart, gear, arch, stairs, extrude, revolve, text or hull. Size parameters (w, d, h, ...) go directly on the part."},"at":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":3,"description":"[x, y] = centre here, resting on the floor. [x, y, z] = centre of the part at this exact point."},"rotate":{"type":"array","items":{"type":"number"},"minItems":3,"maxItems":3,"description":"Degrees about X, Y, Z (applied in that order) before placing."},"op":{"type":"string","enum":["add","cut","intersect"],"description":"add (default), cut this shape out of earlier parts, or keep only the overlap."},"target":{"type":"string","description":"For cut/intersect: the name of the one earlier part to affect. Omit to affect all earlier parts."},"name":{"type":"string","description":"Label for this part."},"color":{"type":"string","description":"Hex colour (#rrggbb) or a simple colour name."},"reshape":{"type":"array","description":"Whole-part deformations applied in order.","items":{"type":"object","required":["kind","amount"],"properties":{"kind":{"type":"string","enum":["twist","taper","bend","bulge"],"description":"Which deformation."},"amount":{"type":"number","description":"twist/bend: degrees. taper: top scale 0.05-3. bulge: -0.9 to 2."}}}},"scale":{"description":"Stretch factor: one number, or [sx, sy, sz].","anyOf":[{"type":"number"},{"type":"array","items":{"type":"number"},"minItems":3,"maxItems":3}]},"mirror":{"type":"string","description":"Also add a mirrored twin across x = 0 (\"x\"), y = 0 (\"y\"), z = 0 (\"z\"), or several (\"xy\")."},"repeat":{"type":"object","description":"Copies: {\"count\": n} evenly round the Z axis, optional \"angle\" (degrees, default 360); or {\"count\": n, \"step\": [dx, dy, dz]} for a straight row.","properties":{"count":{"type":"integer","description":"Total number of copies including the first (1-72)."},"angle":{"type":"number","description":"Total sweep in degrees for copies round the Z axis."},"step":{"type":"array","items":{"type":"number"},"description":"Offset between copies in mm for a straight row."}}},"text":{"type":"string","description":"For type \"text\": the words (capitals, digits, - . ! + / :), up to 40 characters."},"of":{"type":"array","description":"For type \"hull\": the 2-12 parts to wrap a smooth skin around.","items":{"type":"object"}},"round_edges":{"type":"number","description":"Round all edges by this many mm (simple parts only)."},"hollow":{"type":"object","description":"Hollow the part out (simple parts only).","properties":{"wall":{"type":"number","description":"Wall thickness in mm."},"open":{"type":"boolean","description":"Leave the top open, like a cup. Default true."}}},"points":{"type":"array","description":"For extrude: outline [[x,y],...] in mm. For revolve: half profile [[radius,height],...].","items":{"type":"array","items":{"type":"number"}}}}}},"join":{"type":"boolean","description":"Merge all parts into one solid (best for 3D printing). Default false keeps parts and colours separate."},"quality":{"type":"string","enum":["low","medium","high"],"description":"How smooth round shapes are. Default medium."},"formats":{"type":"array","items":{"type":"string","enum":["stl","glb","3mf","obj"]},"description":"Which files to write. Default all four."},"glb_units":{"type":"string","enum":["m","mm"],"description":"GLB scale: metres (standard, default) or raw mm."}}}}}}