zlim
Docs

Zlim Docs

Zlim optimizes 3D models to GLB through the hosted REST API, which runs async jobs at scale. A local CLI and an MCP server are coming soon.

Quickstart

Create a job on the hosted API, upload the file, mark the upload complete, poll until it succeeds, then download the optimized GLB. The first call:

bash
curl -X POST https://zlim.ai/api/v1/jobs \
  -H "Authorization: Bearer $ZLIM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "filename": "model.fbx", "options": { "preset": "balanced" } }'
# → an upload grant (putUrl); every step is in the reference below

REST API reference

The hosted API is asynchronous and grant-based: you create a job, upload the raw file bytes to a signed URL, mark the upload complete, poll until the job reaches a terminal status, then fetch a signed download URL. All requests authenticate with a Bearer API key.

1. Create a job

POST /api/v1/jobs with a JSON body. Returns 201 with the job and an uploadGrant containing a putUrl.

bash
curl -X POST https://zlim.ai/api/v1/jobs \
  -H "Authorization: Bearer $ZLIM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "taskType": "model.optimize",
    "filename": "model.fbx",
    "options": { "preset": "balanced" }
  }'

# Response (201):
{
  "job": {
    "id": "1f3c…",
    "status": "waiting_upload",
    "taskType": "model.optimize"
  },
  "uploadGrant": {
    "putUrl": "https://…"
  }
}
FieldTypeDescription
taskTypestringTask to run. Use model.optimize (the default).
filenamestringOriginal filename; used to derive the input object key. Defaults to input.glb.
optionsobjectTask options for model.optimize: preset (fast | balanced | maximum, default balanced), outputFormat (glb | fbx | obj | usd, default glb), preserveRig (boolean), and stages for per-stage overrides (see below).
callbackUrlstringOptional webhook notified when the job reaches a terminal status.

Advanced: per-stage config

A preset is a bundle of pipeline stages. Pass options.stagesto override stages on top of it: every stage you include replaces that stage in the preset wholesale (fields aren't merged one-by-one), and stages you omit keep their preset values. An enabled stage must carry its knob — simplify needs targetRatio or targetCount, draco needs compressionLevel, texture needs mode.

StageOptionsEffect
cleanenabledPrune unused nodes/materials and deduplicate.
mergeenabledMerge meshes to cut draw calls.
simplifyenabled; one of targetRatio (0.01–1.0) or targetCount (int ≥ 1); error (0–1); lockBorder (bool)Decimate geometry. error caps deviation — lower keeps more quality.
quantizeenabled; per-attribute quantizePosition / quantizeNormal / quantizeTexcoord / quantizeColor (bool)Quantize vertex attributes; toggle which attributes are reduced.
dracoenabled, compressionLevel (0–10); per-attribute bits quantizePosition / quantizeNormal / quantizeTexcoord (1–30)Draco mesh compression; higher level = smaller/slower, fewer bits = smaller/lossier.
textureenabled, mode (ETC1S | UASTC), quality (ETC1S 1–255 / UASTC 0–4), slots (subset of baseColorTexture, normalTexture, metallicRoughnessTexture, occlusionTexture, emissiveTexture)KTX2 supercompression. quality range depends on mode; slots limits which texture slots compress (default all).

Unknown stage names, unknown per-stage fields, and out-of-range values are rejected with 422 before the job runs. draco and texture apply only to a glb output; for fbx/obj/usd exports they're skipped automatically.

bash
curl -X POST https://zlim.ai/api/v1/jobs \
  -H "Authorization: Bearer $ZLIM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "taskType": "model.optimize",
    "filename": "model.glb",
    "options": {
      "preset": "balanced",
      "stages": {
        "simplify": { "enabled": true, "targetCount": 20000, "error": 0.01 },
        "draco":    { "enabled": true, "compressionLevel": 10, "quantizeTexcoord": 10 },
        "texture":  { "enabled": true, "mode": "UASTC", "quality": 3, "slots": ["baseColorTexture", "normalTexture"] }
      }
    }
  }'

2. Upload the file, then complete the upload

PUT the raw file bytes to uploadGrant.putUrl, then POST .../complete-upload to move the job from waiting_upload to queued.

