MENU navbar-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

Authenticate requests to this API's endpoints by sending 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 --request GET \
    --get "https://api.rapidcompact.com/api/user/tokens" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/user/tokens"
);

const 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()

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-frame-options: ALLOWALL
vary: Origin
 

{
    "message": "Invalid token",
    "error": "Token format is invalid"
}
 

Request      

GET api/user/tokens

Create Token

requires authentication

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

const 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 --request DELETE \
    "https://api.rapidcompact.com/api/user/tokens/inventore" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/user/tokens/inventore"
);

const 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/inventore'
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}

URL Parameters

id  string  

The ID of the token.

Get Token

requires authentication

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

const 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/voluptas'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

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

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-frame-options: ALLOWALL
vary: Origin
 

{
    "message": "Invalid token",
    "error": "Token format is invalid"
}
 

Request      

GET api/user/tokens/{id}

URL Parameters

id  string  

The 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 --request GET \
    --get "https://api.rapidcompact.com/api/rawmodel/jobs" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/rawmodel/jobs"
);

const 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()

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-frame-options: ALLOWALL
vary: Origin
 

{
    "message": "Invalid token",
    "error": "Token format is invalid"
}
 

Request      

GET api/rawmodel/jobs

Process [Deprecated]

requires authentication

Please use optimize endpoint instead.

Example request:
curl --request POST \
    "https://api.rapidcompact.com/api/rawmodel/process/officia" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"max_size_mb\": 86.5249386,
    \"config\": \"animi\",
    \"formats\": \"[\\\"adipisci\\\",\\\"modi\\\"]\"
}"
const url = new URL(
    "https://api.rapidcompact.com/api/rawmodel/process/officia"
);

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

let body = {
    "max_size_mb": 86.5249386,
    "config": "animi",
    "formats": "[\"adipisci\",\"modi\"]"
}

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

url = 'https://api.rapidcompact.com/api/rawmodel/process/officia'
payload = {
    "max_size_mb": 86.5249386,
    "config": "animi",
    "formats": "[\"adipisci\",\"modi\"]"
}
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/process/{id}

URL Parameters

id  string  

The ID of the process.

Body Parameters

max_size_mb  number optional  

config  string  

formats  string optional  

Must be a valid JSON string.

Optimize

requires authentication

Example request:
curl --request POST \
    "https://api.rapidcompact.com/api/rawmodel/optimize/occaecati" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"tags\": [
        \"low quality\",
        \"mb target\"
    ],
    \"config\": \"ea\",
    \"exportName\": \"omnis\",
    \"max_size_mb\": 3.018,
    \"formats\": \"[\\\"iste\\\",\\\"possimus\\\"]\"
}"
const url = new URL(
    "https://api.rapidcompact.com/api/rawmodel/optimize/occaecati"
);

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

let body = {
    "tags": [
        "low quality",
        "mb target"
    ],
    "config": "ea",
    "exportName": "omnis",
    "max_size_mb": 3.018,
    "formats": "[\"iste\",\"possimus\"]"
}

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/occaecati'
payload = {
    "tags": [
        "low quality",
        "mb target"
    ],
    "config": "ea",
    "exportName": "omnis",
    "max_size_mb": 3.018,
    "formats": "[\"iste\",\"possimus\"]"
}
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  string  

The ID of the optimize.

Body Parameters

tags  string[] optional  

A list of tags to be linked to the rapid model.

config  string  

exportName  string optional  

The desired filename of the export.

max_size_mb  number optional  

formats  string optional  

Must be a valid JSON string.

Get Base Asset

requires authentication

Example request:
curl --request GET \
    --get "https://api.rapidcompact.com/api/rawmodel/nihil" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/rawmodel/nihil"
);

const 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/nihil'
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  string  

The ID of the rawmodel.

Delete Base Asset

requires authentication

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

const 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/sed'
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  string  

The ID of the rawmodel.

Delete Tag of a Base Asset

requires authentication

Example request:
curl --request DELETE \
    "https://api.rapidcompact.com/api/rawmodel/omnis/tags/6" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/rawmodel/omnis/tags/6"
);

const 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/omnis/tags/6'
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  string  

The ID of the rawmodel.

tagId  integer  

Update Base Asset

requires authentication

Currently only scale factor can be updated.

Example request:
curl --request PUT \
    "https://api.rapidcompact.com/api/rawmodel/libero" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"scale_factor\": 0.5
}"
const url = new URL(
    "https://api.rapidcompact.com/api/rawmodel/libero"
);

