{"openapi":"3.1.0","info":{"title":"Wire Gauge (AWG) API","version":"1.0.0","description":"American Wire Gauge maths as an API, computed locally and deterministically from the AWG definition. The awg endpoint takes a gauge — an integer, or 0/00/000/0000 (1/0–4/0) — and returns the conductor diameter (millimetres, inches, mils), the cross-section area (mm², kcmil and circular mils), the DC resistance per kilometre and per 1000 feet for copper and aluminium, and a typical ampacity. The convert endpoint finds the nearest standard AWG for a given cross-section area, diameter or kcmil, and also reports the exact non-integer gauge. The voltage-drop endpoint computes the round-trip voltage drop and power loss for a wiring run from the gauge (or area), length, current and conductor material, with the percentage drop and the voltage left at the load. Everything is computed locally and deterministically, so it is instant and private. Resistances are at 20°C; ampacity figures are typical guidance only — real installations are governed by the NEC/IEC tables for the conductor, insulation and conditions. Ideal for electrical and electronics tools, maker and hobby projects, solar and automotive wiring, and AV and installation planning. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is wire-gauge physics; for Ohm's-law voltage/current/resistance use an electronics API and for resistor colour bands use a resistor API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/awg-api","description":"oanor gateway"}],"tags":[{"name":"Wire"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/awg":{"get":{"operationId":"get_v1_awg","tags":["Wire"],"summary":"AWG diameter, area, resistance, ampacity","description":"","parameters":[{"name":"awg","in":"query","required":true,"description":"Gauge: integer or 0/00/000/0000","schema":{"type":"string"},"example":"10"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"awg":"10","note":"Diameter d(mm) = 0.127 × 92^((36−n)/39); area = π/4·d². Resistance at 20°C; ampacity is typical guidance only.","input":{"awg":"10"},"area_mm2":5.2612,"area_kcmil":10.383,"diameter_mm":2.5882,"diameter_inch":0.1019,"diameter_mils":101.9,"area_circular_mils":10383,"typical_ampacity_a":30,"resistance_ohm_per_km_copper":3.2768,"resistance_ohm_per_km_aluminum":5.0369,"resistance_ohm_per_1000ft_copper":0.9988},"meta":{"timestamp":"2026-06-04T01:59:20.911Z","request_id":"78958bc7-11c9-44ae-a482-8bbde21d6c05"},"status":"ok","message":"AWG properties","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/convert":{"get":{"operationId":"get_v1_convert","tags":["Wire"],"summary":"Nearest AWG for area/diameter","description":"","parameters":[{"name":"area_mm2","in":"query","required":false,"description":"Cross-section mm²","schema":{"type":"string"},"example":"5.26"},{"name":"diameter_mm","in":"query","required":false,"description":"Or diameter mm","schema":{"type":"string"}},{"name":"kcmil","in":"query","required":false,"description":"Or kcmil","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Nearest standard AWG to the given size. exact_awg is the non-integer gauge that matches exactly.","input":{"target_diameter_mm":2.5879},"nearest":{"awg":"10","area_mm2":5.2612,"area_kcmil":10.383,"diameter_mm":2.5882,"diameter_inch":0.1019,"diameter_mils":101.9,"area_circular_mils":10383,"typical_ampacity_a":30,"resistance_ohm_per_km_copper":3.2768,"resistance_ohm_per_km_aluminum":5.0369,"resistance_ohm_per_1000ft_copper":0.9988},"exact_awg":10.001,"nearest_awg":"10"},"meta":{"timestamp":"2026-06-04T01:59:21.014Z","request_id":"fbfb403b-2f4d-4759-9e41-02303d028174"},"status":"ok","message":"Area/diameter to AWG","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/voltage-drop":{"get":{"operationId":"get_v1_voltage_drop","tags":["Wire"],"summary":"Circuit voltage drop & loss","description":"","parameters":[{"name":"awg","in":"query","required":false,"description":"Gauge (or area_mm2)","schema":{"type":"string"},"example":"12"},{"name":"area_mm2","in":"query","required":false,"description":"Cross-section mm²","schema":{"type":"string"}},{"name":"length_m","in":"query","required":true,"description":"One-way run length (m)","schema":{"type":"string"},"example":"30"},{"name":"current_a","in":"query","required":true,"description":"Current (A)","schema":{"type":"string"},"example":"15"},{"name":"voltage","in":"query","required":false,"description":"Source voltage (for %)","schema":{"type":"string"},"example":"120"},{"name":"material","in":"query","required":false,"description":"copper|aluminum","schema":{"type":"string"},"example":"copper"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Round-trip drop over two conductors: ΔV = 2 × I × R/m × length. Aim under ~3% for branch circuits.","input":{"length_m":30,"material":"copper","current_a":15,"source_voltage":120,"conductor_resistance_ohm_per_km":5.2104},"power_loss_w":70.34,"voltage_drop_v":4.6894,"voltage_at_load_v":115.311,"voltage_drop_percent":3.908,"circuit_resistance_ohm":0.31262},"meta":{"timestamp":"2026-06-04T01:59:21.125Z","request_id":"9d0a4554-f8c0-41ef-b2f7-c9ba1ed20f92"},"status":"ok","message":"Voltage drop","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Resistances at 20°C (copper 1.724e-8, aluminum 2.65e-8 Ω·m). Ampacity is typical guidance — follow NEC/IEC for real installs.","service":"awg","endpoints":{"/v1/awg":"Diameter, area (mm²/kcmil/cmil), resistance and typical ampacity for an AWG number.","/v1/convert":"Nearest AWG for a cross-section area, diameter or kcmil.","/v1/voltage-drop":"Circuit voltage drop and power loss for a run (AWG/area, length, current, material)."},"description":"American Wire Gauge maths: diameter, cross-section area, resistance per length, typical ampacity, and circuit voltage drop."},"meta":{"timestamp":"2026-06-04T01:59:21.195Z","request_id":"13c48822-a30e-4fbe-a4d5-455f1a225996"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":10535,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":1205,"monthly_call_quota":20150,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":3195,"monthly_call_quota":251500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6995,"monthly_call_quota":1300000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/awg-api"}