bash
# Upload the raw bytes to the signed putUrl
curl -X PUT "$PUT_URL" \
  -H "Content-Type: application/octet-stream" \
  --data-binary @model.fbx

# Mark the upload complete → job becomes "queued"
curl -X POST https://zlim.ai/api/v1/jobs/$JOB_ID/complete-upload \
  -H "Authorization: Bearer $ZLIM_API_KEY"

3. Poll status, then download

Poll GET /api/v1/jobs/:id until a terminal status (succeeded, failed, or cancelled). When succeeded, fetch a signed download URL from GET /api/v1/jobs/:id/result-url.

bash
# Poll until terminal
curl https://zlim.ai/api/v1/jobs/$JOB_ID \
  -H "Authorization: Bearer $ZLIM_API_KEY"
# { "job": { "id": "1f3c…", "status": "succeeded", … } }

# Get a signed download URL (only when status is "succeeded")
curl https://zlim.ai/api/v1/jobs/$JOB_ID/result-url \
  -H "Authorization: Bearer $ZLIM_API_KEY"
# { "url": "https://…", "expiresAt": "…" }

# Download the optimized GLB
curl -o model.glb "$RESULT_URL"

Endpoints

Method & pathDescription
POST /api/v1/jobsCreate a job. Returns 201 with the job and an upload grant (putUrl). Send an Idempotency-Key header to make retries safe.
PUT <uploadGrant.putUrl>Upload the raw input bytes to the signed storage URL.
POST /api/v1/jobs/:id/complete-uploadMark the upload complete; transitions the job to queued.
GET /api/v1/jobs/:idFetch the job's current status (includes hasReport once succeeded).
GET /api/v1/jobs/:id/result-urlSigned download URL for the output GLB (only when succeeded).
GET /api/v1/jobs/:id/report-urlSigned URL for the optimization report JSON (only when succeeded and hasReport).
Rate limits. Requests are rate-limited per API key: up to 120 job creations and 20 key creations per minute. Over the limit returns 429 with a Retry-Afterheader. This is separate from your plan's monthly optimization quota.

CLI and MCP server

Coming soon. Until then, use the REST API.

The CLI will run the optimization engine locally and in-process, with no account, API key or upload, and batch-optimize whole folders. The MCP server will let AI agents like Claude and Cursor optimize, convert and analyze models as tool calls, locally or through the hosted API.

Authentication

The REST API authenticates each request with a bearer API key in the Authorization header (an x-api-key header or a signed-in dashboard session also work):

http
Authorization: Bearer <your_api_key>

Keys are managed from the Keys dashboard. Create multiple keys to scope access per environment (dev, staging, production).

Jobs reference

Job statuses

StatusMeaning
waiting_uploadJob created; the input file has not been uploaded yet.
waiting_manifestJob created via a manifest path; the manifest is not yet resolved.
queuedUpload complete; ready for a worker to claim.
processingClaimed by a worker; the lease is active.
retry_waitProcessing failed; queued for retry after a delay.
succeededTerminal. The output GLB is ready; fetch it via result-url.
failedTerminal. Processing failed after retries were exhausted.
cancelledTerminal. The job was cancelled.

Terminal statuses are succeeded, failed, and cancelled. Poll GET /api/v1/jobs/:id until one of these is reached.

Supported formats

Every supported format outputs to GLB. More formats are on the roadmap — marked coming soon below.

FormatExtensionsKindStatus
glTF / GLB.gltf / .glbDCCAvailable
FBX.fbxDCCAvailable
OBJ.objDCCAvailable
Collada.daeDCCAvailable
USD / USDZ.usd / .usdzDCCAvailable
STL.stlPrintAvailable
PLY.plyPrintAvailable
3MF.3mfCADAvailable
STEP.stp / .stepCADAvailable
Creo.prtCADAvailable
CATIA.CATPart / .CATProductCADAvailable
IGES.igs / .igesCADComing soon
SolidWorks.sldprt / .sldasmCADComing soon
DXF.dxfCADComing soon
3DS.3dsDCCComing soon
VRML / X3D.wrl / .x3dDCCComing soon