STL to GLB API

Convert 3D meshes to web-ready binary glTF with one HTTP request.

STL is what comes out of almost every CAD package and goes into almost every 3D printer — but it is a bare triangle soup with no materials, no scene structure and no compression, and nothing on the web displays it natively. GLB (binary glTF) is the format browsers, <model-viewer>, three.js and AR viewers actually want. This endpoint converts between them server-side.

Example

curl -X POST "https://apimycad.com/v1/mesh?to=glb" \
  -H "X-API-Key: YOUR_KEY" \
  -F "file=@part.stl" \
  -o part.glb

Any direction, not just STL to GLB

One endpoint handles the whole matrix. Upload any supported mesh and set ?to= to whatever you need:

Input formatsOBJ, FBX, STL, PLY, DAE
Output formatsglb, gltf, obj, stl, ply, dae

So ?to=stl turns an OBJ into a printable STL, ?to=obj gives you a human-readable mesh, and ?to=glb produces the compact single-file binary you want on a web page. Uploads up to 50 MB.

Why GLB for the web

Common uses

A note on units and scale

STL carries no unit information — a file is just numbers, and whether they mean millimetres or inches is a convention between the exporter and whoever opens it. Conversion preserves those numbers faithfully; it cannot invent a unit that was never stored. If your pipeline mixes sources, decide on a unit convention on your side.

Related conversions

Read the API documentation