{"openapi":"3.1.0","info":{"title":"Capacitor API","version":"1.0.0","description":"Capacitor maths as an API, computed locally and deterministically. The energy endpoint computes the stored energy and charge of a capacitor from any two of the capacitance, the voltage and the charge — E = ½CV² = ½QV and Q = CV — in joules, millijoules and coulombs. The charging endpoint models the RC charging and discharging transient: the time constant τ = RC, the voltage at a given time, V(t) = Vs(1 − e^(−t/RC)) when charging or V(t) = V₀·e^(−t/RC) when discharging, and the percent charged, or — given a target voltage — the time to reach it; a capacitor reaches about 63 % of the way in one time constant and over 99 % in five. The combination endpoint computes the total capacitance of capacitors in series (1/C = Σ1/Cᵢ) or parallel (C = ΣCᵢ). Capacitance accepts farads or the handy µF/nF/pF units. Everything is computed locally and deterministically, so it is instant and private. Ideal for electronics, maker, embedded and circuit-design app developers, power-supply and timing tools, and electronics education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is capacitor maths; for AC reactance and resonance use a resonance API and for LED resistor sizing an LED-resistor API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/capacitor-api","description":"oanor gateway"}],"tags":[{"name":"Capacitor"},{"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/charging":{"get":{"operationId":"get_v1_charging","tags":["Capacitor"],"summary":"RC transient","description":"","parameters":[{"name":"resistance","in":"query","required":true,"description":"Resistance (Ω)","schema":{"type":"string"},"example":"1000"},{"name":"capacitance_uf","in":"query","required":false,"description":"Capacitance (µF)","schema":{"type":"string"},"example":"100"},{"name":"capacitance","in":"query","required":false,"description":"Or capacitance (F)","schema":{"type":"string"}},{"name":"mode","in":"query","required":false,"description":"charging or discharging","schema":{"type":"string"},"example":"charging"},{"name":"source_voltage","in":"query","required":false,"description":"Source voltage (charging)","schema":{"type":"string"},"example":"12"},{"name":"initial_voltage","in":"query","required":false,"description":"Initial voltage (discharging)","schema":{"type":"string"}},{"name":"time","in":"query","required":false,"description":"Time (s) for the voltage","schema":{"type":"string"},"example":"0.1"},{"name":"target_voltage","in":"query","required":false,"description":"Or target voltage for the time","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Charging V(t)=Vs(1−e^(−t/RC)); discharging V(t)=V₀·e^(−t/RC). τ=RC; ≈63 % at 1τ, ≈99 % at 5τ.","inputs":{"mode":"charging","capacitance_f":0.0001,"resistance_ohm":1000},"time_s":0.1,"percent":63.212056,"voltage_v":7.585446706,"time_constant_s":0.1,"time_constant_ms":100},"meta":{"timestamp":"2026-06-05T03:08:59.900Z","request_id":"d9ee5b93-35fb-4fc8-8ab9-d01528937f1b"},"status":"ok","message":"RC transient","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/combination":{"get":{"operationId":"get_v1_combination","tags":["Capacitor"],"summary":"Series/parallel","description":"","parameters":[{"name":"capacitances","in":"query","required":true,"description":"Comma-separated capacitances","schema":{"type":"string"},"example":"100,200,300"},{"name":"mode","in":"query","required":false,"description":"series or parallel","schema":{"type":"string"},"example":"parallel"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Parallel: C = ΣCᵢ. Series: 1/C = Σ(1/Cᵢ). Output is in the same unit as the inputs.","inputs":{"mode":"parallel","count":3},"total_capacitance":600},"meta":{"timestamp":"2026-06-05T03:09:00.002Z","request_id":"c3851bc9-2530-41d6-93f2-cb942bebc1c9"},"status":"ok","message":"Series/parallel","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/energy":{"get":{"operationId":"get_v1_energy","tags":["Capacitor"],"summary":"Energy & charge","description":"","parameters":[{"name":"capacitance_uf","in":"query","required":false,"description":"Capacitance (µF)","schema":{"type":"string"},"example":"100"},{"name":"capacitance","in":"query","required":false,"description":"Or capacitance (F)","schema":{"type":"string"}},{"name":"voltage","in":"query","required":false,"description":"Voltage (V)","schema":{"type":"string"},"example":"12"},{"name":"charge","in":"query","required":false,"description":"Charge (C)","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"E = ½CV² = ½QV; charge Q = CV. Energy in joules, charge in coulombs.","inputs":{"charge_c":0.0012,"voltage_v":12,"capacitance_f":0.0001},"charge_c":0.0012,"energy_j":0.0072,"charge_uc":1200,"energy_mj":7.2,"capacitance_uf":100},"meta":{"timestamp":"2026-06-05T03:09:00.062Z","request_id":"0b04e534-a51e-41d0-bacd-57edd7a08ab8"},"status":"ok","message":"Energy & charge","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":"Capacitance in F (or capacitance_uf/_nf/_pf), voltage in V, resistance in Ω, time in s. The combination list shares one unit.","service":"capacitor-api","formulae":{"charge":"Q = CV","energy":"E = ½CV² = ½QV","charging":"V(t) = Vs(1 − e^(−t/RC))","time_constant":"τ = RC"},"endpoints":{"GET /v1/meta":"This document.","GET /v1/energy":"Energy and charge from any two of capacitance, voltage and charge.","GET /v1/charging":"RC transient — voltage at a time, or the time to reach a target voltage.","GET /v1/combination":"Total capacitance of capacitors in series or parallel."},"description":"Capacitor calculator: stored energy and charge, RC charging/discharging transients with the time constant, and series/parallel capacitance."},"meta":{"timestamp":"2026-06-05T03:09:00.145Z","request_id":"476736de-0745-4dff-94ab-6cb88e586a9d"},"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":20000,"rps_limit":5,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2400,"monthly_call_quota":120000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":7400,"monthly_call_quota":600000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/capacitor-api"}