{"openapi":"3.1.0","info":{"title":"Wire Gauge API","version":"1.0.0","description":"AWG (American Wire Gauge) maths as an API, computed locally and deterministically. The awg endpoint returns the physical properties of a gauge — the diameter, 0.127·92^((36−n)/39) mm, the cross-section area, the DC resistance per kilometre and per 1000 ft for copper or aluminium, and the Preece fusing current (the point at which the wire melts, far above any safe operating ampacity). The fromdiameter endpoint goes the other way, giving the nearest AWG for a measured diameter or cross-section area, n = 36 − 39·log₉₂(d/0.127). The resistance endpoint gives the resistance of a wire run from its gauge, length and material, R = ρ·L/A. Gauges 0/0 (1/0), 00 (2/0) and 000 (3/0) are entered as −1, −2 and −3. Everything is computed locally and deterministically, so it is instant and private. Ideal for electronics, electrical and maker app developers, wiring and cable-selection tools, and engineering education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is wire-gauge geometry and resistance; for cable voltage drop over a circuit use a voltage-drop API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/wiregauge-api","description":"oanor gateway"}],"tags":[{"name":"Wire Gauge"},{"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 Gauge"],"summary":"AWG properties","description":"","parameters":[{"name":"awg","in":"query","required":true,"description":"AWG number (40 thin … 0 thick; −1/−2/−3 = 1/0,2/0,3/0)","schema":{"type":"string"},"example":"12"},{"name":"material","in":"query","required":false,"description":"copper | aluminium (default copper)","schema":{"type":"string"},"example":"copper"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"AWG diameter = 0.127·92^((36−n)/39) mm. Fusing current (Preece) is the melt point — far above the safe ampacity. Use AWG −1/−2/−3 for 1/0, 2/0, 3/0.","inputs":{"awg":12,"material":"copper"},"area_mm2":3.30877,"diameter_mm":2.05253,"fusing_current_a":236.13,"resistance_ohm_per_km":5.1983,"resistance_ohm_per_1000ft":1.58444},"meta":{"timestamp":"2026-06-04T18:38:13.035Z","request_id":"42747fb3-546b-44c5-b5db-c29cc1bcbf6c"},"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/fromdiameter":{"get":{"operationId":"get_v1_fromdiameter","tags":["Wire Gauge"],"summary":"AWG from diameter","description":"","parameters":[{"name":"diameter","in":"query","required":false,"description":"Conductor diameter (mm)","schema":{"type":"string"},"example":"2.05"},{"name":"area","in":"query","required":false,"description":"Or cross-section area (mm²)","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"AWG = 36 − 39·log₉₂(d/0.127). Negative AWG means 1/0, 2/0, 3/0 (−1, −2, −3).","inputs":{"diameter_mm":2.05},"awg_exact":12.0106,"awg_nearest":12,"nearest_diameter_mm":2.05253},"meta":{"timestamp":"2026-06-04T18:38:13.154Z","request_id":"217844f4-59b9-4ea3-be00-9a9f3ad38ef5"},"status":"ok","message":"AWG from diameter","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/resistance":{"get":{"operationId":"get_v1_resistance","tags":["Wire Gauge"],"summary":"Wire resistance","description":"","parameters":[{"name":"awg","in":"query","required":true,"description":"AWG number","schema":{"type":"string"},"example":"12"},{"name":"length","in":"query","required":true,"description":"Length (m)","schema":{"type":"string"},"example":"100"},{"name":"material","in":"query","required":false,"description":"copper | aluminium (default copper)","schema":{"type":"string"},"example":"copper"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"R = ρ·L/A with the AWG cross-section. Copper ρ = 0.0172, aluminium 0.0282 Ω·mm²/m at 20 °C.","inputs":{"awg":12,"length":100,"material":"copper"},"area_mm2":3.30877,"resistance_ohm":0.51983},"meta":{"timestamp":"2026-06-04T18:38:13.244Z","request_id":"90061ea6-1f84-4305-bbb7-29582f81843a"},"status":"ok","message":"Wire resistance","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":{"notes":"AWG number (40 thin … 0 thick; use −1/−2/−3 for 1/0, 2/0, 3/0). Diameter in mm, length in m. Fusing current is the wire's melt point (Preece), not a safe operating ampacity.","service":"wiregauge-api","formulae":{"area":"A = π/4·d²","diameter":"d = 0.127·92^((36−n)/39) mm","awg_from_d":"n = 36 − 39·log₉₂(d/0.127)","resistance":"R = ρ·L/A"},"endpoints":{"GET /v1/awg":"Diameter, area, resistance per km and fusing current for an AWG gauge.","GET /v1/meta":"This document.","GET /v1/resistance":"Resistance of a wire run from AWG, length and material.","GET /v1/fromdiameter":"Nearest AWG from a diameter (mm) or cross-section area (mm²)."},"description":"AWG wire-gauge calculator: gauge properties, AWG from a diameter/area, and wire resistance for a run."},"meta":{"timestamp":"2026-06-04T18:38:13.338Z","request_id":"ce102b37-6564-4574-9da5-4b0889164c3d"},"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":2000,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":900,"monthly_call_quota":30000,"rps_limit":5,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2400,"monthly_call_quota":200000,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6900,"monthly_call_quota":1500000,"rps_limit":60,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/wiregauge-api"}