openapi: 3.0.3 info: title: 'RapidCompact API v2 Documentation' description: '' version: 1.0.0 servers: - url: 'https://api.rapidcompact.com' paths: /api/v2/user/tokens: get: summary: 'Get Tokens' operationId: getTokens description: '' parameters: [] responses: 200: description: success content: text/plain: schema: type: string example: "[\n\t{\n\t\t\"id\": 222,\n\t\t\"name\": \"name of api token\",\n\t\t\"last_used_at\": \"2021-09-01T11:21:22.000000Z\",\n\t\t\"created_at\": \"2021-09-01T10:26:57.000000Z\",\n\t\t\"optimization_count\": 42,\n\t}\n]" tags: - 'API Tokens' /api/v2/user/tokens/create: post: summary: 'Create Token' operationId: createToken description: '' parameters: [] responses: 200: description: success content: text/plain: schema: type: string example: 234|y5NGBTJk5OX5Zva5RfxTz0GkXEL9axN79vTfsJOH tags: - 'API Tokens' requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: 'The name of the API token' example: 'name of new api token' required: - name '/api/v2/user/tokens/{id}': delete: summary: 'Delete Token' operationId: deleteToken description: '' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: 'Invalid token' error: 'Token format is invalid' properties: message: type: string example: 'Invalid token' error: type: string example: 'Token format is invalid' tags: - 'API Tokens' get: summary: 'Get Token' operationId: getToken description: '' parameters: [] responses: 200: description: success content: application/json: schema: type: object example: id: 1 tokenable_type: App\Models\User tokenable_id: 45 name: 'name of api token' abilities: - '*' last_used_at: null created_at: '2021-10-26T10:38:07.000000Z' updated_at: '2021-10-26T10:38:07.000000Z' plain_text: '' properties: id: type: integer example: 1 tokenable_type: type: string example: App\Models\User tokenable_id: type: integer example: 45 name: type: string example: 'name of api token' abilities: type: array example: - '*' items: type: string last_used_at: type: string example: null created_at: type: string example: '2021-10-26T10:38:07.000000Z' updated_at: type: string example: '2021-10-26T10:38:07.000000Z' plain_text: type: string example: '' tags: - 'API Tokens' parameters: - in: path name: id description: 'The id of the API token' example: 42 required: true schema: type: integer '/api/v2/rawmodel/optimize/{id}': post: summary: Optimize operationId: optimize description: "There are two ways to optimize a base asset:\n\nIn the first way send a config as a json object that complies with the [API Optimize Schema](https://rapidcompact.com/doc), or send the id of one of your presets or of a factoryPreset\n\nYou can use our \"optimization_finished\" webhook to get notified when your model has been optimized. It also includes downloadlinks to your optimized model\n\nThe \"Try it out\" feature for this endpoint only works with the preset_id parameter. It doesn't work with the config parameter, because the config gets sent as a string, but it needs to be a json object. Please checkout the example on the right on how to set the config parameter" parameters: [] responses: 200: description: success content: application/json: schema: type: object example: id: 281 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 properties: id: type: integer example: 281 name: type: string example: teapot.obj optimization_status: type: string example: sent_to_queue job_status: type: object properties: id: type: integer example: 518 job_id: type: string example: null type: type: string example: App\Jobs\ProcessRawModel queue: type: string example: null attempts: type: integer example: 0 progress_now: type: integer example: 0 progress_max: type: integer example: 0 status: type: string example: queued input: type: string example: null output: type: string example: null created_at: type: string example: '2021-02-15T13:34:52.000000Z' updated_at: type: string example: '2021-02-15T13:34:52.000000Z' started_at: type: string example: null finished_at: type: string example: null key: type: string example: 'rapid_model:624' progress: type: integer example: 0 processing_step: type: string example: 'Scheduled for processing' external: type: string example: null rawmodel: type: object properties: id: type: integer example: 282 name: type: string example: teapot.obj processing: type: boolean example: true tags: - 'Base Asset' requestBody: required: false content: application/json: schema: type: object properties: config: type: object description: 'The config of the optimizer as a json object complying with the [API Optimize Schema](https://rapidcompact.com/doc). Do not use config in combination with preset_id. They are mutually exclusive' example: schema: '2.5' limits: faces: count: 30000 textures: 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: png orm: auto properties: { } preset_id: type: integer description: 'The id one of your presets or of a factoryPreset. Do not use preset_id in combination with config. They are mutually exclusive' example: null tags: type: array description: 'A list of tags that will be added to the rapid model' example: - Low-Poly - MyTag items: type: string parameters: - in: path name: id description: 'The id of the base asset' example: 281 required: true schema: type: integer /api/v2/rawmodel/optimize: post: summary: 'Multi Optimize' operationId: multiOptimize description: "Optimizes multiple models with one request\n\nUse the same format as in the optimization endpoint but pass it in an array which contains the request as config (preset_id or config as json object) and the model_id of the base assets you want to process\n\nLook at the example request for the data structure\n\nYou can use our \"optimization_finished\" webhook to get notified when your model has been optimized. It also includes download links to your optimized model" parameters: [] responses: 204: description: success 400: description: error content: text/plain: schema: type: string example: 'Could not process request: Missing required parameter' 500: description: error content: text/plain: schema: type: string example: 'An error occurred while processing your request: ...' tags: - 'Base Asset' requestBody: required: true content: application/json: schema: type: object properties: optimizations: type: array description: 'The array containing the models and configurations you want to process' example: - model_id: 89 config: preset_id: 2004 tags: - 'Lens Studio 3D' - 'Medium Resolution' - Low-Poly exportName: calibrationTarget.glb - model_id: 77 config: preset_id: 2004 tags: - 'Lens Studio 3D' - 'Medium Resolution' - Mid-Poly exportName: DamagedHelmet.glb items: type: string required: - optimizations /api/v2/rawmodel/jobs: get: summary: 'Get Running Jobs' operationId: getRunningJobs description: 'Returns rapidmodels (until 1 week) that are still being processed or were not successfully optimized' parameters: [] responses: 200: description: success content: application/json: schema: type: object example: data: - id: 5812 name: TVBench optimization_status: failed job_status: id: 3601 job_id: edab51b2-1c47-4a0f-b807-58e913dbabc9 type: App\Jobs\ProcessRawModel queue: default attempts: 1 progress_now: 100 progress_max: 100 status: finished input: null output: '{"exit_code":1}' created_at: '2021-10-11 20:08:52' updated_at: '2021-10-11 20:08:53' started_at: '2021-10-11 20:08:52' finished_at: '2021-10-11 20:08:53' key: 'rapid_model:5812' progress: 100 processing_step: Done external: false rawmodel: id: 2257 name: TVBench properties: data: type: array example: - id: 5812 name: TVBench optimization_status: failed job_status: id: 3601 job_id: edab51b2-1c47-4a0f-b807-58e913dbabc9 type: App\Jobs\ProcessRawModel queue: default attempts: 1 progress_now: 100 progress_max: 100 status: finished input: null output: '{"exit_code":1}' created_at: '2021-10-11 20:08:52' updated_at: '2021-10-11 20:08:53' started_at: '2021-10-11 20:08:52' finished_at: '2021-10-11 20:08:53' key: 'rapid_model:5812' progress: 100 processing_step: Done external: false rawmodel: id: 2257 name: TVBench items: type: object properties: id: type: integer example: 5812 name: type: string example: TVBench optimization_status: type: string example: failed job_status: type: object properties: id: type: integer example: 3601 job_id: type: string example: edab51b2-1c47-4a0f-b807-58e913dbabc9 type: type: string example: App\Jobs\ProcessRawModel queue: type: string example: default attempts: type: integer example: 1 progress_now: type: integer example: 100 progress_max: type: integer example: 100 status: type: string example: finished input: type: string example: null output: type: string example: '{"exit_code":1}' created_at: type: string example: '2021-10-11 20:08:52' updated_at: type: string example: '2021-10-11 20:08:53' started_at: type: string example: '2021-10-11 20:08:52' finished_at: type: string example: '2021-10-11 20:08:53' key: type: string example: 'rapid_model:5812' progress: type: integer example: 100 processing_step: type: string example: Done external: type: boolean example: false rawmodel: type: object properties: id: type: integer example: 2257 name: type: string example: TVBench tags: - 'Base Asset' '/api/v2/rawmodel/{id}': get: summary: 'Get Base Asset' operationId: getBaseAsset description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: 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' tags: - id: 241 name: Mid-Poly created_at: '2022-12-12 13:12:37+00' updated_at: '2022-12-12 13:12:37+00' raw_id: 281 downloads: error.log: 'signed url for the error.log' info.log: 'signed url for info.log' metrics.json: 'signed url for the metrics.json' rpd_info.json: 'signed url for the rpd_info.json' teapot.obj: 'signed url for the teapot.obj' thumb.jpg: 'signed url for the thumb.jpg' properties: data: type: object properties: id: type: integer example: 281 name: type: string example: teapot processing: type: boolean example: false external: type: boolean example: false upload_status: type: string example: complete size: type: integer example: 438680 created_at: type: string example: '2021-02-08T16:59:52+01:00' rapid_models: type: array example: - 635 - 617 items: type: integer scale_factor: type: string example: '10' tags: type: array example: - id: 241 name: Mid-Poly created_at: '2022-12-12 13:12:37+00' updated_at: '2022-12-12 13:12:37+00' raw_id: 281 items: type: object properties: id: type: integer example: 241 name: type: string example: Mid-Poly created_at: type: string example: '2022-12-12 13:12:37+00' updated_at: type: string example: '2022-12-12 13:12:37+00' raw_id: type: integer example: 281 downloads: type: object properties: error.log: type: string example: 'signed url for the error.log' info.log: type: string example: 'signed url for info.log' metrics.json: type: string example: 'signed url for the metrics.json' rpd_info.json: type: string example: 'signed url for the rpd_info.json' teapot.obj: type: string example: 'signed url for the teapot.obj' thumb.jpg: type: string example: 'signed url for the thumb.jpg' tags: - 'Base Asset' delete: summary: 'Delete Base Asset' operationId: deleteBaseAsset description: '' parameters: [] responses: 200: description: success content: text/plain: schema: type: string example: '' tags: - 'Base Asset' put: summary: 'Update Base Asset - Add Tags, Set scale factor' operationId: updateBaseAssetAddTagsSetScaleFactor description: 'A tag can have 255 utf-8 characters including whitespaces' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: 'Invalid token' error: 'Token format is invalid' properties: message: type: string example: 'Invalid token' error: type: string example: 'Token format is invalid' tags: - 'Base Asset' requestBody: required: false content: application/json: schema: type: object properties: tags: type: array description: 'A list of tags that will be added to the base asset' example: - 'low poly' - 'mb target' items: type: string scale_factor: type: number description: 'The new scale factor that will be applied to the base asset' example: 0.5 parameters: - in: path name: id description: 'The id of the base asset' example: 281 required: true schema: type: integer '/api/v2/rawmodel/{id}/downloads': get: summary: 'Get Download URLs' operationId: getDownloadURLs description: 'Returns a list of urls to download the individual base asset files' parameters: [] responses: 200: description: success content: application/json: schema: type: object example: RezColorChecker.mtl: 'https://s3.eu-central-1.amazonaws.com/rapidcompact-models-...' RezColorChecker.obj: 'https://s3.eu-central-1.amazonaws.com/rapidcompact-models-...' RezColorChecker.png: 'https://s3.eu-central-1.amazonaws.com/rapidcompact-models-...' properties: RezColorChecker.mtl: type: string example: 'https://s3.eu-central-1.amazonaws.com/rapidcompact-models-...' RezColorChecker.obj: type: string example: 'https://s3.eu-central-1.amazonaws.com/rapidcompact-models-...' RezColorChecker.png: type: string example: 'https://s3.eu-central-1.amazonaws.com/rapidcompact-models-...' tags: - 'Base Asset' parameters: - in: path name: id description: 'The id of the base asset' example: 281 required: true schema: type: integer '/api/v2/rawmodel/{id}/downloads/pbr': get: summary: 'Get imported DCC files' operationId: getImportedDCCFiles description: 'Returns a list of urls to download the individual converted DCC material and quality control files' parameters: [] responses: 200: description: success content: text/plain: schema: type: string example: "{\n \"materials\" : {\n \"ao.png\":\"https:\\/\\/s3.eu-central-1.amazonaws.com\\/rapidcompact-models-...\",\n \"diffuse.png\":\"https:\\/\\/s3.eu-central-1.amazonaws.com\\/rapidcompact-models-...\",\n },\n \"qc\": {\n \"render_0.png\":\"https:\\/\\/s3.eu-central-1.amazonaws.com\\/rapidcompact-models-...\",\n \"render_1.png\":\"https:\\/\\/s3.eu-central-1.amazonaws.com\\/rapidcompact-models-...\",\n \"diff_0.png\":\"https:\\/\\/s3.eu-central-1.amazonaws.com\\/rapidcompact-models-...\",\n \"diff_1.png\":\"https:\\/\\/s3.eu-central-1.amazonaws.com\\/rapidcompact-models-...\",\n }\n}" tags: - 'Base Asset' parameters: - in: path name: id description: 'The id of the base asset' example: 281 required: true schema: type: integer '/api/v2/rawmodel/{id}/downloads/zip': get: summary: 'Download zip' operationId: downloadZip description: "Downloads all model files as zip.\n\nA stream is returned which contains the model data." parameters: [] responses: 200: description: success content: text/plain: schema: type: string example: 'Streamed response' tags: - 'Base Asset' parameters: - in: path name: id description: 'The id of the base asset' example: 281 required: true schema: type: integer '/api/v2/rawmodel/{id}/tags/{tagId}': delete: summary: 'Delete Tag of a Base Asset' operationId: deleteTagOfABaseAsset description: '' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: 'Invalid token' error: 'Token format is invalid' properties: message: type: string example: 'Invalid token' error: type: string example: 'Token format is invalid' tags: - 'Base Asset' parameters: - in: path name: id description: 'The id of the base asset' example: 281 required: true schema: type: integer - in: path name: tagId description: 'The id of the tag that will be deleted' example: 2 required: true schema: type: integer /api/v2/rawmodel: get: summary: 'Get Base Assets' operationId: getBaseAssets description: 'Paginated response of your base assets. Search for base assets by name or tag' parameters: - in: query name: q description: 'Optional parameter to search for base assets by name or tag' example: yourSearchString required: false schema: type: string description: 'Optional parameter to search for base assets by name or tag' example: yourSearchString responses: 200: description: success content: application/json: schema: type: object example: data: - id: 1 name: teapot external: false upload_status: complete size: 315088 created_at: '2022-05-24T15:05:47+02:00' scale_factor: '1' has_errors: true format: fbx tags: - id: 1 name: Low-Poly created_at: '2022-05-24 15:06:03' updated_at: '2022-05-24 15:06:03' raw_id: 1 downloads: error.log: 'signed url for the error.log' info.log: 'signed url for info.log' metrics.json: 'signed url for the metrics.json' rpd_info.json: 'signed url for the rpd_info.json' teapot.fbx: 'signed url for the teapot.obj' thumb.jpg: 'signed url for the thumb.jpg' warning.log: 'signed url for the warning.log' links: first: 'https://url/api/v2/rawmodel?page=1' last: 'https://url/api/v2/rawmodel?page=1' prev: null next: null meta: current_page: 1 from: 1 last_page: 1 links: - url: null label: '« Previous' active: false - url: 'https://url/api/v2/rawmodel?page=1' label: '1' active: true - url: null label: 'Next »' active: false path: 'https://url/api/v2/rawmodel' per_page: 10 to: 1 total: 1 properties: data: type: array example: - id: 1 name: teapot external: false upload_status: complete size: 315088 created_at: '2022-05-24T15:05:47+02:00' scale_factor: '1' has_errors: true format: fbx tags: - id: 1 name: Low-Poly created_at: '2022-05-24 15:06:03' updated_at: '2022-05-24 15:06:03' raw_id: 1 downloads: error.log: 'signed url for the error.log' info.log: 'signed url for info.log' metrics.json: 'signed url for the metrics.json' rpd_info.json: 'signed url for the rpd_info.json' teapot.fbx: 'signed url for the teapot.obj' thumb.jpg: 'signed url for the thumb.jpg' warning.log: 'signed url for the warning.log' items: type: object properties: id: type: integer example: 1 name: type: string example: teapot external: type: boolean example: false upload_status: type: string example: complete size: type: integer example: 315088 created_at: type: string example: '2022-05-24T15:05:47+02:00' scale_factor: type: string example: '1' has_errors: type: boolean example: true format: type: string example: fbx tags: type: array example: - id: 1 name: Low-Poly created_at: '2022-05-24 15:06:03' updated_at: '2022-05-24 15:06:03' raw_id: 1 items: type: object properties: id: type: integer example: 1 name: type: string example: Low-Poly created_at: type: string example: '2022-05-24 15:06:03' updated_at: type: string example: '2022-05-24 15:06:03' raw_id: type: integer example: 1 downloads: type: object properties: error.log: type: string example: 'signed url for the error.log' info.log: type: string example: 'signed url for info.log' metrics.json: type: string example: 'signed url for the metrics.json' rpd_info.json: type: string example: 'signed url for the rpd_info.json' teapot.fbx: type: string example: 'signed url for the teapot.obj' thumb.jpg: type: string example: 'signed url for the thumb.jpg' warning.log: type: string example: 'signed url for the warning.log' links: type: object properties: first: type: string example: 'https://url/api/v2/rawmodel?page=1' last: type: string example: 'https://url/api/v2/rawmodel?page=1' prev: type: string example: null next: type: string example: null meta: type: object properties: current_page: type: integer example: 1 from: type: integer example: 1 last_page: type: integer example: 1 links: type: array example: - url: null label: '« Previous' active: false - url: 'https://url/api/v2/rawmodel?page=1' label: '1' active: true - url: null label: 'Next »' active: false items: type: object properties: url: type: string example: null label: type: string example: '« Previous' active: type: boolean example: false path: type: string example: 'https://url/api/v2/rawmodel' per_page: type: integer example: 10 to: type: integer example: 1 total: type: integer example: 1 tags: - 'Base Asset' /api/v2/rawmodel/delete: post: summary: 'Delete Multiple Base Assets' operationId: deleteMultipleBaseAssets description: '' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: 'Invalid token' error: 'Token format is invalid' properties: message: type: string example: 'Invalid token' error: type: string example: 'Token format is invalid' tags: - 'Base Asset' requestBody: required: true content: application/json: schema: type: object properties: ids: type: array description: 'An array of base asset ids that should be deleted' example: - 726 - 324 items: type: integer required: - ids /api/v2/rawmodel/api-upload/start: post: summary: 'Create Base Asset - Get Upload Link' operationId: createBaseAssetGetUploadLink description: "Calling this endpoint will return an id for the new base asset and presigned URLs which need to be used to upload the files directly to our storage. The URLs are unique for every file.\nThe \"complete_upload\" field will contain a link to the \"Create Base Asset - Complete Upload\" endpoint that needs to be called when the upload is done" parameters: [] responses: 200: description: success content: application/json: schema: type: object example: id: 1 links: s3_upload_urls: mymodel.glb: 'signed url for mymodel.glb' material.mat: 'signed url for material.mat' complete_upload: 'https://api.rapidcompact.com/api/rawmodels/1/api-upload/complete' properties: id: type: integer example: 1 links: type: object properties: s3_upload_urls: type: object properties: mymodel.glb: type: string example: 'signed url for mymodel.glb' material.mat: type: string example: 'signed url for material.mat' complete_upload: type: string example: 'https://api.rapidcompact.com/api/rawmodels/1/api-upload/complete' tags: - 'Base Asset' requestBody: required: true content: application/json: schema: type: object properties: model_name: type: string description: 'The name of the base asset' example: teapot filenames: type: array description: 'The names of the files to be uploaded' example: - mymodel.glb - material.mat items: type: string is_zip: type: boolean description: 'Indicate if the file is a zip' example: null required: - model_name - filenames '/api/v2/rawmodel/{id}/api-upload/complete': get: summary: 'Create Base Asset - Complete Upload' operationId: createBaseAssetCompleteUpload description: "Call this endpoint with the received base asset id from the \"Create Base Asset - Get Upload Link\" endpoint after uploading the base asset files\n\nYou can use our \"analysis_finished\" webhook to get notified when your model is ready to be optimized" parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: 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: 'signed url for the error.log' info.log: 'signed url for the info.log' metrics.json: 'signed url for the metrics.json' rpd_info.json: 'signed url for the rpd_info.json' teapot.obj: 'signed url for the uploaded file' thumb.jpg: 'signed url for the thumb.jpg' properties: data: type: object properties: id: type: integer example: 281 name: type: string example: teapot processing: type: boolean example: false upload_status: type: string example: complete size: type: integer example: 438680 created_at: type: string example: '2021-02-08T16:59:52+01:00' rapid_models: type: array example: - 635 - 617 items: type: integer scale_factor: type: string example: '10' downloads: type: object properties: error.log: type: string example: 'signed url for the error.log' info.log: type: string example: 'signed url for the info.log' metrics.json: type: string example: 'signed url for the metrics.json' rpd_info.json: type: string example: 'signed url for the rpd_info.json' teapot.obj: type: string example: 'signed url for the uploaded file' thumb.jpg: type: string example: 'signed url for the thumb.jpg' tags: - 'Base Asset' parameters: - in: path name: id description: 'The id of base asset' example: 281 required: true schema: type: integer '/api/v2/rawmodel/{id}/api-upload/retry': post: summary: 'Retries a failed import.' operationId: retriesAFailedImport description: '' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: 'Invalid token' error: 'Token format is invalid' properties: message: type: string example: 'Invalid token' error: type: string example: 'Token format is invalid' tags: - 'Base Asset' parameters: - in: path name: id description: 'The id of the base asset' example: 281 required: true schema: type: integer '/api/v2/rawmodel/{id}/rapidmodels': get: summary: 'Get Associated Rapid Models' operationId: getAssociatedRapidModels description: 'Get all rapid models which were optimized from this base asset' parameters: [] responses: 200: description: '' content: text/plain: schema: type: string example: "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"teapot\",\n \"optimization_status\": \"done\",\n \"rawmodel\": {...},\n \"job_status\": {...},\n \"created_at\": \"2021-02-16T16:50:41+01:00\",\n \"updated_at\": \"2021-02-16T16:50:53+01:00\",\n \"progress\": 100,\n \"processing_step\": \"Done\",\n \"external\": false,\n \"rapid_compact_core_version\": \"6.1.1\",\n \"tags\": [\n {\n \"id\": 377,\n \"name\": \"Preserve UVs\",\n \"created_at\": \"2024-02-15 18:05:36+00\",\n \"updated_at\": \"2024-02-15 18:05:36+00\",\n \"rapid_id\": 635\n }\n ],\n \"export_name\": \"export name\",\n \"uuid\": \"d8316d1f-3c7d-4777-b72e-c760064f9d08\",\n \"accepted\": false,\n \"meta\": {\n \"size\": 573420,\n \"exportSize\": 1029548\n },\n \"thumbnail\": {},\n \"rpd_info\": \"signed url for the rpd_info.json\",\n \"rpd_warnings\": \"signed url for the warning.log\",\n \"rpd_error\": \"signed url for the error.log\",\n \"downloads\": {\n \"glb\": \"signed url for the .glb\"\n }\n }\n ]\n}" tags: - 'Base Asset' parameters: - in: path name: id description: 'The id of the base asset' example: 1 required: true schema: type: integer /api/v2/embeds: get: summary: 'Get Embeds' operationId: getEmbeds description: 'Returns the embeds of the user' parameters: - in: query name: page description: 'Page number to fetch' example: 17 required: false schema: type: integer description: 'Page number to fetch' example: 17 - in: query name: q description: 'Search string to filter embeds by name' example: repellat required: false schema: type: string description: 'Search string to filter embeds by name' example: repellat - in: query name: rapidId description: 'Filter embeds by rapidmodel id' example: 11 required: false schema: type: integer description: 'Filter embeds by rapidmodel id' example: 11 responses: 200: description: '' content: text/plain: schema: type: string example: "{\n data: [\n {\n \"id\":53,\n \"identifier\":\"fRoL5P9iyb\",\n \"name\":\"RezColorChecker Embed\",\n \"user_id\":45,\n \"model_id\":70,\n \"view_count\":13,\n \"created_at\":\"2022-05-04T12:10:52.000000Z\",\n \"updated_at\":\"2022-06-14T13:13:00.000000Z\",\n \"rapidModelId\": 73,\n \"rapidModelName\":\"RezColorChecker\",\n \"thumbnail\":\"https://2vv7ezymi86va.cloudfront.net/rapid/ba12f8a6-....\",\n \"url\":\"https://api.rapidcompact.com/viewer?id=123456\"\n },\n ...\n ],\n links: {\n first: \"http://...\",\n last: \"http://...\",\n prev: null,\n next: \"http://...\"\n },\n meta: {\n \"current_page\":1,\n \"from\":1,\n \"last_page\":2,\n \"per_page\":10,\n \"to\":10,\n \"total\":15,\n links: [\n {\n \"url\":null,\n \"label\":\"Previous\",\n \"active\":false\n },\n ...\n ]\n }\n}" tags: - Embeds '/api/v2/embeds/{id}': get: summary: 'Get Embed' operationId: getEmbed description: '' parameters: [] responses: 200: description: success content: application/json: schema: type: object example: data: id: 42 identifier: ZmR8oTVEiR name: 'teapot Embed' user_id: 1 model_id: 1 view_count: 100 created_at: '2022-06-27T13:30:30.000000Z' updated_at: '2022-06-27T14:20:17.000000Z' properties: data: type: object properties: id: type: integer example: 42 identifier: type: string example: ZmR8oTVEiR name: type: string example: 'teapot Embed' user_id: type: integer example: 1 model_id: type: integer example: 1 view_count: type: integer example: 100 created_at: type: string example: '2022-06-27T13:30:30.000000Z' updated_at: type: string example: '2022-06-27T14:20:17.000000Z' tags: - Embeds delete: summary: 'Delete Embed' operationId: deleteEmbed description: '' parameters: [] responses: 204: description: success tags: - Embeds parameters: - in: path name: id description: 'The id of the embed' example: 42 required: true schema: type: integer /api/v2/embeds/create: post: summary: 'Create Embed' operationId: createEmbed description: "Create an embed from a rapid model.\nThe webhooks will be called with the 'embed_creation' event to notify the user as soon as the embed is created." parameters: [] responses: 201: description: success content: text/plain: schema: type: string example: "{\n 'status': 'Successful',\n 'message': 'Embed created successfully.',\n 'rapidmodel_id': 31,\n 'embed_id': 513,\n 'embed_url': 'http://api.rapidcompact.com/viewer?id=iKlCoxprxK',\n}" tags: - Embeds requestBody: required: true content: application/json: schema: type: object properties: model_id: type: integer description: 'The id of the rapid model' example: 281 name: type: string description: 'The name of your embed' example: '"my embeds name"' save_user_theme: type: boolean description: 'Saves the configurator config' example: true config: type: string description: 'The viewer configuration. Must be a valid JSON string' example: "{\n \"renderCanvasCSS\" : \"background:;\",\n \"environmentURL\" : \"images/environment.dds\",\n \"companyLogo\" : \"data:image/png;base64,iVBORw0KGgoAAAANSUh...kSuQmCC\",\n \"companyLogoToggle\" : \"true\",\n \"companyLink\" : \"https://dgg3d.com\",\n \"companyLogoCSS\" : \"width:120px;height:71.3004px;background:;\",\n \"productLogo\" : \"data:image/png;base64,iVBORw0KGgoAAAANSUh...ASUVORK5CYII=\",\n \"productLogoToggle\" : \"true\",\n \"productLink\" : \"https://rapidcompact.com\",\n \"productLogoCSS\" : \"width:120px;height:21.4819px;background:;\",\n \"threeDLogo\" : \"data:image/png;base64,iVBORw0KGgoAAAANSUhEU...OAAAAAElFTkSuQmCC\",\n \"threeDLogoToggle\" : \"true\",\n \"threeDLogoCSS\" : \"width:24px;height:24px;background:;\",\n \"interactiveToolsCSS\" : \"background:;\",\n \"skyBoxEnabled\" : \"false\",\n \"skyBoxBlur\" : \"0\",\n \"shadowToggle\" : \"false\",\n \"shadowOpacity\" : \"0.5\",\n \"shadowBlur\" : \"0\",\n \"shadowLightIntensity\" : \"0.3\",\n \"cameraMinVerticalAngle\" : \"-90\",\n \"cameraMaxVerticalAngle\" : \"90\",\n \"cameraMinZoom\" : \"1\",\n \"cameraMaxZoom\" : \"6\",\n \"cameraPanning\" : \"0.5\",\n \"cameraBloom\" : \"0\",\n \"cameraContrast\" : \"1\",\n \"cameraExposure\" : \"1\",\n \"fxaaOn\" : \"true\",\n \"enableSimpleMeasurement\" : \"false\",\n \"enableCoordinateDisplay\" : \"false\",\n \"baseUnit\" : \"m\",\n \"displayUnit\" : \"m\",\n \"enableARBtn\" : \"false\",\n \"enableAnimationControl\" : \"false\",\n \"animationSpeed\" : \"1\",\n \"animationIdleTime\" : \"5\",\n \"backgroundIsGradient\" : \"false\",\n \"backgroundIsColor\" : \"false\",\n \"gradientBackgroundColor1\" : \"#ffffff\",\n \"gradientBackgroundColor2\" : \"#aaaaaa\",\n \"plainBackgroundColor\" : \"#ffffff\",\n \"environmentName\" : \"studio_small\",\n \"baseUnits\" : \"m,cm,mm,yd,ft,in\",\n \"displayUnits\" : \"m,cm,mm,yd,ft,in\"\n}" required: - model_id - name /api/v2/embeds/raw: post: summary: 'Create Embed from Base Asset' operationId: createEmbedFromBaseAsset description: "Create an embed from a base asset.\nThe base asset must be in the .glb file format.\nThe webhooks will be called with the 'embed_from_raw_creation' event to notify the user as soon as the embed is created" parameters: [] responses: 200: description: success content: text/plain: schema: type: string example: "{\n \"message\" : \"Embed creation pending, wait for the webhook call\",\n \"embed_id\": 513,\n \"embed_url\": 'http://api.rapidcompact.com/viewer?id=iKlCoxprxK',\n}" 422: description: 'no glb format' content: application/json: schema: type: object example: message: 'Raw model is not in the glb file format' properties: message: type: string example: 'Raw model is not in the glb file format' tags: - Embeds requestBody: required: true content: application/json: schema: type: object properties: raw_model_id: type: integer description: 'The id of the raw model' example: 281 name: type: string description: 'The name of your embed' example: '"my embeds name"' save_user_theme: type: boolean description: 'Saves the configurator config' example: true config: type: string description: 'The viewer configuration. Must be a valid JSON string' example: "{\n \"renderCanvasCSS\" : \"background:;\",\n \"environmentURL\" : \"images/environment.dds\",\n \"companyLogo\" : \"data:image/png;base64,iVBORw0KGgoAAAANSUh...kSuQmCC\",\n \"companyLogoToggle\" : \"true\",\n \"companyLink\" : \"https://dgg3d.com\",\n \"companyLogoCSS\" : \"width:120px;height:71.3004px;background:;\",\n \"productLogo\" : \"data:image/png;base64,iVBORw0KGgoAAAANSUh...ASUVORK5CYII=\",\n \"productLogoToggle\" : \"true\",\n \"productLink\" : \"https://rapidcompact.com\",\n \"productLogoCSS\" : \"width:120px;height:21.4819px;background:;\",\n \"threeDLogo\" : \"data:image/png;base64,iVBORw0KGgoAAAANSUhEU...OAAAAAElFTkSuQmCC\",\n \"threeDLogoToggle\" : \"true\",\n \"threeDLogoCSS\" : \"width:24px;height:24px;background:;\",\n \"interactiveToolsCSS\" : \"background:;\",\n \"skyBoxEnabled\" : \"false\",\n \"skyBoxBlur\" : \"0\",\n \"shadowToggle\" : \"false\",\n \"shadowOpacity\" : \"0.5\",\n \"shadowBlur\" : \"0\",\n \"shadowLightIntensity\" : \"0.3\",\n \"cameraMinVerticalAngle\" : \"-90\",\n \"cameraMaxVerticalAngle\" : \"90\",\n \"cameraMinZoom\" : \"1\",\n \"cameraMaxZoom\" : \"6\",\n \"cameraPanning\" : \"0.5\",\n \"cameraBloom\" : \"0\",\n \"cameraContrast\" : \"1\",\n \"cameraExposure\" : \"1\",\n \"fxaaOn\" : \"true\",\n \"enableSimpleMeasurement\" : \"false\",\n \"enableCoordinateDisplay\" : \"false\",\n \"baseUnit\" : \"m\",\n \"displayUnit\" : \"m\",\n \"enableARBtn\" : \"false\",\n \"enableAnimationControl\" : \"false\",\n \"animationSpeed\" : \"1\",\n \"animationIdleTime\" : \"5\",\n \"backgroundIsGradient\" : \"false\",\n \"backgroundIsColor\" : \"false\",\n \"gradientBackgroundColor1\" : \"#ffffff\",\n \"gradientBackgroundColor2\" : \"#aaaaaa\",\n \"plainBackgroundColor\" : \"#ffffff\",\n \"environmentName\" : \"studio_small\",\n \"baseUnits\" : \"m,cm,mm,yd,ft,in\",\n \"displayUnits\" : \"m,cm,mm,yd,ft,in\"\n}" required: - raw_model_id - name /api/v2/preset/create: post: summary: 'Create Preset' operationId: createPreset description: 'The "Try it out" feature for this endpoint doesn''t work, because the config gets sent as a string, but it needs to be a json object. Please check the example request on the right side' parameters: [] responses: 200: description: success content: text/plain: schema: type: string example: '' tags: - Presets requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: 'The name of the preset' example: 'name of the new preset' description: type: string description: 'optional A short description of the preset' example: 'Optimizes for 20k faces and drops textures' rapidCompactCoreVersion: type: string description: 'The minimum version of RapidCompact for the preset' example: 6.1.1 config: type: object description: 'The config of the optimizer as a json object complying with the [API Optimize Schema](https://rapidcompact.com/doc)' example: schema: '2.5' limits: faces: count: 30000 textures: 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: png orm: auto properties: { } required: - name - config /api/v2/preset/update: patch: summary: 'Update Preset' operationId: updatePreset description: 'The "Try it out" feature for this endpoint doesn''t work, because the config gets sent as a string, but it needs to be a json object. Please check the example request on the right side' parameters: [] responses: 200: description: success content: text/plain: schema: type: string example: '' tags: - Presets requestBody: required: true content: application/json: schema: type: object properties: id: type: integer description: 'The id of the preset' example: 42 name: type: string description: 'The name of the preset' example: 'name of the new preset' config: type: object description: 'The config of the optimizer as a json object complying with the [API Optimize Schema](https://rapidcompact.com/doc)' example: schema: '2.5' limits: faces: count: 30000 textures: 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: png orm: auto properties: { } required: - id - name - config /api/v2/preset/factory: get: summary: 'Get all Factory Presets' operationId: getAllFactoryPresets description: "Factory Presets are provided by RapidCompact\n\nA factory presets describes a optimization setting for different applications e.g. Lens Studio, Game Engines (Unreal, Unity) and devices (e.g. Hololens). You can use the returned id when using the Optimize endpoint" parameters: [] responses: 200: description: success content: text/plain: schema: type: string example: "[\n {\n \"id\": 1,\n \"name\": \"Spark AR Low Res\",\n \"config\": \"{\\\"workflowSettings\\\":{\\\"targetMeshResolution\\\":{\\\"faceCount\\\":15000},\\\"targetTextureResolution\\\":{\\\"baseColor\\\":1024,\\\"emissive\\\":1024,\\\"normal\\\":1024,\\\"orm\\\":1024}},\\\"assetSimplification\\\":{\\\"meshDecimation\\\":{\\\"method\\\":\\\"rebake\\\"},\\\"topologySettings\\\":{\\\"vertexMergingDistance\\\":0.005,\\\"meshDensityEqualization\\\":0,\\\"boundaryPreservationFactor\\\":0.5},\\\"uvAndAtlasSettings\\\":{\\\"uvStretchTolerance\\\":0},\\\"materialAndTextureBaking\\\":{\\\"bakingQuality\\\":\\\"low\\\",\\\"bakeNormalMap\\\":true,\\\"bakeAOMap\\\":false}},\\\"compressionAndExport\\\":{\\\"fileExports\\\":[{\\\"fileType\\\":\\\"glb\\\",\\\"meshCompressionMethod\\\":\\\"none\\\",\\\"customScaling\\\":1,\\\"textureFormat\\\":{\\\"baseColor\\\":\\\"jpg\\\",\\\"emissive\\\":\\\"jpg\\\",\\\"normal\\\":\\\"jpg\\\",\\\"orm\\\":\\\"jpg\\\"}}]}}\"\n },\n]" tags: - Presets /api/v2/preset/rpdx: post: summary: 'Convert Preset' operationId: convertPreset description: 'Convert a preset in API format to CLI format and CLI commands. The endpoint will return a zip file containing the requested files. The "Try it out" feature for this endpoint doesn''t work, because the config gets sent as a string, but it needs to be a json object. Please check the example request on the right side' parameters: [] responses: 200: description: success content: text/plain: schema: type: string example: ' Streamed Response' tags: - Presets requestBody: required: true content: application/json: schema: type: object properties: config: type: object description: 'The config of the optimizer in API format as a json object complying with the [API Optimize Schema](https://rapidcompact.com/doc)' example: schema: '2.5' limits: faces: count: 30000 textures: 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: png orm: auto properties: { } required: - config '/api/v2/preset/rpdx/{id}': get: summary: 'Get Preset in CLI Format' operationId: getPresetInCLIFormat description: 'The endpoint will return a zip file containing the requested files' parameters: [] responses: 200: description: success content: text/plain: schema: type: string example: ' Streamed Response' tags: - Presets parameters: - in: path name: id description: 'The id of the preset' example: 281 required: true schema: type: integer '/api/v2/preset/{id}/download': get: summary: 'Download Preset' operationId: downloadPreset description: 'Downloads a preset as zip file which contains both API and CLI formats.' parameters: [] responses: 200: description: success content: text/plain: schema: type: string example: ' Streamed Response' tags: - Presets parameters: - in: path name: id description: 'The id of the preset' example: 281 required: true schema: type: integer '/api/v2/preset/{id}': get: summary: 'Get Preset' operationId: getPreset description: '' parameters: [] responses: 200: description: success content: application/json: schema: type: object example: id: 11 name: 'preset 2' config: schema: '2.5' limits: faces: count: 30000 textures: 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: png orm: auto rpdx_version: 6.1.1 user_id: 328 created_at: '2021-04-22T09:11:30.000000Z' updated_at: '2021-04-22T09:11:30.000000Z' properties: id: type: integer example: 11 name: type: string example: 'preset 2' config: type: object properties: schema: type: string example: '2.5' limits: type: object properties: faces: type: object properties: count: type: integer example: 30000 textures: type: object properties: baseColor: type: integer example: 2048 emissive: type: integer example: 2048 normal: type: integer example: 2048 orm: type: integer example: 2048 assetSimplification: type: object properties: meshDecimation: type: object properties: method: type: string example: rebake topologySettings: type: object properties: vertexMergingDistance: type: number example: 0.005 meshDensityEqualization: type: integer example: 0 boundaryPreservationFactor: type: number example: 0.5 uvAndAtlasSettings: type: object properties: uvStretchTolerance: type: integer example: 0 materialAndTextureBaking: type: object properties: bakingQuality: type: string example: medium bakeNormalMap: type: boolean example: true bakeAOMap: type: boolean example: false compressionAndExport: type: object properties: fileExports: type: array example: - fileType: glb meshCompressionMethod: none customScaling: 1 textureFormat: baseColor: auto emissive: auto normal: png orm: auto items: type: object properties: fileType: type: string example: glb meshCompressionMethod: type: string example: none customScaling: type: integer example: 1 textureFormat: type: object properties: baseColor: type: string example: auto emissive: type: string example: auto normal: type: string example: png orm: type: string example: auto rpdx_version: type: string example: 6.1.1 user_id: type: integer example: 328 created_at: type: string example: '2021-04-22T09:11:30.000000Z' updated_at: type: string example: '2021-04-22T09:11:30.000000Z' tags: - Presets delete: summary: 'Delete Preset' operationId: deletePreset description: '' parameters: [] responses: 200: description: success content: text/plain: schema: type: string example: '' tags: - Presets parameters: - in: path name: id description: 'The id of the preset' example: 281 required: true schema: type: integer /api/v2/preset: get: summary: 'Get all Presets' operationId: getAllPresets description: '' parameters: [] responses: 200: description: success content: application/json: schema: type: array items: type: object example: - id: 11 name: 'preset 2' config: '{"sceneManipulation":{"rotateZUp":false,"centerModel":false,"removeInvisibleGeometry":false,"discardAnimations":false,"removeSmallFeatures":{"removalPercentage":0}},"assetSimplification":{"meshDecimation":{"method":"rebake"},"topologySettings":{"vertexMergingDistance":0.005,"meshDensityEqualization":0,"boundaryPreservationFactor":0.5,"preserveTopology":false},"uvAndAtlasSettings":{"uvStretchTolerance":0},"materialAndTextureBaking":{"bakingQuality":"medium","bakeNormalMap":true,"bakeAOMap":true}},"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"}},{"fileType":"obj","meshCompressionMethod":"none","customScaling":1,"textureFormat":{"baseColor":"auto","emissive":"auto","normal":"auto","orm":"auto"}}]},"schema":"2.5","limits":{"faces":{"percentage":50},"textures":{"baseColor":2048,"emissive":2048,"normal":2048,"orm":2048}}}' rpdx_version: 6.1.1 user_id: 328 created_at: '2023-01-22T09:11:30.000000Z' updated_at: '2023-01-22T09:11:30.000000Z' description: '' meta: '{"filename": {"useId": false, "useSuffix": null, "usePresetName": false}}' tags: - Presets /api/v2/rapidmodel: get: summary: 'Get Rapid Models' operationId: getRapidModels description: 'Paginated response of your rapid models. Search for rapid models by name or tag' parameters: - in: query name: q description: 'Optional parameter to search for rapid models by name or tag' example: yourSearchString required: false schema: type: string description: 'Optional parameter to search for rapid models by name or tag' example: yourSearchString responses: 200: description: success content: text/plain: schema: type: string example: "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"teapot \",\n \"optimization_status\": \"done\",\n \"created_at\": \"2022-05-24T16:28:56+02:00\",\n \"updated_at\": \"2022-05-24T16:29:11+02:00\",\n \"processing_step\": \"Done\",\n \"external\": false,\n \"rapid_compact_core_version\": \"6.1.1\",\n \"tags\": [\n {\n \"id\": 1,\n \"name\": \"Low-Poly\",\n \"created_at\": \"2022-05-24 15:06:03\",\n \"updated_at\": \"2022-05-24 15:06:03\",\n \"rapid_id\": 1\n },\n ],\n \"export_name\": \"teapot_1\",\n \"uuid\": \"f26cf299-c8df-4d4d-9eef-3f8e87d882b7\",\n \"accepted\": false,\n \"meta\": {\n \"size\": 665168,\n \"exportSize\": 1495763\n },\n \"origin\": \"\",\n \"optimization_formats\": \"[...]\",\n \"thumbnail\": {\n \"first\": \"signed url\",\n \"turntable\": \"signed url\"\n },\n \"model\": {\n \"rootUrl\": \"rootURL\",\n \"fileName\": \"fileName\"\n },\n \"rpd_info\": \"signed url\",\n \"rpd_warnings\": \"signed url\",\n \"downloads\": {\n \"usdz\": \"signed url\",\n \"glb\": \"signed url\",\n \"all\": {\n \"rapid.glb\": \"signed url\",\n \"rapid.usdz\": \"signed url\"\n }\n }\n }\n ],\n \"links\": {\n \"first\": \"https://url/api/v2/rapidmodel?page=1\",\n \"last\": \"https://url/api/v2/rapidmodel?page=1\",\n \"prev\": null,\n \"next\": null\n },\n \"meta\": {\n \"current_page\": 1,\n \"from\": 1,\n \"last_page\": 1,\n \"links\": [\n {\n \"url\": null,\n \"label\": \"« Previous\",\n \"active\": false\n },\n {\n \"url\": \"https://url/api/v2/rapidmodel?page=1\",\n \"label\": \"1\",\n \"active\": true\n },\n {\n \"url\": null,\n \"label\": \"Next »\",\n \"active\": false\n }\n ],\n \"path\": \"https://url/api/v2/rapidmodel\",\n \"per_page\": 12,\n \"to\": 1,\n \"total\": 1\n }\n}" tags: - 'Rapid Model' '/api/v2/rapidmodel/{id}': get: summary: 'Get Rapid Model' operationId: getRapidModel description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: 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' processing_step: Done external: false rapid_compact_core_version: 6.1.1 tags: - id: 377 name: 'Preserve UVs' created_at: '2024-02-15 18:05:36+00' updated_at: '2024-02-15 18:05:36+00' rapid_id: 635 export_name: null uuid: d8316d1f-3c7d-4777-b72e-c760064f9d08 accepted: false meta: size: 573420 exportSize: 1029548 origin: '' optimization_formats: '[...]' thumbnail: first: 'signed url for the thumbnail' turntable: rapid.glb: 'signed url for theturntable' model: rootUrl: 's3 link' fileName: 'rapid.glb?signed' rpd_info: 'signed url for rpd_info.json' rpd_warnings: 'signed url for the warning.log' metrics: 'signed url for the metrics.json' downloads: glb: 'signed url for the .glb' all: rapid.glb: 'signed url for the .glb' properties: data: type: object properties: id: type: integer example: 635 name: type: string example: 'teapot ' optimization_status: type: string example: done created_at: type: string example: '2021-02-16T16:50:41+01:00' updated_at: type: string example: '2021-02-16T16:50:53+01:00' processing_step: type: string example: Done external: type: boolean example: false rapid_compact_core_version: type: string example: 6.1.1 tags: type: array example: - id: 377 name: 'Preserve UVs' created_at: '2024-02-15 18:05:36+00' updated_at: '2024-02-15 18:05:36+00' rapid_id: 635 items: type: object properties: id: type: integer example: 377 name: type: string example: 'Preserve UVs' created_at: type: string example: '2024-02-15 18:05:36+00' updated_at: type: string example: '2024-02-15 18:05:36+00' rapid_id: type: integer example: 635 export_name: type: string example: null uuid: type: string example: d8316d1f-3c7d-4777-b72e-c760064f9d08 accepted: type: boolean example: false meta: type: object properties: size: type: integer example: 573420 exportSize: type: integer example: 1029548 origin: type: string example: '' optimization_formats: type: string example: '[...]' thumbnail: type: object properties: first: type: string example: 'signed url for the thumbnail' turntable: type: object properties: rapid.glb: type: string example: 'signed url for theturntable' model: type: object properties: rootUrl: type: string example: 's3 link' fileName: type: string example: 'rapid.glb?signed' rpd_info: type: string example: 'signed url for rpd_info.json' rpd_warnings: type: string example: 'signed url for the warning.log' metrics: type: string example: 'signed url for the metrics.json' downloads: type: object properties: glb: type: string example: 'signed url for the .glb' all: type: object properties: rapid.glb: type: string example: 'signed url for the .glb' tags: - 'Rapid Model' delete: summary: 'Delete Rapid Model' operationId: deleteRapidModel description: '' parameters: [] responses: 200: description: success content: text/plain: schema: type: string example: '' tags: - 'Rapid Model' put: summary: 'Add Tags to a Rapid Model' operationId: addTagsToARapidModel description: '' parameters: [] responses: 200: description: success content: text/plain: schema: type: string example: '' tags: - 'Rapid Model' requestBody: required: true content: application/json: schema: type: object properties: tags: type: array description: 'A list of tags that will be added to the rapid model' example: - chair - brown items: type: string required: - tags parameters: - in: path name: id description: 'The id of the rapid model' example: 635 required: true schema: type: integer '/api/v2/rapidmodel/{id}/exports': get: summary: 'Get Export Infos' operationId: getExportInfos description: "Calling this endpoint return a list of links to download the exports and their respective infos\n\nPlease note that the export infos are generated only for glb and gltf formats" parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: data: rapid.glb: download: 'signed s3 link to rapid.glb' info: images: - channels: 3 compressedByteSize: 310996 height: 2048 mimetype: image/jpeg slot: normal width: 2048 rapid.usdz: download: 'link to rapid.usdz' info: null properties: data: type: object properties: rapid.glb: type: object properties: download: type: string example: 'signed s3 link to rapid.glb' info: type: object properties: images: type: array example: - channels: 3 compressedByteSize: 310996 height: 2048 mimetype: image/jpeg slot: normal width: 2048 items: type: object properties: channels: type: integer example: 3 compressedByteSize: type: integer example: 310996 height: type: integer example: 2048 mimetype: type: string example: image/jpeg slot: type: string example: normal width: type: integer example: 2048 rapid.usdz: type: object properties: download: type: string example: 'link to rapid.usdz' info: type: string example: null tags: - 'Rapid Model' parameters: - in: path name: id description: 'The id of the rapid model' example: 695 required: true schema: type: integer '/api/v2/rapidmodel/{id}/tags/{tagId}': delete: summary: 'Delete Tag of a Rapid Model' operationId: deleteTagOfARapidModel description: '' parameters: [] responses: 200: description: success content: text/plain: schema: type: string example: '' tags: - 'Rapid Model' parameters: - in: path name: id description: 'The id of the base asset' example: 281 required: true schema: type: integer - in: path name: tagId description: 'The id of the tag that will be deleted' example: 2 required: true schema: type: integer '/api/v2/rapidmodel/{id}/download/preset': get: summary: 'Download used Preset from Rapid Model' operationId: downloadUsedPresetFromRapidModel description: "Downloads a preset as zip file which contains API and CLI formats\n\nOnly available for Rapidmodels that were optimized after 2023-03" parameters: [] responses: 200: description: success content: text/plain: schema: type: string example: ' Streamed Response' 404: description: error content: text/plain: schema: type: string example: 'Only available for Rapidmodels that were optimized after 2023-03' tags: - 'Rapid Model' parameters: - in: path name: id description: 'The id of the preset' example: 281 required: true schema: type: integer /api/v2/rapidmodel/delete: post: summary: 'Delete Multiple Rapid Models' operationId: deleteMultipleRapidModels description: '' parameters: [] responses: 200: description: success content: text/plain: schema: type: string example: '' tags: - 'Rapid Model' requestBody: required: true content: application/json: schema: type: object properties: ids: type: array description: 'An array of rapid model ids that should be deleted' example: - 726 - 324 items: type: integer required: - ids /api/v2/rawmodel/tags: get: summary: 'Get all Base Asset Tags' operationId: getAllBaseAssetTags description: '' parameters: [] responses: 200: description: success content: application/json: schema: type: object example: data: - name: 'My custom tag' - name: Foo - name: Bar properties: data: type: array example: - name: 'My custom tag' - name: Foo - name: Bar items: type: object properties: name: type: string example: 'My custom tag' tags: - Tags /api/v2/rapidmodel/tags: get: summary: 'Get all Rapid Model Tags' operationId: getAllRapidModelTags description: '' parameters: [] responses: 200: description: success content: application/json: schema: type: object example: data: - name: '5 MB' - name: 'Medium Resolution' - name: 'Low-scene complexity' properties: data: type: array example: - name: '5 MB' - name: 'Medium Resolution' - name: 'Low-scene complexity' items: type: object properties: name: type: string example: '5 MB' tags: - Tags /api/v2/login: post: summary: Login operationId: login description: 'Returns a token that can be used for calling other endpoints' parameters: [] responses: 422: description: '' content: application/json: schema: type: object example: message: 'These credentials do not match our records.' errors: email: - 'These credentials do not match our records.' properties: message: type: string example: 'These credentials do not match our records.' errors: type: object properties: email: type: array example: - 'These credentials do not match our records.' items: type: string tags: - User requestBody: required: true content: application/json: schema: type: object properties: email: type: string description: 'The email of the user' example: yourname@example.com password: type: string description: 'The password of the user' example: 'your password' required: - email - password security: [] /api/v2/user/delete: post: summary: 'Delete Account' operationId: deleteAccount description: 'Delete the user account and all the data associated with it' parameters: [] responses: 200: description: success content: text/plain: schema: type: string example: '' tags: - User requestBody: required: true content: application/json: schema: type: object properties: password: type: string description: "The password of the user. The account will be deleted if it's correct" example: '"your password"' required: - password /api/v2/user/rapidpoints: get: summary: 'Get RapidPoints' operationId: getRapidPoints description: '' parameters: [] responses: 200: description: success content: application/json: schema: type: object example: rapidpoints: 20 properties: rapidpoints: type: integer example: 20 tags: - User /api/v2/user/storage: get: summary: 'Get Storage Left' operationId: getStorageLeft description: 'Returns how much storage you have left to use (bytes)' parameters: [] responses: 200: description: success content: application/json: schema: type: object example: storage_left: 107374182400 properties: storage_left: type: integer example: 107374182400 tags: - User /api/v2/user/webhooks: get: summary: 'Get Webhooks' operationId: getWebhooks description: '' parameters: [] responses: 200: description: success content: application/json: schema: type: array items: type: object example: - id: 6 user_id: 303 url: 'https://mywebhookurl.com' last_called_at: '2021-10-26T09:45:47.000000Z' created_at: '2021-10-26T09:45:47.000000Z' updated_at: '2021-10-26T09:45:47.000000Z' secret: secret last_status: null verify_ssl: true failed_calls: 0 notified_at: null tags: - Webhooks post: summary: 'Create Webhook' operationId: createWebhook description: '' parameters: [] responses: 200: description: success content: application/json: schema: type: object example: id: 6 user_id: 303 url: 'https://example.com/webhook' last_called_at: '2021-10-26T09:45:47.000000Z' created_at: '2021-10-26T09:45:47.000000Z' updated_at: '2021-10-26T09:45:47.000000Z' secret: aut last_status: null verify_ssl: true failed_calls: 0 notified_at: null properties: id: type: integer example: 6 user_id: type: integer example: 303 url: type: string example: 'https://example.com/webhook' last_called_at: type: string example: '2021-10-26T09:45:47.000000Z' created_at: type: string example: '2021-10-26T09:45:47.000000Z' updated_at: type: string example: '2021-10-26T09:45:47.000000Z' secret: type: string example: aut last_status: type: string example: null verify_ssl: type: boolean example: true failed_calls: type: integer example: 0 notified_at: type: string example: null 500: description: 'Maximum number of tags reached' content: text/plain: schema: type: string example: "[\n \"code\": 1,\n \"message\": \"Maximum number of webhooks allowed already created\"\n]" tags: - Webhooks requestBody: required: true content: application/json: schema: type: object properties: url: type: string description: 'The url of the webhook' example: 'https://example.com/webhook' secret: type: string description: 'A secret to be sent in the header of webhook requests' example: 'my secret' verify_ssl: type: boolean description: 'Whether to verify ssl or not' example: false required: - url - verify_ssl '/api/v2/user/webhooks/{id}': delete: summary: 'Delete Webhook' operationId: deleteWebhook description: '' parameters: [] responses: 200: description: success content: text/plain: schema: type: string example: '' tags: - Webhooks parameters: - in: path name: id description: 'The id of the webhook' example: 1 required: true schema: type: integer '/api/v2/user/webhooks/test/{id}': post: summary: 'Test Webhook' operationId: testWebhook description: "A test event will be sent to the webhook to make sure it is accessible and can receive events\n\nCall the \"Test Webhook\" endpoint again to see if the webhook was successfully invoked" parameters: [] responses: 200: description: success content: text/plain: schema: type: string example: '' tags: - Webhooks parameters: - in: path name: id description: 'The id of the webhook' example: 1 required: true schema: type: integer tags: - name: 'API Tokens' description: '' - name: 'Base Asset' description: '' - name: Embeds description: '' - name: Presets description: '' - name: 'Rapid Model' description: '' - name: Tags description: '' - name: User description: 'APIs for managing user profile.' - name: Webhooks description: "\nRapidCompact uses webhooks to notify your application when an event happens in your account.\nWebhooks are particularly useful for upload and optimization events. Instead of polling the API to know the status\nof your upload or optimization, RapidCompact sends an event to your webhook.\n\nBegin using webhooks with your RapidCompact integration in just three steps:\n1. Create a webhook endpoint on your server\n2. [Register](https://app.rapidcompact.com/app/webhooks) the endpoint with RapidCompact to go live\n3. Test your endpoint by clicking the test button in the [webhooks page](https://app.rapidcompact.com/app/webhooks)\n\n### What are webhooks\nThe webhook endpoint is just more code on your server, which could be written in Ruby, PHP, Node.js, or whatever.\nThe webhook endpoint has an associated URL (e.g., https://example.com/webhooks).\nThe RapidCompact notifications are Event objects sent as POST requests (Fire-and-forget, no retry).\nThis Event object contains all the relevant information about what just happened, including the type of event and the data associated with that event.\nThe webhook endpoint uses the event details to take any required actions, such as indicating that an optimization should be done.\n\n### Validation\nIn order to validate an incoming webhook event you need to first set up a secret when creating it on RapidCompact. This secret will be used to sign the body and send the signature as part of the requests header. You can use this secret on your receiving endpoint to validate the content of the body by signing it with the same secret. For an example check out this repository: https://github.com/DGG3D/webhook-api-example\n\n### Optimization Events\nRapidCompact sends the \"optimization_finished\" event. You can see an example on the right side\n```\n {\n \"event_type\": \"optimization_finished\",\n \"timestamp\": \"2023-01-19T15:03:08.076920Z\",\n \"data\": {\n \"status\": \"Successful\",\n \"message\": \"Optimization has ended and your rapid model is available to download.\",\n \"rawmodel_id\": 1961,\n \"rapidmodel_id\": 4213,\n \"rapidmodel\": {\n \"rapid.glb\": \"link to rapid model\"\n }\n }\n }\n```\n\n### Upload Events\nRapidCompact sends an \"analysis_finished\" event when your uploaded model has been finished being analyzed and is now ready to be optimized. You can see an two examples for the successful and failed state on the right side.\n\nFor uploaded zip files RapidCompact sends an \"unzip_finished\" event when your model has been finished being unzipped and is going to be analysed next. You can see an two examples for the successful and failed state on the right side.\n\n```\n {\n \"event_type\": \"analysis_finished\",\n \"timestamp\": \"2023-01-02T15:03:08.076920Z\",\n \"data\": {\n \"status\": \"Successful\",\n \"message\": \"Model analysis has ended and your base asset is ready to be optimized.\",\n \"rawmodel_id\": 1961,\n }\n }\n```\n```\n {\n \"event_type\": \"analysis_finished\",\n \"timestamp\": \"2023-01-02T15:03:08.076920Z\",\n \"data\": {\n \"status\": \"Failed\",\n \"message\": \"Analysis failed\",\n \"rawmodel_id\": 1961,\n }\n }\n```\n```\n {\n \"event_type\": \"unzip_finished\",\n \"timestamp\": \"2024-01-02T15:03:08.076920Z\",\n \"data\": {\n \"status\": \"Successful\",\n \"message\": \"Model successfully unzipped.\",\n \"rawmodel_id\": 1961,\n }\n }\n```\n```\n {\n \"event_type\": \"unzip_finished\",\n \"timestamp\": \"2024-01-02T15:03:08.076920Z\",\n \"data\": {\n \"status\": \"Failed\",\n \"message\": \"Unzip failed\",\n \"rawmodel_id\": 1961,\n }\n }\n```" components: securitySchemes: default: type: http scheme: bearer description: 'You can create your API token here.
Our REST API, excluding upload related endpoints, is subject to rate limits (2000 requests per minute per User or IP)' security: - default: []