API & MCP

Everything a person can do on Ohmforge AC Sweep (Bode plot), a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Ohmforge AC Sweep (Bode plot)

Linearises the circuit at its DC operating point and solves the complex MNA equations across a logarithmic frequency sweep. Returns magnitude in dB and unwrapped phase of an output node (optionally relative to an input node), the peak gain, lower/upper −3 dB frequencies, the unity-gain frequency, a Bode chart and CSV.

Inputs of Ohmforge AC Sweep (Bode plot)
FieldTypeDefaultDescription
netlisttextarea—SPICE netlist. Subset: R C L V I D Q M E G K, X subcircuit instances with .subckt/.ends (nested, with params), .param and {expressions}, .model, SIN/PULSE/PWL sources, engineering suffixes (k, m, u, n, p, meg). Node 0 is ground. Leave empty when you pass an Ohmforge project instead.
projecttextarea—Ohmforge project JSON (optional). Alternative to the netlist: a .ohmforge.json project as saved by the app (format "ohmforge", version 1).
output (required)text"out"Output node
inputtext—Input source (gets AC = 1). Name of the V or I source to excite (e.g. V1). Empty = keep the AC magnitudes from the netlist.
inputNodetext—Reference node (optional). Report V(out)/V(ref) instead of V(out).
fstartnumber—Start frequency. Empty = .ac line or 1 Hz.
fstopnumber—Stop frequency. Empty = .ac line or 10 MHz.
pointsPerDecadeinteger—Points per decade. Empty = .ac line or 20.

Example request

RC low-pass (fc ≈ 1.59 kHz)

curl -X POST https://ohmforgeacsweep.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"netlist":"* RC low-pass, fc = 1/(2*pi*1k*100n) = 1591.5 Hz\nV1 in 0 DC 0 AC 1\nR1 in out 1k\nC1 out 0 100n\n.ac dec 20 10 1meg","output":"out","input":"V1"}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "ohmforge-ac-sweep": { "type": "http", "url": "https://ohmforgeacsweep.usefulweb.site/mcp" }
  }
}