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:
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 belowREST 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.
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://…"
}
}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.
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.
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.
# 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.
# 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
429 with a Retry-Afterheader. This is separate from your plan's monthly optimization quota.CLI and MCP server
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):
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
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.