Skip to main content

Autoroute

POST /pcb/autoroute Send a DSN file to the cloud autorouter and receive a routed SES file via SSE stream.

Request Body

FieldTypeRequiredDescription
dsn_contentstringYesDSN file content from PCB export
max_passesintegerNoMaximum routing passes (default: 50)
thread_countintegerNoParallel routing threads (default: 4)
via_costsintegerNoVia cost penalty (higher = fewer vias)
optimizationstringNoOptimization strategy

Example

curl -N -X POST "https://api.buildwithtrace.com/api/v2/pcb/autoroute" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "dsn_content": "<your DSN file content>",
    "max_passes": 50,
    "via_costs": 50
  }'

SSE Stream Events

EventDescription
progressRouting progress update with pass number
resultCompleted SES file content
errorRouting error
doneStream complete

Workflow

1

Export DSN

Export your PCB as a DSN file from the PCB editor (File → Export → Specctra DSN).
2

Send to autorouter

POST the DSN content to the autoroute endpoint.
3

Monitor progress

Read SSE events for routing progress updates.
4

Receive SES

The result event contains the routed SES file.
5

Import back

Import the SES file back into the PCB editor (File → Import → Specctra Session).