---
title: "Process Netlist With Autowiring"
method: POST
path: "/api/spice-netlist/process-with-autowiring"
tags: ["spice"]
---

# Process Netlist With Autowiring

`POST /api/spice-netlist/process-with-autowiring`

## Request

- Base URL: `https://backend.snapmagic.com` (the document declares no server; this is the origin it was published from)
- URL: `https://backend.snapmagic.com/api/spice-netlist/process-with-autowiring`
- Auth: none declared

Process a .PARTS/.NETS format netlist with auto-placement and autowiring.

Components with #POS are placed at their specified positions.
Components without #POS are auto-placed using net-connectivity-based
heuristics (weighted centroid + spiral search) in pin_wire_calculator.

Flow:
1. Parse .PARTS/.NETS/.WIRES format
2. Pass raw netlist to pin_wire_calculator which handles both positioned
   and unpositioned components, then does A* wire routing

## Request body

- SpiceNetlistRequest
  - `netlist` string, required: SPICE netlist text
  - `normalize_passive_layout` boolean
  - `grid_size` number, nullable: Grid size in millimeters for component placement (default: 2.54mm)
  - `model` string, nullable: AI model to use for component placement. OpenAI models: 'gpt-4o-mini', 'ft:gpt-4o-mini-2024-07-18:snapeda:block-designer-v2:DCnTdm8s'. Anthropic models: 'claude-opus-4-6', 'claude-sonnet-4-6'. If not provided, uses AI_MODEL_NAME env var, or defaults based on AI_MODEL_PROVIDER env var.

## Response `200`

Successful Response

- SpiceNetlistResponse
  - `enhanced_netlist` string, required: Enhanced netlist with positions and wires
  - `components` ComponentPosition[], required: List of components with positions
    - `name` string, required
    - `x` number, required
    - `y` number, required
    - `rotation` number, required
    - `part_number` string, nullable
    - `manufacturer` string, nullable
  - `wires` WireConnection[], required: List of wire connections
    - `id` string, required
    - `node` string, required
    - `from_component` string, required
    - `to_component` string, required
    - `points` WirePoint[], required
      - `x` number, required
      - `y` number, required
  - `component_count` integer, required: Number of components found

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/snapmagic/apis/snapmagic-api.md) - [All operations](https://skmtc.dev/snapmagic/apis/snapmagic-api/llms.txt) - [OpenAPI document](https://skmtc.dev/snapmagic/apis/snapmagic-api/revisions/db14522771a6?raw)
