NAV -image
bash javascript python

Introduction

Make your 3D content fit all platforms

Welcome to our API documentation!

This documentation describes the usage of the Rapidcompact API endpoints which enable the upload of base assets, the optimization of a base asset and the download of the optimized rapid model.

Base URL

https://api.rapidcompact.com

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your token by logging into your account on our portal and clicking Generate API token in the tokens page.

API Tokens

Get Tokens

requires authentication

Example request:

curl -X GET \
    -G "https://api.rapidcompact.com/api/user/tokens" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/user/tokens"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/user/tokens'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request      

GET api/user/tokens

Create Token

requires authentication

Example request:

curl -X POST \
    "https://api.rapidcompact.com/api/user/tokens" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/user/tokens"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/user/tokens'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request      

POST api/user/tokens

Delete Token.

requires authentication

Example request:

curl -X DELETE \
    "https://api.rapidcompact.com/api/user/tokens/{id}" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/user/tokens/{id}"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/user/tokens/{id}'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request      

DELETE api/user/tokens/{id}

Get Token

requires authentication

Example request:

curl -X GET \
    -G "https://api.rapidcompact.com/api/user/tokens/65" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/user/tokens/65"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/user/tokens/65'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request      

GET api/user/tokens/{id}

URL Parameters

id  integer optional  
ID of the token.

Base Asset

Endpoints for managing base assets

Get Running jobs

requires authentication

Get information about the running jobs

Example request:

curl -X GET \
    -G "https://api.rapidcompact.com/api/rawmodel/jobs" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/rawmodel/jobs"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/rawmodel/jobs'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request      

GET api/rawmodel/jobs

Process [Deprecated]

requires authentication

Please use optimize endpoint instead.

Example request:

curl -X POST \
    "https://api.rapidcompact.com/api/rawmodel/process/281" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/rawmodel/process/281"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/rawmodel/process/281'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request      

POST api/rawmodel/process/{id}

URL Parameters

id  integer optional  
ID of the base asset.

Optimize

requires authentication

Example request:

curl -X POST \
    "https://api.rapidcompact.com/api/rawmodel/optimize/281" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"tags":["low quality","mb target"],"config":{"workflowSettings":{"targetMeshResolution":{"facePercentage":50},"targetTextureResolution":{"baseColor":2048,"emissive":2048,"normal":2048,"orm":2048}},"assetSimplification":{"meshDecimation":{"method":"rebakePreserveNodes"},"topologySettings":{"vertexMergingDistance":0.005,"meshDensityEqualization":0,"boundaryPreservationFactor":0.5},"uvAndAtlasSettings":{"uvStretchTolerance":0},"materialAndTextureBaking":{"bakingQuality":"medium","bakeNormalMap":true,"bakeAOMap":false}},"compressionAndExport":{"fileExports":[{"fileType":"glb","meshCompressionMethod":"none","customScaling":1,"textureFormat":{"baseColor":"auto","emissive":"auto","normal":"auto","orm":"auto"}},{"fileType":"gltf","meshCompressionMethod":"none","customScaling":1,"textureFormat":{"baseColor":"auto","emissive":"auto","normal":"auto","orm":"auto"}}]}},"exportName":"nihil"}'
