API & MCP
Everything a person can do on Ohmforge Wire Gauge, Voltage Drop & Harness Calculator, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://ohmforgewiregauge.usefulweb.site/api/v1/calculate– run Ohmforge Wire Gauge, Voltage Drop & Harness CalculatorGET https://ohmforgewiregauge.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Ohmforge Wire Gauge, Voltage Drop & Harness Calculator
Pick the conductor for a DC, single-phase or three-phase run from the current, the cable length and the voltage drop you allow, with copper or aluminium at the conductor temperature — results in AWG and in metric mm², with drop, power loss and a fuse suggestion as guidance. Convert between AWG and mm² with the ASTM B258 formula, or turn a harness wire list into a cut list with allowances, a bill of materials per gauge and colour, CSV exports and a continuity check against an Ohmforge schematic.
| Field | Type | Default | Description |
|---|---|---|---|
mode | select (size, table, harness) | "size" | Task |
voltage | number | 12 | Supply voltage. Three-phase: line-to-line voltage. |
current | number | 20 | Load current |
lengthM | number | 5 | Cable length (one way). Distance from the source to the load; the return conductor is added automatically. |
circuit | select (dc, chassis, three-phase) | "dc" | Circuit |
maxDropPercent | number | 3 | Allowed voltage drop |
temperatureC | number | 20 | Conductor temperature. Resistance rises about 0.4 % per °C; use the operating temperature for a conservative result. |
material | select (copper, aluminium) | "copper" | Conductor |
fuseSeries | select (blade, iec) | "blade" | Fuse ratings |
convert | text | "2.5 mm²" | Size to convert (table). For example 12 AWG, 4/0, 2.5 mm² or 0.75mm2. |
wires | textarea | "# id, from, to, length (m), gauge, colour\nW1, BT1.+, F1.1, 0.30, 4 mm², RD\nW2 | Wire list (harness). One wire per line: id, from, to, length, gauge, colour (comma, semicolon or tab). Ends as REF.PIN (BT1.+, F1.1) to check them against a schematic; ends without a dot are splices or studs. |
lengthUnit | select (m, mm) | "m" | Length unit of the wire list |
bareGauge | select (awg, metric) | "awg" | A bare whole number in the gauge column means |
allowancePerEndMm | number | 20 | Strip and termination allowance per end |
slackPercent | number | 5 | Slack and service loops |
project | textarea | — | Ohmforge project for the continuity check (optional). Paste a .ohmforge.json project; the harness is checked against its nets. |
Example request
12 V, 20 A over 5 m (van or boat)
curl -X POST https://ohmforgewiregauge.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"mode":"size","voltage":12,"current":20,"lengthM":5,"circuit":"dc","maxDropPercent":3,"temperatureC":20,"material":"copper","fuseSeries":"blade"}'
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)
- Streamable HTTP endpoint:
https://ohmforgewiregauge.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
ohmforge_wire_gauge - Local stdio connector:
node src/mcp-stdio.ts --tool=ohmforge-wire-gauge
{
"mcpServers": {
"ohmforge-wire-gauge": { "type": "http", "url": "https://ohmforgewiregauge.usefulweb.site/mcp" }
}
}