Overview

Mesh tools operate synchronously: they accept a file and return the processed model directly. Results are streamed back as binary (or a zip when a tool produces multiple files).

ToolEndpointPremium op
DecimatePOST /api/mesh/decimateYes
RepairPOST /api/mesh/repairYes
AnalyzePOST /api/mesh/analyzeNo
Recalculate normalsPOST /api/mesh/recalculateYes
LOD generationPOST /api/mesh/lodYes
Texture bakingPOST /api/mesh/bakeYes

Decimate

Reduce polygon count while preserving silhouette, UV boundaries, and vertex attributes.

FieldTypeDescription
filefile *Model to decimate.
inputFormatstringSource format (default glb).
outputFormatstringOutput format (default glb).
ratiofloatTarget polygon ratio, between 0.05 and 0.95 (default 0.5).

Returns the decimated file as a binary stream.

Repair

Fix common mesh issues such as non-manifold geometry, inverted faces, and holes.

FieldTypeDescription
filefile *Model to repair.
inputFormatstringSource format (default glb).
outputFormatstringOutput format (default glb).

Analyze

Returns a JSON report with mesh statistics such as vertex count, triangle count, UV islands, and material count. Not counted against premium operations.

bash
curl -X POST https://api.geometry-labs.com/api/mesh/analyze \
  -H "Authorization: Bearer $GL_TOKEN" \
  -F "file=@model.glb" \
  -F "inputFormat=glb"

Recalculate normals

Recalculate, flip, or smooth normals.

FieldTypeDescription
filefile *Model to process.
inputFormatstringSource format (default glb).
outputFormatstringOutput format (default glb).
directionstringoutward or inward (default outward).
shadingstringsmooth or flat (default smooth).

LOD generation

Generate multiple levels of detail as a zip archive.

FieldTypeDescription
filefile *Model to process.
inputFormatstringSource format (default glb).
outputFormatstringOutput format (default glb).
levelsarray (JSON)Reduction levels, e.g. [1.0, 0.5, 0.25, 0.1].

Texture baking

Bake maps from a high-poly to a low-poly mesh. Returns a zip of baked maps.

FieldTypeDescription
highPolyfile *High-poly model.
lowPolyfile *Low-poly model.
inputFormatstringSource format (default glb).
mapTypesarray (JSON)Maps to bake, e.g. ["normal"].
resolutionintOutput resolution (default 1024).
rayOffsetfloatRay offset for baking (default 0.02).