# Optimization

> Use task_type optimize to find layout issues, collisions, support risks, clearance problems, and suggested improvements. Product surfaces such as Four Cad can use this task after converting CAD geometry into structured spatial input.

Source: https://fourechelon.com/docs/optimization · Machine-readable: https://fourechelon.com/openapi.json · Index: https://fourechelon.com/llms.txt

## task

optimize

## question

What is wrong with this layout, and what would improve it?

## required

| Field | Type | Description |
| --- | --- | --- |
| input.cad_scene | object | The layout or assembly to review. |
| input.goal | object | Optional. What to optimize for: clearance, packing, access. |

## returns

| Field | Type | Description |
| --- | --- | --- |
| spatial_optimization.issues | Collisions, clearance, and support problems. |
| spatial_optimization.suggestions | Proposed changes, each tied to geometry. |
| spatial_optimization.severity | Ranking so review time goes to what matters. |

## notes

Findings reference the entities they came from, so every suggestion can be traced back to the geometry rather than taken on trust.

## Example

```bash
curl https://fourechelon.com/api/v1/responses \
  -H "Authorization: Bearer $FOUR_ECHELON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "rowe-1.0",
    "input": {
      "task_type": "optimize",
      "goal": { "objective": "clearance" },
      "cad_scene": { "schema": "four-cad.cad_scene.v1", "solids": [] }
    }
  }'
```
