{"openapi":"3.1.0","info":{"title":"LED Resistor API","version":"1.0.0","description":"LED current-limiting-resistor maths as an API, computed locally and deterministically. The resistor endpoint sizes the series resistor for a single LED, R = (V_supply − V_forward) / I, and returns the resistor power dissipation (I²·R), the LED power, a recommended resistor wattage rating and the nearest E12 standard value (rounded up so the LED current stays at or below the target). The series endpoint sizes the one shared resistor for several LEDs wired in series, where the forward voltages add, R = (V_supply − n·V_f) / I, and flags when the supply is too low for the string. The parallel endpoint gives the per-LED resistor for LEDs in parallel (each needs its own) and the total current the supply must deliver. Currents are entered in milliamps. Everything is computed locally and deterministically, so it is instant and private. Ideal for electronics, maker, Arduino and hardware app developers, LED and lighting-circuit design tools, and electronics education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is LED resistor sizing; for general Ohm's law and reactance use an Ohm's-law API and for AWG wire properties use a wire-gauge API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/ledresistor-api","description":"oanor gateway"}],"tags":[{"name":"LED"},{"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/parallel":{"get":{"operationId":"get_v1_parallel","tags":["LED"],"summary":"Parallel LEDs","description":"","parameters":[{"name":"supply_voltage","in":"query","required":true,"description":"Supply voltage (V)","schema":{"type":"string"},"example":"5"},{"name":"led_voltage","in":"query","required":true,"description":"LED forward voltage Vf (V)","schema":{"type":"string"},"example":"2"},{"name":"count","in":"query","required":true,"description":"Number of parallel LEDs","schema":{"type":"string"},"example":"4"},{"name":"current","in":"query","required":false,"description":"Current per LED (mA)","schema":{"type":"string"},"example":"20"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Each parallel LED gets its own resistor R = (Vsupply − Vf)/I; the supply must deliver n × the per-LED current. Avoid a single shared resistor.","inputs":{"count":4,"current_ma":20,"led_voltage":2,"supply_voltage":5},"total_power_w":0.4,"nearest_e12_ohm":150,"total_current_ma":80,"resistor_per_led_ohm":150},"meta":{"timestamp":"2026-06-04T18:38:12.596Z","request_id":"1f2654ae-1aca-4cf4-a95f-05cffc93133e"},"status":"ok","message":"Parallel LEDs","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/resistor":{"get":{"operationId":"get_v1_resistor","tags":["LED"],"summary":"Single LED resistor","description":"","parameters":[{"name":"supply_voltage","in":"query","required":true,"description":"Supply voltage (V)","schema":{"type":"string"},"example":"5"},{"name":"led_voltage","in":"query","required":true,"description":"LED forward voltage Vf (V)","schema":{"type":"string"},"example":"2"},{"name":"current","in":"query","required":false,"description":"LED current (mA)","schema":{"type":"string"},"example":"20"},{"name":"current_a","in":"query","required":false,"description":"Or current in A","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"R = (Vsupply − Vf)/I. The nearest E12 is rounded up so the LED current stays at or below the target.","inputs":{"current_ma":20,"led_voltage":2,"supply_voltage":5},"led_power_w":0.04,"resistance_ohm":150,"nearest_e12_ohm":150,"resistor_power_w":0.06,"recommended_resistor_rating_w":"0.25 W"},"meta":{"timestamp":"2026-06-04T18:38:12.707Z","request_id":"b38f314e-533b-4812-92c4-07b7572258bc"},"status":"ok","message":"LED resistor","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/series":{"get":{"operationId":"get_v1_series","tags":["LED"],"summary":"Series LEDs","description":"","parameters":[{"name":"supply_voltage","in":"query","required":true,"description":"Supply voltage (V)","schema":{"type":"string"},"example":"12"},{"name":"led_voltage","in":"query","required":true,"description":"LED forward voltage Vf (V)","schema":{"type":"string"},"example":"2"},{"name":"count","in":"query","required":true,"description":"Number of LEDs in series","schema":{"type":"string"},"example":"3"},{"name":"current","in":"query","required":false,"description":"LED current (mA)","schema":{"type":"string"},"example":"20"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Series LEDs add forward voltages and share one resistor: R = (Vsupply − n·Vf)/I, the same current flows through all.","inputs":{"count":3,"current_ma":20,"led_voltage":2,"supply_voltage":12},"total_power_w":0.24,"resistance_ohm":300,"nearest_e12_ohm":330,"resistor_power_w":0.12,"total_led_voltage":6},"meta":{"timestamp":"2026-06-04T18:38:12.815Z","request_id":"0e1543ff-6818-4b29-8e8d-1c5ddc6f6d13"},"status":"ok","message":"Series LEDs","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":"Voltages in volts, current in mA (or current_a in A). Typical LED currents are 10–20 mA. The nearest E12 resistor is rounded up to keep the current at or below target.","service":"ledresistor-api","formulae":{"power":"P_resistor = I²·R,  P_led = Vf·I","series":"R = (Vsupply − n·Vf)/I","resistor":"R = (Vsupply − Vf) / I"},"endpoints":{"GET /v1/meta":"This document.","GET /v1/series":"One resistor for LEDs wired in series (forward voltages add).","GET /v1/parallel":"Per-LED resistor and total current for LEDs in parallel.","GET /v1/resistor":"Series resistor for one LED, with the nearest E12 value and power dissipation."},"description":"LED current-limiting-resistor calculator: single LED, series strings and parallel arrays, with the nearest E12 value and power ratings."},"meta":{"timestamp":"2026-06-04T18:38:12.895Z","request_id":"5431d254-7203-4af4-b71a-94beed127b3f"},"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":500,"monthly_call_quota":25000,"rps_limit":5,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1500,"monthly_call_quota":150000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":4500,"monthly_call_quota":795000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/ledresistor-api"}