Compile over REST
The Rust gateway exposes the same operations over REST. Authenticate with your API key as a bearer token in the Authorization header, and send the mesh as multipart form data with a JSON options field.
curl -X POST https://api.spatialcompiler.dev/v1/compile \
-H "Authorization: Bearer spck_test_example" \
-F "file=@model.glb" \
-F 'options={"target_tris":15000,"dry_run":true}'
The OpenAPI description of
POST https://api.spatialcompiler.dev/v1/compile is at /openapi/spatial-compiler.json.Responses
| Status | Meaning |
|---|---|
| 200 | Typed telemetry JSON: see Telemetry fields. |
| 401 | Missing or invalid API key: see API keys. |
| 429 | The per-key hourly velocity limit is reached: see dry_run, cache and limits. |