---
title: "Generate a complete SPICE netlist from a parameterized template. Supports common circuit topologies: low-pass RC filter, voltage divider, common emitter amplifier. Returns a ready-to-simulate netlist string that can be passed directly to spice_simulate. Use this when an agent needs to construct a circuit from high-level parameters without writing raw SPICE syntax. Feeds into spice_simulate for AC/DC/transient analysis."
method: POST
path: "/api/spice_template"
tags: ["rf"]
---

# Generate a complete SPICE netlist from a parameterized template. Supports common circuit topologies: low-pass RC filter, voltage divider, common emitter amplifier. Returns a ready-to-simulate netlist string that can be passed directly to spice_simulate. Use this when an agent needs to construct a circuit from high-level parameters without writing raw SPICE syntax. Feeds into spice_simulate for AC/DC/transient analysis.

`POST /api/spice_template`

## Request

- Base URL: `https://calc.engineer`
- URL: `https://calc.engineer/api/spice_template`
- Auth: none declared

## Request body

- object
  - `template` 'low_pass_rc' | 'voltage_divider' | 'common_emitter' | 'rc_highpass' | 'rlc_bandpass' | 'opamp_inverting' | 'diode_rectifier' | 'wien_bridge', required: Circuit template name
  - `params` object, required: Template-specific parameters (e.g. r_ohms, c_farads, v_source)
  - `analysis` 'ac' | 'dc' | 'tran': SPICE analysis type to include in netlist

## Response `200`

Computed result for spice_template

- object
  - `result` object, required
    - `netlist` string, required: Complete SPICE netlist ready for simulation
    - `template_name` string, required: Template used
    - `component_count` number, required: Number of components in the generated circuit
    - `analysis_type` string, required: Analysis type included in the netlist
  - `tool` string, required
  - `version` string, required
  - `computed_at` string, date-time, required
  - `chain` object, required
    - `feeds` unknown[]
      - unknown
    - `accepts_from` unknown[]
      - unknown

## Other responses

- `400`: Validation error or invalid JSON
- `404`: Tool not found

---

[API](https://skmtc.dev/calc/apis/calc-engineer-api.md) · [All operations](https://skmtc.dev/calc/apis/calc-engineer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/calc/apis/calc-engineer-api/revisions/8830480ec488?raw)