const 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/libero'
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  string  

The ID of the rawmodel.

Body Parameters

scale_factor  number optional  

Scale factor to be applied to the base asset.

Delete Multiple Base Assets

requires authentication

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

const 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](?#complete-upload)

requires authentication

Example request:
curl --request POST \
    "https://api.rapidcompact.com/api/rawmodel/api-upload/start" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"filenames\": \"illo\",
    \"model_name\": \"et\",
    \"is_zip\": false
}"
const url = new URL(
    "https://api.rapidcompact.com/api/rawmodel/api-upload/start"
);

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

let body = {
    "filenames": "illo",
    "model_name": "et",
    "is_zip": false
}

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": "illo",
    "model_name": "et",
    "is_zip": 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()

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  

model_name  string  

is_zip  boolean optional  

Complete upload Call this endpoint after you have retrieved the [ID of the base asset](?#get-upload-link) and uploaded the model.

requires authentication

Example request:
curl --request GET \
    --get "https://api.rapidcompact.com/api/rawmodel/totam/api-upload/complete" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/rawmodel/totam/api-upload/complete"
);

const 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/totam/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  string  

Get Rapid Models

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

Example request:
curl --request GET \
    --get "https://api.rapidcompact.com/api/rawmodel/7/rapidmodels" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/rawmodel/7/rapidmodels"
);

const 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/7/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  

Embeds

Get Embeds

requires authentication

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

const 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()

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-frame-options: ALLOWALL
vary: Origin
 

{
    "message": "Invalid token",
    "error": "Token format is invalid"
}
 

Request      

GET api/embeds

Create Embed

requires authentication

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

const 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 --request DELETE \
    "https://api.rapidcompact.com/api/embeds/2" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/embeds/2"
);

const 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/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/embeds/{id}

URL Parameters

id  integer  

The ID of the embed.

General

User's tags.

Example request:
curl --request GET \
    --get "https://api.rapidcompact.com/api/rawmodel/tags" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/rawmodel/tags"
);

const 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/tags'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

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

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
x-frame-options: ALLOWALL
vary: Origin
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/rawmodel/tags

User's tags.

Example request:
curl --request GET \
    --get "https://api.rapidcompact.com/api/rapidmodel/tags" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/rapidmodel/tags"
);

const 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/rapidmodel/tags'
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

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

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 58
x-frame-options: ALLOWALL
vary: Origin
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/rapidmodel/tags

Presets

Create a new preset.

requires authentication

Example request:
curl --request POST \
    "https://api.rapidcompact.com/api/preset/create" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Preset Name\",
    \"config\": \"aut\",
    \"max_size_mb\": 266258.04664868,
    \"formats\": \"[\\\"natus\\\",\\\"libero\\\"]\"
}"
const url = new URL(
    "https://api.rapidcompact.com/api/preset/create"
);

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

let body = {
    "name": "Preset Name",
    "config": "aut",
    "max_size_mb": 266258.04664868,
    "formats": "[\"natus\",\"libero\"]"
}

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": "aut",
    "max_size_mb": 266258.04664868,
    "formats": "[\"natus\",\"libero\"]"
}
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  string  

max_size_mb  number optional  

formats  string optional  

Must be a valid JSON string.

Update an existing preset.

requires authentication

Example request:
curl --request PATCH \
    "https://api.rapidcompact.com/api/preset/update" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": 42,
    \"name\": \"Preset Name\",
    \"config\": \"ut\",
    \"max_size_mb\": 4043844,
    \"formats\": \"[\\\"aut\\\",\\\"porro\\\"]\"
}"
const url = new URL(
    "https://api.rapidcompact.com/api/preset/update"
);

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

let body = {
    "id": 42,
    "name": "Preset Name",
    "config": "ut",
    "max_size_mb": 4043844,
    "formats": "[\"aut\",\"porro\"]"
}

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

url = 'https://api.rapidcompact.com/api/preset/update'
payload = {
    "id": 42,
    "name": "Preset Name",
    "config": "ut",
    "max_size_mb": 4043844,
    "formats": "[\"aut\",\"porro\"]"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

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

Request      

PATCH api/preset/update

Body Parameters

id  integer optional  

Id of the preset to update.

name  string optional  

Name of the preset.

config  string  

max_size_mb  number optional  

formats  string optional  

Must be a valid JSON string.

Get given api preset as cli format zip.

requires authentication

Example request:
curl --request POST \
    "https://api.rapidcompact.com/api/preset/rpdx" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"preset\": {
        \"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/rpdx"
);

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

