Convert & Compress

Learn how to convert assets with a query.

Convert or Compress a 3D asset

POST https://api.echo3D.com/convertCompress

This endpoint allows you to convert or compress a 3D model.

Request Body

Name
Type
Description

key*

string

Your API key.

email*

string

Your email address

userKey*

string

Your authentication key

conversion*

string

The target file format. Options: obj, fbx, gltf, glb, usdz, stl

compression*

string

The target compression. Options: draco, ultimate, reduce (PolyReduce), resize

ratio

string

For reduce (ex: reduce=10 to reduce model polygons by 10%) and resize (ex: resize=50 to rescale the model to 50% of original

entryId*

string

Collection asset to be converted or compressed. If not provided, request is assumed to be discrete file and will return PUT url for uploading (See discrete file request section below)

downloadFile

string

By default, conversions are saved to the asset and compressions are returned as files. Set this to true for a conversion result to also be returned by the request as a file download.

secKey

string

Your Secret key. Required if enabled through the Security page.

gltftransform

string

The gltf-transform command to run (list of commands can be found here).

filename*

string

Required for discrete file requests, the name of the file including extension, eg cat.glb

fileId

string

For discrete file requests

{
    url: "https://"
    fileId: 1231-123145-12313-123123
}

Discrete File Request Flow

For compression and conversion on files that are not a part of your collection.

  1. Send a POST request as outlined above, omitting entryId but including a filename. A successful request will return 200 OK and a JSON object containing a PUT url and a fileId :

    1. {
          url: "https://"
          fileId: 1231-123145-12313-123123
      }
  2. Use the PUT url to upload your file

  3. When your upload is complete, add a fileId parameter with the value from the response in step (1) to your request and send it again. A successful response will return a string jobId

  4. Replace fileId with the returned jobId in your previous request and send it once more. When the operation is complete, the server will return a url to download your file. It may take several minutes for a url to become available for larger files.

Last updated