🔃
Compress
Learn how to compress assets with a query.
post
https://api.echo3D.com
/compress
Compress a 3D asset

If a Compress API call is sent with
resize=true
,the model will be resized based on the ratio
value given.If a Compress API call is sent with no
resize
parameter or with resize=false
, the model will be decimated (poly reduced) based on the ratio
value given.If a Compress API call is sent with no
resize
parameter or with resize=false
and ultimateCompress=true
, the model will go through extensive compression which dramatically reduces file size. Only supports a .glb output and works with selected 3D players. Note that this compression may be lossy.If a Compress API call is sent with no
resize
parameter or with resize=false
and compressGlb=true
, the model will go through lossless Draco compression which reduces file size. Only supports a .glb output and works with selected 3D players.If a Compress API call is sent with no
resize
parameter or with resize=false
, no compressGlb
parameter or compressGlb=false
, and gltfpack=true
, the model will be optimized using the glftpack
tool. You should send the file (in .gltf
or .glb
format) using the fileToCompress parameter, or the entry ID or the Poly model ID using the modelId
parameter. You can also add command-line parameters for gltfpack
:cc
to produce a compressed output.tc
to compress textures.
If a Compress API call is sent with no
resize
parameter or with resize=false
, no compressGlb
parameter or compressGlb=false
, and gltfpack=false
, the model will be optimized using the gltf-transform
tool. You should set the gltf-transform parameter as the command to run with gltftransform=<COMMAND>
(list can be found here), and send the file (in .gltf
or .glb
format) using the fileToCompress parameter. You can also add command-line parameters for gltftransform
, for example:gltftransform
set toresize
.width
set to256
.height
set to256
.
Last modified 2mo ago