let body = {
    "preset": {
        "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/rpdx'
payload = {
    "preset": {
        "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/rpdx

Body Parameters

preset  object optional  

Preset in API format. This object needs to comply with this json schema.

Gets a bundle of the preset in the RPDX CLI format.

requires authentication

Example request:
curl --request GET \
    --get "https://api.rapidcompact.com/api/preset/rpdx/nulla" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/preset/rpdx/nulla"
);

const 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/rpdx/nulla'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

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

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-frame-options: ALLOWALL
vary: Origin
 

{
    "message": "Invalid token",
    "error": "Token format is invalid"
}
 

Request      

GET api/preset/rpdx/{id}

URL Parameters

id  string  

The ID of the rpdx.

Get Preset

requires authentication

Example request:
curl --request GET \
    --get "https://api.rapidcompact.com/api/preset/18" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/preset/18"
);

const 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/18'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

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

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-frame-options: ALLOWALL
vary: Origin
 

{
    "message": "Invalid token",
    "error": "Token format is invalid"
}
 

Request      

GET api/preset/{id}

URL Parameters

id  integer  

The ID of the preset.

Delete preset

requires authentication

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

const 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/5'
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  

The ID of the preset.

Get all presets of user

requires authentication

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

const 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 --request GET \
    --get "https://api.rapidcompact.com/api/rapidmodel/8" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/rapidmodel/8"
);

const 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/8'
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/{id}

URL Parameters

rapidmodel  integer optional  

ID of the rapid model.

id  integer  

The ID of the rapidmodel.

Delete Rapid Model

requires authentication

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

const 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/3'
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}

URL Parameters

rapidmodel  integer optional  

ID of the rapid model.

id  integer  

The ID of the rapidmodel.

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 --request GET \
    --get "https://api.rapidcompact.com/api/rapidmodel/4/exports" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/rapidmodel/4/exports"
);

const 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/4/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  

The ID of the rapidmodel.

Delete Tag of a Rapid Model

requires authentication

Example request:
curl --request DELETE \
    "https://api.rapidcompact.com/api/rapidmodel/9/tags/13" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/rapidmodel/9/tags/13"
);

const 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/9/tags/13'
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  

The ID of the rapidmodel.

tagId  integer  

Update Rapid Model

requires authentication

Currently only scale tags can be updated.

Example request:
curl --request PUT \
    "https://api.rapidcompact.com/api/rapidmodel/9" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"tags\": [
        \"et\",
        \"quisquam\"
    ]
}"
const url = new URL(
    "https://api.rapidcompact.com/api/rapidmodel/9"
);

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

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

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

url = 'https://api.rapidcompact.com/api/rapidmodel/9'
payload = {
    "tags": [
        "et",
        "quisquam"
    ]
}
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  

The ID of the rapidmodel.

Body Parameters

tags  string[] optional  

Tags to be added to the model.

Delete Multiple Rapid Models

requires authentication

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

const 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 --request POST \
    "https://api.rapidcompact.com/api/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"yourname@example.com\",
    \"password\": \"your password\"
}"
const url = new URL(
    "https://api.rapidcompact.com/api/login"
);

const 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 --request POST \
    "https://api.rapidcompact.com/api/user/delete" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/user/delete"
);

const 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 --request GET \
    --get "https://api.rapidcompact.com/api/user/webhooks" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/user/webhooks"
);

const 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()

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
x-frame-options: ALLOWALL
vary: Origin
 

{
    "message": "Invalid token",
    "error": "Token format is invalid"
}
 

Request      

GET api/user/webhooks

Add Webhook

requires authentication

Add new webhook to receive events

Example request:
curl --request POST \
    "https://api.rapidcompact.com/api/user/webhooks" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"url\": \"https:\\/\\/example.com\\/webhook\",
    \"secret\": \"laboriosam\",
    \"verify_ssl\": false
}"
const url = new URL(
    "https://api.rapidcompact.com/api/user/webhooks"
);

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

let body = {
    "url": "https:\/\/example.com\/webhook",
    "secret": "laboriosam",
    "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": "laboriosam",
    "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 --request DELETE \
    "https://api.rapidcompact.com/api/user/webhooks/3" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/user/webhooks/3"
);

const 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/3'
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  integer  

The ID of the webhook.

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 --request POST \
    "https://api.rapidcompact.com/api/user/webhooks/test/sit" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.rapidcompact.com/api/user/webhooks/test/sit"
);

const 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/sit'
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  

The ID of the test.