Optimize
POST/api/v2/rawmodel/optimize/:id
There are two ways to optimize a base asset. You can either send a config as a json object that complies with the 3D Processor Schema, or send the id of one of the presets inside a preset_id key. Since the schema is complex, we suggest you to use the UI to create your preset and then use that preset_id in your Optimize call. You can also download the preset from the UI and use the contents of the downloaded config file in this API endpoint.
You can use our \"optimization_finished\" webhook to get notified when your model has been optimized. It also includes downloadlinks to your optimized model.
Request
Path Parameters
The id of the base asset
- application/json
Body
config object
The config of the optimizer as a json object complying with the 3D Processor Schema. Do not use config in combination with preset_id. They are mutually exclusive
The id one of your presets or of a factoryPreset. Do not use preset_id in combination with config. They are mutually exclusive
A list of tags that will be added to the rapid model
Responses
- 200
success
- application/json
- Schema
- Example (from schema)
Schema
job_status object
rawmodel object
{
"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
}
}