const url = new URL(
    "https://api.rapidcompact.com/api/rawmodel/optimize/281"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "tags": [
        "low quality",
        "mb target"
    ],
    "config": {
        "workflowSettings": {
            "targetMeshResolution": {
                "facePercentage": 50
            },
            "targetTextureResolution": {
                "baseColor": 2048,
                "emissive": 2048,
                "normal": 2048,
                "orm": 2048
            }
        },
        "assetSimplification": {
            "meshDecimation": {
                "method": "rebakePreserveNodes"
            },
            "topologySettings": {
                "vertexMergingDistance": 0.005,
                "meshDensityEqualization": 0,
                "boundaryPreservationFactor": 0.5
            },
            "uvAndAtlasSettings": {
                "uvStretchTolerance": 0
            },
            "materialAndTextureBaking": {
                "bakingQuality": "medium",
                "bakeNormalMap": true,
                "bakeAOMap": false
            }
        },
        "compressionAndExport": {
            "fileExports": [
                {
                    "fileType": "glb",
                    "meshCompressionMethod": "none",
                    "customScaling": 1,
                    "textureFormat": {
                        "baseColor": "auto",
                        "emissive": "auto",
                        "normal": "auto",
                        "orm": "auto"
                    }
                },
                {
                    "fileType": "gltf",
                    "meshCompressionMethod": "none",
                    "customScaling": 1,
                    "textureFormat": {
                        "baseColor": "auto",
                        "emissive": "auto",
                        "normal": "auto",
                        "orm": "auto"
                    }
                }
            ]
        }
    },
    "exportName": "nihil"
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/rawmodel/optimize/281'
payload = {
    "tags": [
        "low quality",
        "mb target"
    ],
    "config": {
        "workflowSettings": {
            "targetMeshResolution": {
                "facePercentage": 50
            },
            "targetTextureResolution": {
                "baseColor": 2048,
                "emissive": 2048,
                "normal": 2048,
                "orm": 2048
            }
        },
        "assetSimplification": {
            "meshDecimation": {
                "method": "rebakePreserveNodes"
            },
            "topologySettings": {
                "vertexMergingDistance": 0.005,
                "meshDensityEqualization": 0,
                "boundaryPreservationFactor": 0.5
            },
            "uvAndAtlasSettings": {
                "uvStretchTolerance": 0
            },
            "materialAndTextureBaking": {
                "bakingQuality": "medium",
                "bakeNormalMap": true,
                "bakeAOMap": false
            }
        },
        "compressionAndExport": {
            "fileExports": [
                {
                    "fileType": "glb",
                    "meshCompressionMethod": "none",
                    "customScaling": 1,
                    "textureFormat": {
                        "baseColor": "auto",
                        "emissive": "auto",
                        "normal": "auto",
                        "orm": "auto"
                    }
                },
                {
                    "fileType": "gltf",
                    "meshCompressionMethod": "none",
                    "customScaling": 1,
                    "textureFormat": {
                        "baseColor": "auto",
                        "emissive": "auto",
                        "normal": "auto",
                        "orm": "auto"
                    }
                }
            ]
        }
    },
    "exportName": "nihil"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200, success):

{
    "id": 624,
    "name": "teapot.obj ",
    "optimization_status": "sent_to_queue",
    "job_status": {
        "id": 518,
        "job_id": null,
        "type": "App\\Jobs\\ProcessRawModel",
        "queue": null,
        "attempts": 0,
        "progress_now": 0,
        "progress_max": 0,
        "status": "queued",
        "input": null,
        "output": null,
        "created_at": "2021-02-15T13:34:52.000000Z",
        "updated_at": "2021-02-15T13:34:52.000000Z",
        "started_at": null,
        "finished_at": null,
        "key": "rapid_model:624"
    },
    "progress": 0,
    "processing_step": "Scheduled for processing",
    "external": null,
    "rawmodel": {
        "id": 282,
        "name": "teapot.obj",
        "processing": true
    }
}

Request      

POST api/rawmodel/optimize/{id}

URL Parameters

id  integer optional  
ID of the base asset.

Body Parameters

tags  string[] optional  
A list of tags to be linked to the rapid model.

config  object optional  
Configuration to be applied to the optimization. This object needs to comply with this [json schema](https://rapidcompact.com/doc/api-schema/v1_1/index.html).

exportName  string optional  
The desired filename of the export.

Get Base Asset

requires authentication

Example request:

curl -X GET \
    -G "https://api.rapidcompact.com/api/rawmodel/281" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/rawmodel/281"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/rawmodel/281'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):

{
    "data": {
        "id": 281,
        "name": "teapot",
        "processing": false,
        "external": false,
        "upload_status": "complete",
        "size": 438680,
        "created_at": "2021-02-08T16:59:52+01:00",
        "rapid_models": [
            635,
            617
        ],
        "scale_factor": "10",
        "downloads": {
            "error.log": "https:\/\/rapidcompact-models-staging.s3.eu-central-1.amazonaws.com\/raw\/ae1444c0-6a26-11eb-a0b7-53a4b9af00b4\/error.log?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7SJJP4X2NUVUTN5%2F20210218%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20210218T074239Z&X-Amz-SignedHeaders=host&X-Amz-Expires=86400&X-Amz-Signature=edd041bd622034a3a5bdc3fb7098e910dcaba7c6061f9496a3e03b9bcc359f93",
            "info.log": "https:\/\/rapidcompact-models-staging.s3.eu-central-1.amazonaws.com\/raw\/ae1444c0-6a26-11eb-a0b7-53a4b9af00b4\/info.log?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7SJJP4X2NUVUTN5%2F20210218%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20210218T074239Z&X-Amz-SignedHeaders=host&X-Amz-Expires=86400&X-Amz-Signature=61872f8618a2ad8a90ae94628c6421e5a98534ec43460ced6ced2d847cef9f4a",
            "metrics.json": "https:\/\/rapidcompact-models-staging.s3.eu-central-1.amazonaws.com\/raw\/ae1444c0-6a26-11eb-a0b7-53a4b9af00b4\/metrics.json?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7SJJP4X2NUVUTN5%2F20210218%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20210218T074239Z&X-Amz-SignedHeaders=host&X-Amz-Expires=86400&X-Amz-Signature=aeea15c613beb9cd19ebc033e98440ede90178029badcf9ce0afbadbcd70f656",
            "rpd_info.json": "https:\/\/rapidcompact-models-staging.s3.eu-central-1.amazonaws.com\/raw\/ae1444c0-6a26-11eb-a0b7-53a4b9af00b4\/rpd_info.json?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7SJJP4X2NUVUTN5%2F20210218%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20210218T074239Z&X-Amz-SignedHeaders=host&X-Amz-Expires=86400&X-Amz-Signature=bb37d882585889c42de0693d330d5bb2d55ebe1328e58d92e33b85fb73cdaed1",
            "teapot.obj": "https:\/\/rapidcompact-models-staging.s3.eu-central-1.amazonaws.com\/raw\/ae1444c0-6a26-11eb-a0b7-53a4b9af00b4\/teapot.obj?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7SJJP4X2NUVUTN5%2F20210218%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20210218T074239Z&X-Amz-SignedHeaders=host&X-Amz-Expires=86400&X-Amz-Signature=faac3a11b5435dbaa42a55a86b19f50b0f5f93543694255f8069141a6eae4cf8",
            "thumb.jpg": "https:\/\/rapidcompact-models-staging.s3.eu-central-1.amazonaws.com\/raw\/ae1444c0-6a26-11eb-a0b7-53a4b9af00b4\/thumb.jpg?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7SJJP4X2NUVUTN5%2F20210218%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20210218T074239Z&X-Amz-SignedHeaders=host&X-Amz-Expires=86400&X-Amz-Signature=6766c8774095b62bcb8ae63d1f357bba7b408b2bfad2aebd05639f4f75da47ee"
        }
    }
}

Request      

GET api/rawmodel/{id}

URL Parameters

id  integer optional  
ID of the base asset.

Delete Base Asset

requires authentication

Example request:

curl -X DELETE \
    "https://api.rapidcompact.com/api/rawmodel/281" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/rawmodel/281"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/rawmodel/281'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request      

DELETE api/rawmodel/{id}

URL Parameters

id  integer optional  
ID of the base asset.

Delete Tag of a Base Asset

requires authentication

Example request:

curl -X DELETE \
    "https://api.rapidcompact.com/api/rawmodel/281/tags/2" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/rawmodel/281/tags/2"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/rawmodel/281/tags/2'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request      

DELETE api/rawmodel/{id}/tags/{tagId}

URL Parameters

id  integer optional  
ID of the base asset.

tagId  integer optional  
ID of the tag to be removed.

Update Base Asset

requires authentication

Currently only scale factor can be updated.

Example request:

curl -X PUT \
    "https://api.rapidcompact.com/api/rawmodel/281" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"scale_factor":0.5}'
const url = new URL(
    "https://api.rapidcompact.com/api/rawmodel/281"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "scale_factor": 0.5
}

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/rawmodel/281'
payload = {
    "scale_factor": 0.5
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request      

PUT api/rawmodel/{id}

URL Parameters

id  integer optional  
ID of the base asset.

Body Parameters

scale_factor  number optional  
Scale factor to be applied to the base asset.

Delete Multiple Base Assets

requires authentication

Example request:

curl -X POST \
    "https://api.rapidcompact.com/api/rawmodel/delete" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"ids":[726,324]}'
const url = new URL(
    "https://api.rapidcompact.com/api/rawmodel/delete"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": [
        726,
        324
    ]
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/rawmodel/delete'
payload = {
    "ids": [
        726,
        324
    ]
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request      

POST api/rawmodel/delete

Body Parameters

ids  integer[] optional  
Array of Ids to be deleted.

Get upload link

Calling this endpoint will return an ID for the base asset and create presigned URLs which can be used to upload files directly to our storage. The URLs are unique for every file. The "complete_upload" field in the response will contain the endpoint to be called when uploading is done.

After that you can upload to our storage by putting the files as binaries to their respective presigned URLs.

 curl <presigned-url> --upload-file mymodel.glb

One the file is uploaded, you need to tell RapidCompact that the model is ready to be processed by sending a request to the complete upload end point

requires authentication

Example request:

curl -X POST \
    "https://api.rapidcompact.com/api/rawmodel/api-upload/start" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"filenames":["mymodel.glb","material.mat"]}'
const url = new URL(
    "https://api.rapidcompact.com/api/rawmodel/api-upload/start"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "filenames": [
        "mymodel.glb",
        "material.mat"
    ]
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/rawmodel/api-upload/start'
payload = {
    "filenames": [
        "mymodel.glb",
        "material.mat"
    ]
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200, success):


{
 "id": 1,
 "links": {
   "s3_upload_urls": {
     "mymodel.glb": <presigned-url>,
     "material.mat": <presigned-url>
   },
   "complete_upload": "https://api.rapidcompact.com/api/rawmodels/1/api-upload/complete"
 }
}

Request      

POST api/rawmodel/api-upload/start

Body Parameters

filenames  string[] optional  
Names of the files to be uploaded.

Complete upload

Call this endpoint after you have retrieved the ID of the base asset and uploaded the model.

requires authentication

Example request:

curl -X GET \
    -G "https://api.rapidcompact.com/api/rawmodel/2/api-upload/complete" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/rawmodel/2/api-upload/complete"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/rawmodel/2/api-upload/complete'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):

{
    "data": {
        "id": 281,
        "name": "teapot",
        "processing": false,
        "upload_status": "complete",
        "size": 438680,
        "created_at": "2021-02-08T16:59:52+01:00",
        "rapid_models": [
            635,
            617
        ],
        "scale_factor": "10",
        "downloads": {
            "error.log": "https:\/\/rapidcompact-models-staging.s3.eu-central-1.amazonaws.com\/raw\/ae1444c0-6a26-11eb-a0b7-53a4b9af00b4\/error.log?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7SJJP4X2NUVUTN5%2F20210218%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20210218T074239Z&X-Amz-SignedHeaders=host&X-Amz-Expires=86400&X-Amz-Signature=edd041bd622034a3a5bdc3fb7098e910dcaba7c6061f9496a3e03b9bcc359f93",
            "info.log": "https:\/\/rapidcompact-models-staging.s3.eu-central-1.amazonaws.com\/raw\/ae1444c0-6a26-11eb-a0b7-53a4b9af00b4\/info.log?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7SJJP4X2NUVUTN5%2F20210218%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20210218T074239Z&X-Amz-SignedHeaders=host&X-Amz-Expires=86400&X-Amz-Signature=61872f8618a2ad8a90ae94628c6421e5a98534ec43460ced6ced2d847cef9f4a",
            "metrics.json": "https:\/\/rapidcompact-models-staging.s3.eu-central-1.amazonaws.com\/raw\/ae1444c0-6a26-11eb-a0b7-53a4b9af00b4\/metrics.json?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7SJJP4X2NUVUTN5%2F20210218%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20210218T074239Z&X-Amz-SignedHeaders=host&X-Amz-Expires=86400&X-Amz-Signature=aeea15c613beb9cd19ebc033e98440ede90178029badcf9ce0afbadbcd70f656",
            "rpd_info.json": "https:\/\/rapidcompact-models-staging.s3.eu-central-1.amazonaws.com\/raw\/ae1444c0-6a26-11eb-a0b7-53a4b9af00b4\/rpd_info.json?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7SJJP4X2NUVUTN5%2F20210218%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20210218T074239Z&X-Amz-SignedHeaders=host&X-Amz-Expires=86400&X-Amz-Signature=bb37d882585889c42de0693d330d5bb2d55ebe1328e58d92e33b85fb73cdaed1",
            "teapot.obj": "https:\/\/rapidcompact-models-staging.s3.eu-central-1.amazonaws.com\/raw\/ae1444c0-6a26-11eb-a0b7-53a4b9af00b4\/teapot.obj?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7SJJP4X2NUVUTN5%2F20210218%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20210218T074239Z&X-Amz-SignedHeaders=host&X-Amz-Expires=86400&X-Amz-Signature=faac3a11b5435dbaa42a55a86b19f50b0f5f93543694255f8069141a6eae4cf8",
            "thumb.jpg": "https:\/\/rapidcompact-models-staging.s3.eu-central-1.amazonaws.com\/raw\/ae1444c0-6a26-11eb-a0b7-53a4b9af00b4\/thumb.jpg?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7SJJP4X2NUVUTN5%2F20210218%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20210218T074239Z&X-Amz-SignedHeaders=host&X-Amz-Expires=86400&X-Amz-Signature=6766c8774095b62bcb8ae63d1f357bba7b408b2bfad2aebd05639f4f75da47ee"
        }
    }
}

Request      

GET api/rawmodel/{rawmodel}/api-upload/complete

URL Parameters

rawmodel  integer optional  
The ID of base asset.

Get Rapid Models

Get the rapid models which were generated from this base asset.

Example request:

curl -X GET \
    -G "https://api.rapidcompact.com/api/rawmodel/281/rapidmodels" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/rawmodel/281/rapidmodels"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/rawmodel/281/rapidmodels'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):

{
    "data": [
        {
            "id": 635,
            "name": "teapot ",
            "optimization_status": "done",
            "created_at": "2021-02-16T16:50:41+01:00",
            "updated_at": "2021-02-16T16:50:53+01:00",
            "progress": 100,
            "processing_step": "Done",
            "external": false,
            "rapid_compact_core_version": "4.3.0",
            "tags": [],
            "uuid": "d8316d1f-3c7d-4777-b72e-c760064f9d08",
            "accepted": false,
            "meta": {
                "size": 573420,
                "exportSize": 1029548
            },
            "rpd_info": "<link-to-rpd_info-file>",
            "rpd_warnings": "<link-to-warnings-file>",
            "downloads": {
                "glb": "<link-to-glb-file>"
            }
        },
        {
            "id": 617,
            "name": "teapot (Spark AR)",
            "optimization_status": "done",
            "created_at": "2021-02-09T15:51:24+01:00",
            "updated_at": "2021-02-09T15:52:00+01:00",
            "progress": 100,
            "processing_step": "Done",
            "external": false,
            "rapid_compact_core_version": "4.3.0",
            "tags": [],
            "uuid": "15ba5d61-b75f-4f8d-b62f-1b371caa9d5b",
            "accepted": false,
            "meta": {
                "size": 574480,
                "exportSize": 1030535
            },
            "rpd_info": "<link-to-rpd_info-file>",
            "rpd_warnings": "<link-to-warnings-file>",
            "downloads": {
                "glb": "<link-to-glb-file>"
            }
        }
    ]
}

Request      

GET api/rawmodel/{rawmodel}/rapidmodels

URL Parameters

rawmodel  integer optional  
The ID of the base asset.

Embeds

Get Embeds

requires authentication

Example request:

curl -X GET \
    -G "https://api.rapidcompact.com/api/embeds" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/embeds"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/embeds'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request      

GET api/embeds

Create Embed

requires authentication

Example request:

curl -X POST \
    "https://api.rapidcompact.com/api/embeds" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/embeds"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/embeds'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request      

POST api/embeds

Delete Embed

requires authentication

Example request:

curl -X DELETE \
    "https://api.rapidcompact.com/api/embeds/{id}" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/embeds/{id}"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/embeds/{id}'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request      

DELETE api/embeds/{id}

Presets

Create a new preset.

requires authentication

Example request:

curl -X POST \
    "https://api.rapidcompact.com/api/preset/create" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"name":"Preset Name","config":{"workflowSettings":{"targetMeshResolution":{"facePercentage":50},"targetTextureResolution":{"baseColor":2048,"emissive":2048,"normal":2048,"orm":2048}},"assetSimplification":{"meshDecimation":{"method":"rebake"},"topologySettings":{"vertexMergingDistance":0.005,"meshDensityEqualization":0,"boundaryPreservationFactor":0.5},"uvAndAtlasSettings":{"uvStretchTolerance":0},"materialAndTextureBaking":{"bakingQuality":"medium","bakeNormalMap":true,"bakeAOMap":false}},"compressionAndExport":{"fileExports":[{"fileType":"glb","meshCompressionMethod":"none","customScaling":1,"textureFormat":{"baseColor":"auto","emissive":"auto","normal":"auto","orm":"auto"}},{"fileType":"usdz","meshCompressionMethod":"none","customScaling":1,"textureFormat":{"baseColor":"auto","emissive":"auto","normal":"auto","orm":"auto"}}]}}}'
const url = new URL(
    "https://api.rapidcompact.com/api/preset/create"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Preset Name",
    "config": {
        "workflowSettings": {
            "targetMeshResolution": {
                "facePercentage": 50
            },
            "targetTextureResolution": {
                "baseColor": 2048,
                "emissive": 2048,
                "normal": 2048,
                "orm": 2048
            }
        },
        "assetSimplification": {
            "meshDecimation": {
                "method": "rebake"
            },
            "topologySettings": {
                "vertexMergingDistance": 0.005,
                "meshDensityEqualization": 0,
                "boundaryPreservationFactor": 0.5
            },
            "uvAndAtlasSettings": {
                "uvStretchTolerance": 0
            },
            "materialAndTextureBaking": {
                "bakingQuality": "medium",
                "bakeNormalMap": true,
                "bakeAOMap": false
            }
        },
        "compressionAndExport": {
            "fileExports": [
                {
                    "fileType": "glb",
                    "meshCompressionMethod": "none",
                    "customScaling": 1,
                    "textureFormat": {
                        "baseColor": "auto",
                        "emissive": "auto",
                        "normal": "auto",
                        "orm": "auto"
                    }
                },
                {
                    "fileType": "usdz",
                    "meshCompressionMethod": "none",
                    "customScaling": 1,
                    "textureFormat": {
                        "baseColor": "auto",
                        "emissive": "auto",
                        "normal": "auto",
                        "orm": "auto"
                    }
                }
            ]
        }
    }
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/preset/create'
payload = {
    "name": "Preset Name",
    "config": {
        "workflowSettings": {
            "targetMeshResolution": {
                "facePercentage": 50
            },
            "targetTextureResolution": {
                "baseColor": 2048,
                "emissive": 2048,
                "normal": 2048,
                "orm": 2048
            }
        },
        "assetSimplification": {
            "meshDecimation": {
                "method": "rebake"
            },
            "topologySettings": {
                "vertexMergingDistance": 0.005,
                "meshDensityEqualization": 0,
                "boundaryPreservationFactor": 0.5
            },
            "uvAndAtlasSettings": {
                "uvStretchTolerance": 0
            },
            "materialAndTextureBaking": {
                "bakingQuality": "medium",
                "bakeNormalMap": true,
                "bakeAOMap": false
            }
        },
        "compressionAndExport": {
            "fileExports": [
                {
                    "fileType": "glb",
                    "meshCompressionMethod": "none",
                    "customScaling": 1,
                    "textureFormat": {
                        "baseColor": "auto",
                        "emissive": "auto",
                        "normal": "auto",
                        "orm": "auto"
                    }
                },
                {
                    "fileType": "usdz",
                    "meshCompressionMethod": "none",
                    "customScaling": 1,
                    "textureFormat": {
                        "baseColor": "auto",
                        "emissive": "auto",
                        "normal": "auto",
                        "orm": "auto"
                    }
                }
            ]
        }
    }
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request      

POST api/preset/create

Body Parameters

name  string optional  
Name of the preset.

config  object optional  
Configuration of the optimizer. This object needs to comply with this [json schema](https://rapidcompact.com/doc/api-schema/v1_1/index.html).

Get Preset

requires authentication

Example request:

curl -X GET \
    -G "https://api.rapidcompact.com/api/preset/281" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/preset/281"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/preset/281'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request      

GET api/preset/{id}

URL Parameters

id  integer optional  
ID of the preset.

Delete preset

requires authentication

Example request:

curl -X DELETE \
    "https://api.rapidcompact.com/api/preset/281" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/preset/281"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/preset/281'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request      

DELETE api/preset/{id}

URL Parameters

id  integer optional  
ID of the preset.

Get all presets of user

requires authentication

Example request:

curl -X GET \
    -G "https://api.rapidcompact.com/api/preset" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/preset"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/preset'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):

[
    {
        "id": 11,
        "name": "preset 2",
        "config": "{\"workflowSettings\":{\"targetMeshResolution\":{\"facePercentage\":50},\"targetTextureResolution\":{\"baseColor\":2048,\"emissive\":2048,\"normal\":2048,\"orm\":2048}},\"assetSimplification\":{\"meshDecimation\":{\"method\":\"rebake\"},\"topologySettings\":{\"vertexMergingDistance\":0.005,\"meshDensityEqualization\":0,\"boundaryPreservationFactor\":0.5},\"uvAndAtlasSettings\":{\"uvStretchTolerance\":0},\"materialAndTextureBaking\":{\"bakingQuality\":\"medium\",\"bakeNormalMap\":true,\"bakeAOMap\":false}},\"compressionAndExport\":{\"fileExports\":[{\"fileType\":\"glb\",\"meshCompressionMethod\":\"none\",\"customScaling\":1,\"textureFormat\":{\"baseColor\":\"auto\",\"emissive\":\"auto\",\"normal\":\"auto\",\"orm\":\"auto\"}},{\"fileType\":\"usdz\",\"meshCompressionMethod\":\"none\",\"customScaling\":1,\"textureFormat\":{\"baseColor\":\"auto\",\"emissive\":\"auto\",\"normal\":\"auto\",\"orm\":\"auto\"}}]}}",
        "rpdx_version": "4.4.0",
        "user_id": 328,
        "created_at": "2021-04-22T09:11:30.000000Z",
        "updated_at": "2021-04-22T09:11:30.000000Z"
    },
    {
        "id": 12,
        "name": "test",
        "config": "{\"workflowSettings\":{\"targetMeshResolution\":{\"facePercentage\":50},\"targetTextureResolution\":{\"baseColor\":2048,\"emissive\":2048,\"normal\":2048,\"orm\":2048}},\"assetSimplification\":{\"meshDecimation\":{\"method\":\"rebake\"},\"topologySettings\":{\"vertexMergingDistance\":0.005,\"meshDensityEqualization\":0,\"boundaryPreservationFactor\":0.5},\"uvAndAtlasSettings\":{\"uvStretchTolerance\":0},\"materialAndTextureBaking\":{\"bakingQuality\":\"medium\",\"bakeNormalMap\":true,\"bakeAOMap\":false}},\"compressionAndExport\":{\"fileExports\":[{\"fileType\":\"glb\",\"meshCompressionMethod\":\"none\",\"customScaling\":1,\"textureFormat\":{\"baseColor\":\"ktx2\",\"emissive\":\"ktx2\",\"normal\":\"ktx2\",\"orm\":\"ktx2\"}},{\"fileType\":\"usdz\",\"meshCompressionMethod\":\"none\",\"customScaling\":1,\"textureFormat\":{\"baseColor\":\"auto\",\"emissive\":\"auto\",\"normal\":\"auto\",\"orm\":\"auto\"}}]}}",
        "rpdx_version": "4.4.0",
        "user_id": 328,
        "created_at": "2021-04-22T11:56:29.000000Z",
        "updated_at": "2021-04-22T11:56:29.000000Z"
    },
    {
        "id": 13,
        "name": "Preset Name",
        "config": "{\"workflowSettings\":{\"targetMeshResolution\":{\"facePercentage\":50},\"targetTextureResolution\":{\"baseColor\":2048,\"emissive\":2048,\"normal\":2048,\"orm\":2048}},\"assetSimplification\":{\"meshDecimation\":{\"method\":\"rebake\"},\"topologySettings\":{\"vertexMergingDistance\":0.005,\"meshDensityEqualization\":0,\"boundaryPreservationFactor\":0.5},\"uvAndAtlasSettings\":{\"uvStretchTolerance\":0},\"materialAndTextureBaking\":{\"bakingQuality\":\"medium\",\"bakeNormalMap\":true,\"bakeAOMap\":false}},\"compressionAndExport\":{\"fileExports\":[{\"fileType\":\"glb\",\"meshCompressionMethod\":\"none\",\"customScaling\":1,\"textureFormat\":{\"baseColor\":\"auto\",\"emissive\":\"auto\",\"normal\":\"auto\",\"orm\":\"auto\"}},{\"fileType\":\"usdz\",\"meshCompressionMethod\":\"none\",\"customScaling\":1,\"textureFormat\":{\"baseColor\":\"auto\",\"emissive\":\"auto\",\"normal\":\"auto\",\"orm\":\"auto\"}}]}}",
        "rpdx_version": "4.4.0",
        "user_id": 328,
        "created_at": "2021-04-26T07:11:17.000000Z",
        "updated_at": "2021-04-26T07:11:17.000000Z"
    }
]

Request      

GET api/preset

Rapid Model

Get Rapid Model.

requires authentication

Example request:

curl -X GET \
    -G "https://api.rapidcompact.com/api/rapidmodel/635" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/rapidmodel/635"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/rapidmodel/635'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):

{
    "data": {
        "id": 635,
        "name": "teapot ",
        "optimization_status": "done",
        "created_at": "2021-02-16T16:50:41+01:00",
        "updated_at": "2021-02-16T16:50:53+01:00",
        "progress": 100,
        "processing_step": "Done",
        "external": false,
        "rapid_compact_core_version": "4.3.0",
        "tags": [],
        "uuid": "d8316d1f-3c7d-4777-b72e-c760064f9d08",
        "accepted": false,
        "meta": {
            "size": 573420,
            "exportSize": 1029548
        },
        "rpd_info": "<link-to-rpd_info-file>",
        "rpd_warnings": "<link-to-warnings-file>",
        "downloads": {
            "glb": "<link-to-glb-file>"
        }
    }
}

Request      

GET api/rapidmodel/{rapidmodel}

URL Parameters

rapidmodel  integer optional  
ID of the rapid model.

Delete Rapid Model

requires authentication

Example request:

curl -X DELETE \
    "https://api.rapidcompact.com/api/rapidmodel/635" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/rapidmodel/635"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/rapidmodel/635'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request      

DELETE api/rapidmodel/{rapidmodel}

URL Parameters

rapidmodel  integer optional  
ID of the rapid model.

Get Exports Info

Calling this endpoint return a list of links to download the exports and their respective info.

requires authentication

Please note that the exports info are generated only for glb and lgtf formats.

Example request:

curl -X GET \
    -G "https://api.rapidcompact.com/api/rapidmodel/695/exports" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/rapidmodel/695/exports"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/rapidmodel/695/exports'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):

{
    "data": {
        "rapid.glb": {
            "download": "https:\/\/rapidcompact-models-staging.s3.eu-central-1.amazonaws.com\/rapid\/7998d523-2baa-413a-a4b1-12c37ee40fb8\/rapid.glb?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7SJJP4X2NUVUTN5%2F20210330%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20210330T111241Z&X-Amz-SignedHeaders=host&X-Amz-Expires=518400&X-Amz-Signature=cb08f19a1b1a73f23682d5ab67a947a91d720710c457a79537b4671113bc4c8e",
            "info": {
                "images": [
                    {
                        "channels": 3,
                        "height": 2048,
                        "mimetype": "image\/jpeg",
                        "slot": "normal",
                        "width": 2048
                    }
                ]
            }
        },
        "rapid.usdz": {
            "download": "https:\/\/rapidcompact-models-staging.s3.eu-central-1.amazonaws.com\/rapid\/7998d523-2baa-413a-a4b1-12c37ee40fb8\/rapid.usdz?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7SJJP4X2NUVUTN5%2F20210330%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20210330T111241Z&X-Amz-SignedHeaders=host&X-Amz-Expires=518400&X-Amz-Signature=65bb8c6b32f535fefb2ff09e5da81ca8256168afa2fe0216cb3907949d1ce503",
            "info": null
        }
    }
}

Request      

GET api/rapidmodel/{id}/exports

URL Parameters

id  integer optional  
ID of the rapid model.

Delete Tag of a Rapid Model

requires authentication

Example request:

curl -X DELETE \
    "https://api.rapidcompact.com/api/rapidmodel/281/tags/2" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/rapidmodel/281/tags/2"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/rapidmodel/281/tags/2'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request      

DELETE api/rapidmodel/{id}/tags/{tagId}

URL Parameters

id  integer optional  
ID of the base asset.

tagId  integer optional  
ID of the tag to be removed.

Update Rapid Model

requires authentication

Currently only scale tags can be updated.

Example request:

curl -X PUT \
    "https://api.rapidcompact.com/api/rapidmodel/281" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"tags":["odio","et"]}'
const url = new URL(
    "https://api.rapidcompact.com/api/rapidmodel/281"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "tags": [
        "odio",
        "et"
    ]
}

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/rapidmodel/281'
payload = {
    "tags": [
        "odio",
        "et"
    ]
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Request      

PUT api/rapidmodel/{id}

URL Parameters

id  integer optional  
ID of the base asset.

Body Parameters

tags  string[] optional  
Tags to be added to the model.

Delete Multiple Rapid Models

requires authentication

Example request:

curl -X POST \
    "https://api.rapidcompact.com/api/rapidmodel/delete" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"ids":[726,324]}'
const url = new URL(
    "https://api.rapidcompact.com/api/rapidmodel/delete"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": [
        726,
        324
    ]
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/rapidmodel/delete'
payload = {
    "ids": [
        726,
        324
    ]
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request      

POST api/rapidmodel/delete

Body Parameters

ids  integer[] optional  
Array of Ids to be deleted.

User

APIs for managing user profile.

Log in

Calling this endpoint would return a token that can be used for calling other endpoints.

Example request:

curl -X POST \
    "https://api.rapidcompact.com/api/login" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"email":"yourname@example.com","password":"your password"}'
const url = new URL(
    "https://api.rapidcompact.com/api/login"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "yourname@example.com",
    "password": "your password"
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/login'
payload = {
    "email": "yourname@example.com",
    "password": "your password"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request      

POST api/login

Body Parameters

email  string  
The email of the user.

password  string  
The password of the user.

Delete Account.

requires authentication

Delete the user account and all the data associated with it.

Example request:

curl -X POST \
    "https://api.rapidcompact.com/api/user/delete" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/user/delete"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/user/delete'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request      

POST api/user/delete

Webhooks

RapidCompact uses webhooks to notify your application when an event happens in your account. Webhooks are particularly useful for optimization events. Instead of polling the API to know the status of your optimization, RapidCompact sends optimization_finished event to your webhook.

Begin using webhooks with your RapidCompact integration in just three steps:

  1. Create a webhook endpoint on your server.
  2. Register the endpoint with RapidCompact to go live.
  3. Test your endpoint by clicking the test button in the webhooks page.

    What are webhooks

    The webhook endpoint is just more code on your server, which could be written in Ruby, PHP, Node.js, or whatever. The webhook endpoint has an associated URL (e.g., https://example.com/webhooks). The Rapid Compact notifications are Event objects. This Event object contains all the relevant information about what just happened, including the type of event and the data associated with that event. The webhook endpoint uses the event details to take any required actions, such as indicating that an optimization should be done.

Optimization Events

Currently RapidCompact sends one type of events (Optimization_finished events). The event looks like this:

  {
   "event_type": "optimization_finished",
   "timestamp": "2021-02-19T15:03:08.076920Z",
   "data": {
     "status": "Successful",
     "message": "Optimization has ended and your rapid model is available to download.",
     "rawmodel_id": 1961,
     "rapidmodel_id": 4213,
     "rapidmodel": {
       "rapid.glb": <link-to-the-rapidmodel>
     }
   }
 }

Get Webhooks

requires authentication

Get a list of available webhooks.

Example request:

curl -X GET \
    -G "https://api.rapidcompact.com/api/user/webhooks" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/user/webhooks"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/user/webhooks'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Request      

GET api/user/webhooks

Add Webhook

requires authentication

Add new webhook to receive events

Example request:

curl -X POST \
    "https://api.rapidcompact.com/api/user/webhooks" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"url":"https:\/\/example.com\/webhook","secret":"natus","verify_ssl":false}'
const url = new URL(
    "https://api.rapidcompact.com/api/user/webhooks"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "url": "https:\/\/example.com\/webhook",
    "secret": "natus",
    "verify_ssl": false
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/user/webhooks'
payload = {
    "url": "https:\/\/example.com\/webhook",
    "secret": "natus",
    "verify_ssl": false
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request      

POST api/user/webhooks

Body Parameters

url  string  
The url of the webhook.

secret  string optional  
optional A secret to be sent in the header of webhook requests.

verify_ssl  boolean  
Whether to verify ssl or not.

Delete Webhook

requires authentication

Example request:

curl -X DELETE \
    "https://api.rapidcompact.com/api/user/webhooks/1" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/user/webhooks/1"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/user/webhooks/1'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Request      

DELETE api/user/webhooks/{id}

URL Parameters

id  string optional  
ID of the webhook to be deleted.

Test Webhook

requires authentication

Calling this endpoint with empty payload, a test event will be sent to the webhook to make sure it is accessible and can receive events.

Example request:

curl -X POST \
    "https://api.rapidcompact.com/api/user/webhooks/test/1" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/user/webhooks/test/1"
);

let headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
import requests
import json

url = 'https://api.rapidcompact.com/api/user/webhooks/test/1'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers)
response.json()

Request      

POST api/user/webhooks/test/{id}

URL Parameters

id  string optional  
ID of the webhook to be deleted.