Optimize & Compress
3D model optimization API reference. Draco compression, texture resizing, and mesh simplification. Reduce file size for web, mobile, and AR delivery.
Optimize Model
POST/v1/tools/optimize/
Compress and optimize GLB/glTF models for fast loading on web, mobile, and AR platforms. The tool applies Draco geometry compression to reduce mesh data size, compresses textures to WebP or JPEG at a configurable quality level, resizes textures to a maximum resolution, and optionally simplifies the mesh by reducing polygon count. Choose from three presets (low, default, max compression) or override individual settings for full control. Input must be GLB or glTF format. Costs 10 credits per request.
curl -X POST https://api.3daistudio.com/v1/tools/optimize/ \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model_url": "https://example.com/model.glb",
"preset": "default",
"simplify_ratio": 0.5
}'{
"task_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"created_at": "2026-02-25T12:00:00Z"
}Presets
Three presets control the balance between file size and visual quality. You can also override any individual setting on top of a preset.
| Preset | Draco | Texture Format | Texture Quality | Max Texture Size | Best For |
|---|---|---|---|---|---|
| low | Enabled | WebP | 92% | 4096px | Light compression. Minimal visual loss, moderate file size reduction. |
| default | Enabled | WebP | 80% | 2048px | Balanced. Good file size reduction with acceptable quality. |
| max | Enabled | JPEG | 65% | 1024px | Maximum compression. Smallest file size, noticeable quality reduction. |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| model_url | string (URL) | Yes | URL of the GLB or glTF model to optimize. |
| preset | string | No | Compression preset: "low", "default", or "max". Default: "default". |
| texture_format | string | No | Override texture compression format: "AUTO", "JPEG", "WEBP", or "NONE" (keep original). |
| texture_quality | integer | No | Override texture compression quality (1 to 100). Higher values preserve more detail. |
| texture_max_resolution | integer | No | Override maximum texture dimension: 512, 1024, 2048, 4096, or 8192. Textures larger than this are downscaled proportionally. |
| draco | boolean | No | Override Draco geometry compression on or off. |
| draco_compression_level | integer | No | Override Draco compression level (0 to 6). Higher values = smaller files but slower encoding. |
| simplify_ratio | number | No | Mesh decimation ratio (0.01 to 1.0). For example, 0.5 reduces polygon count by half. Default: 1.0 (no simplification). |
Checking Status
GET/v1/generation-request/<task_id>/status/
Poll this endpoint with the task_id from the submit response. When status is "FINISHED", the results array contains the optimized GLB file. Results expire after 24 hours.
curl https://api.3daistudio.com/v1/generation-request/YOUR_TASK_ID/status/ \
-H "Authorization: Bearer YOUR_API_KEY"{
"status": "FINISHED",
"progress": 100,
"results": [
{
"asset_url": null,
"asset": "https://storage.3daistudio.com/assets/optimized_model.glb",
"asset_type": "3D_MODEL",
"thumbnail": null
}
]
}Input Requirements
This tool only accepts GLB or glTF format as input. If your model is in a different format, use the Format Conversion tool first to convert it to GLB, then optimize.
Processing Times
Optimization typically takes 25–40 seconds. Larger models with many textures may take longer.