The MeshWeave converter, from your own server. SolidWorks, STEP, Parasolid, IGES, Rhino, STL, OBJ and 3MF in; the format your product needs out. One key, two endpoints, billed by the month. Parts too big for the printer can be split into pieces that fit, and a multi-body file taken apart into one exact file per body. And the Flow API: script flow simulations of your parts, with a Python package.
25 conversions a month free on any account. No card to try it.
Create free account then API keys… in the account menu.
Extras on top of a conversion (Fine or Ultra detail, repair, a larger triangle budget) are paid in credits, as on the pricing page; each API plan includes credits every month, and each key has its own credit ceiling.
POST /api/convert with the file and a target_format. The answer is 202 with a job id.GET /api/convert-job/<id> until it is not 202. A 200 is the converted file.curl -s https://meshweave.app/api/convert \
-H "Authorization: Bearer $MESHWEAVE_API_KEY" \
-F file=@bracket.step \
-F target_format=stl
# 202 {"job": "3f9c0a1e5b7d2c4e6a8f0b1d"}curl -s -o bracket.stl -w "%{http_code}\n" \
-H "Authorization: Bearer $MESHWEAVE_API_KEY" \
https://meshweave.app/api/convert-job/3f9c0a1e5b7d2c4e6a8f0b1d
# 202 while it runs; 200 with the file when done; 4xx/5xx with {"detail": "..."} if notimport os, time, httpx
API = "https://meshweave.app"
HEAD = {"Authorization": f"Bearer {os.environ['MESHWEAVE_API_KEY']}"}
def convert(path: str, target: str) -> bytes:
with httpx.Client(base_url=API, headers=HEAD, timeout=60, follow_redirects=False) as c:
with open(path, "rb") as f:
r = c.post("/api/convert", files={"file": f}, data={"target_format": target})
r.raise_for_status()
job = r.json()["job"]
deadline = time.time() + 600
while time.time() < deadline:
r = c.get(f"/api/convert-job/{job}")
if r.status_code == 202:
time.sleep(2)
continue
if r.status_code == 200:
return r.content
raise RuntimeError(r.json().get("detail", r.text))
raise TimeoutError(job)POST /api/convertMultipart form. file (required), target_format (required, e.g. stl, step, 3mf), and the same options the converter page offers: quality (standard, fine, ultra), repair (1), target_release (a SolidWorks year, for SLDPRT out). Always answers 202 {"job": id} or an error; it never holds the connection while it converts.
GET /api/convert-job/<id>202 {"status": "running", "elapsed": s} while it runs; 200 with the file (its name in Content-Disposition) when done; the conversion's error when not. Results are kept for a short while, then deleted.
POST /api/splitCuts a part into pieces that fit a printer, as a job like /api/convert. Multipart form: file (STEP, IGES, Parasolid, SLDPRT, STL, OBJ, 3MF or PLY), target_format (stl, obj, 3mf, ply, step or iges), and exactly one of:
max_mm: the longest a piece may be in any direction. Every side of the part longer than that is cut into the fewest equal parts that fit, so every piece fits a cube of that size. A 400 mm part at max_mm=324 is two pieces of 200 mm; a 345 × 5 × 381 mm part at max_mm=300 is four of 172.5 × 5 × 190.5 mm.pieces (2 to 24) with axis (longest, x, y or z): equal pieces along that axis.plane: JSON {"origin": [x, y, z], "normal": [nx, ny, nz]} in mm, for one cut anywhere, at any angle.Every piece is closed where it was cut, so it prints as a solid. The result is a zip of the pieces and manifest.json: for each piece its bounding box ( bbox_mm), volume_mm3, watertight, valid (watertight is the delivered file's own: every shell of a STEP or IGES piece closed, every edge of a mesh piece shared by two triangles; brep_closed and mesh_watertight give both for a piece cut from a solid), the area of each cut face (cap_area_mm2) and, with max_mm, whether it fits in a cube of that size ( all_fit for the whole set); and every set of cuts in cuts_mm (axis, normal, at_mm). A mesh must enclose a volume to be cut; send it to /api/convert with repair=1 first if it does not. One conversion is counted per piece delivered; a split that fails counts nothing.
curl -s https://meshweave.app/api/split \
-H "Authorization: Bearer $MESHWEAVE_API_KEY" \
-F file=@frame.step \
-F target_format=stl \
-F max_mm=324
# 202 {"job": "..."}; poll /api/convert-job/<id> as above. The 200 is a zip:
# frame_piece1.stl, frame_piece2.stl, manifest.jsonPOST /api/componentsTakes a multi-body file apart: every body as its own file, with its geometry unchanged. Multipart form: file (STEP, STL, OBJ, 3MF or PLY), placement (placed, the default: each body where the file puts it; or origin: each body in its own part's coordinates), and list_only=1 for the list without the files. A job like /api/convert.
manifest.json lists every body: name, file, volume_mm3, area_mm2, bbox_mm, faces, solid, valid, colour, instance_of (the part an assembly component is a copy of), and group with group_size: bodies identical up to a move or a rotation share a group, so eight copies of one bracket are one group of eight. For STEP, as_written is true when the body's file was copied exactly from the source; false means that body could not be, and was rebuilt instead (still a B-rep, never a mesh, but the reader may have tidied it), with as_written_why saying why in numbers. One conversion is counted per body file delivered; a list counts nothing, and a job that fails counts nothing.
curl -s https://meshweave.app/api/components \
-H "Authorization: Bearer $MESHWEAVE_API_KEY" \
-F file=@fixtures.step \
-F list_only=1 # drop this line to get the files
# 202 {"job": "..."}; poll /api/convert-job/<id>. With list_only=1 the 200 is
# manifest.json; without it, a zip of one .step per body plus manifest.jsonGET /api/convert/formatsEvery input format and what it can become.
GET /api/api-usageThis month: used, included, hardCap, overage, inflightLimit. The same count rides on every API answer as X-MeshWeave-Quota-Used, -Included and -Limit.
The live list is at GET /api/convert/formats.
Every error has a JSON body {"detail": "..."} written for a person: log it or show it.
400 | The file or the format pair cannot be converted; or a key was sent in a URL (that key is then marked exposed). |
401 | The key is not valid, has expired or was revoked. |
402 | The month’s limit for the plan is reached, or the key’s credit ceiling for extras. |
403 | The key may not call this path, the request came from an address off the key’s list, or from a web page. |
404 | No such job, or it belongs to another account. |
409 | The file needs a choice first (several bodies, a triangle budget); the body says which. |
422 | A split cannot be made as asked: the plane misses the part, or a mesh does not enclose a volume. Or a file holds no bodies to take apart. |
413 | The file is larger than the plan converts. |
429 | Too many requests a minute, or too many conversions running at once. Wait for Retry-After. |
Everything the Flow workspace does for a part, from your own code: make a project from a part, name its openings, get a price at each depth, run, follow it, and fetch the result, the 3-D field and the PDF report. Runs are billed in credits, the same as in the app, and each key has its own credit ceiling. Make a key with scope Flow API under API keys… in the account menu. The Flow API is part of the engineering tools, so the account needs them switched on.
# 1. A part (STL, millimetres) becomes a project. The same part again returns that project.
curl -s https://meshweave.app/api/v1/projects \
-H "Authorization: Bearer $MESHWEAVE_API_KEY" -F file=@duct.stl
# {"projectId": "8c1e...", "name": "duct", "existing": false, "part": {...}}
# 2. Openings and roles: a point (mm) on each opening, and what sets the flow.
curl -s -X PUT https://meshweave.app/api/v1/projects/8c1e.../setup \
-H "Authorization: Bearer $MESHWEAVE_API_KEY" -H "Content-Type: application/json" \
-d '{"inlets": [{"at": [-30, 0, 0]}], "outlets": [{"at": [30, 0, 0]}], "flowLmin": 5}'
# 3. The price at each depth (free). 202 + ticket while it is being worked out.
curl -s -X POST https://meshweave.app/api/v1/projects/8c1e.../quote \
-H "Authorization: Bearer $MESHWEAVE_API_KEY"
# {"quoteId": "5d0f...", "depths": {"quick": {"ok": true, "credits": 6, "minutes": 9}, ...}}
# 4. Run at one depth, charged from that quote; then poll it.
curl -s https://meshweave.app/api/v1/projects/8c1e.../runs \
-H "Authorization: Bearer $MESHWEAVE_API_KEY" -H "Content-Type: application/json" \
-d '{"quoteId": "5d0f...", "depth": "quick"}'
curl -s https://meshweave.app/api/v1/runs/<runId> -H "Authorization: Bearer $MESHWEAVE_API_KEY"
curl -s -o report.pdf https://meshweave.app/api/v1/runs/<runId>/report.pdf \
-H "Authorization: Bearer $MESHWEAVE_API_KEY"The meshweave package (MIT, one dependency: httpx) wraps every call with typed results, retries with backoff on 429 and 5xx (never a second run), and a wait()poller. Its examples/quick_run.py runs a synthetic duct end to end.
pip install "git+https://github.com/Kansu-dot-io/meshweave.git#subdirectory=sdk/python"
from meshweave import Client, Setup
with Client() as mw: # key from MESHWEAVE_API_KEY
project = mw.create_project("duct.stl")
mw.set_setup(project.project_id,
Setup(inlets=[(-30, 0, 0)], outlets=[(30, 0, 0)], flow_l_min=5))
quote = mw.quote(project.project_id) # waits while it is priced
run = mw.wait(mw.run(project.project_id, quote, depth="quick").run_id)
print(run.numbers["dp_pa"], "Pa")
open("report.pdf", "wb").write(mw.report_pdf(run.run_id))POST /api/v1/projectsMultipart file (STL, mm) and an optional name. Returns the project; the same part again returns its project (existing: true), so a new run never needs a new project. A CAD file is converted to STL first (Conversion API, or in the app).
GET /api/v1/projects/<id>Name, the part’s triangles and box (bboxMm), its setup and its runs.
PUT /api/v1/projects/<id>/setupinlets and outlets: lists of {"at": [x, y, z]}, a point in mm on each opening. Name one side and every other opening is the other side; name both and an opening named neither stays closed. Exactly one of flowLmin (L/min), exitVelocity (m/s) or fan {pShutoffPa, qFreeLmin, name}. fluid (air or water), tempC.
POST /api/v1/projects/<id>/quoteFree. depths.quick, .standard and .indepth, each with ok, credits, creditsLow, minutes and minutesHigh, or the reason it is not offered for this case; the openings found, with the role each will get; quoteId, good for one run within expiresInS. A 202 {pending, ticket, retryAfterS} means it is still being worked out.
GET /api/v1/quotes/<ticket>The same answer, once a slow quote is ready.
POST /api/v1/projects/<id>/runsJSON {quoteId, depth}: quick (steady), standard (time-accurate, unsteady) or indepth (time-accurate, resolving the large eddies). Charged from the quote, never more; the difference comes back if the run uses less. Returns runId.
GET /api/v1/runs/<id>status: queued, running, done, failed, cancelled or expired (finished, and its result since deleted); stage, progress and elapsedS while it runs; numbers (pressure drop, flow, speeds, convergence) once done; reason when it failed.
GET /api/v1/runs/<id>/resultThe finished run’s full result JSON, the numbers the app shows.
GET /api/v1/runs/<id>/fieldThe solved 3-D field, binary: "MWF1", u32 header length, header JSON (dims, origin, pitch_mm, fields with units), u32 mask length, the fluid mask bit-packed in C order, then float32 values per fluid cell for each field. ?fields=speed,p,ux,uy,uz picks them. The Python package decodes it (decode_field).
GET /api/v1/runs/<id>/report.pdfThe run’s engineering report, written from the run’s own record.
DELETE /api/v1/runs/<id>Cancel. A run that has not started is refunded at once (refunded: true); a running one stops at its next checkpoint and is charged only for what it used.
GET /api/v1/usageThe account’s credits, and this key’s ceiling, credits spent and this month’s credits and calls.
Lengths are millimetres in the part's own coordinates. Errors are the same {"detail": "..."} as above; 402 is the account's credits or the key's ceiling, 409 a step missing (no setup yet) or a quote already used or over an hour old. A part sent here is kept as a project in your account, like one opened in the app, until you delete it there.
/api/v1/ and nothing else. Neither can reach your files, billing, account or other keys.Authorization: Bearer <key>. A key found in a URL is refused and marked exposed, because URLs are logged.Origin is refused: a key in a web page can be read by anyone who opens it.See also the privacy policy, the terms and the refund policy.