{"openapi":"3.1.0","info":{"title":"Electrolysis API","version":"1.0.0","description":"Faraday-law electrolysis maths as an API, computed locally and deterministically. The mass endpoint applies Faraday's first law of electrolysis, m = (Q·M)/(n·F) = (I·t·M)/(n·F), to give the mass of a substance deposited at a cathode or dissolved at an anode from the charge passed — or the current and time — the molar mass and the valence (electrons transferred per ion), with the Faraday constant 96485 C/mol. The charge endpoint inverts it to give the charge Q = (m·n·F)/M and, with a current, the plating time needed to deposit a target mass — the core sizing calculation for electroplating and anodising. The gas-volume endpoint computes the volume of gas evolved during electrolysis, moles = Q/(n·F) and volume = moles × 22.414 L/mol at STP, using the electrons per gas molecule (two for hydrogen, four for oxygen in water electrolysis). Molar mass is in g/mol, current in amperes, time in seconds, charge in coulombs and mass in grams. Everything is computed locally and deterministically, so it is instant and private. Ideal for electroplating, anodising, battery, hydrogen-production and chemistry-education app developers, plating-time and gas-yield tools, and electrochemistry teaching. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is electrolysis (Faraday's laws); for cell potential and the Nernst equation use an electrochemistry Nernst API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/electrolysis-api","description":"oanor gateway"}],"tags":[{"name":"Electrolysis"},{"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/charge":{"get":{"operationId":"get_v1_charge","tags":["Electrolysis"],"summary":"Required charge & time","description":"","parameters":[{"name":"molar_mass","in":"query","required":true,"description":"Molar mass (g/mol)","schema":{"type":"string"},"example":"63.55"},{"name":"electrons","in":"query","required":true,"description":"Electrons n","schema":{"type":"string"},"example":"2"},{"name":"mass","in":"query","required":true,"description":"Target mass (g)","schema":{"type":"string"},"example":"2.371"},{"name":"current","in":"query","required":false,"description":"Current (A) for time","schema":{"type":"string"},"example":"2"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Charge needed: Q = (m·n·F)/M. Divide by the current to get the plating time.","moles":0.0373092054,"inputs":{"mass_g":2.371,"electrons":2,"molar_mass":63.55},"time_s":3599.7911,"time_min":59.996518,"current_a":2,"required_charge_c":7199.5821},"meta":{"timestamp":"2026-06-05T11:30:24.751Z","request_id":"c68b77fa-61f5-4ccc-8479-c97216af524e"},"status":"ok","message":"Required 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/gas-volume":{"get":{"operationId":"get_v1_gas_volume","tags":["Electrolysis"],"summary":"Evolved gas volume","description":"","parameters":[{"name":"electrons","in":"query","required":true,"description":"Electrons per gas molecule","schema":{"type":"string"},"example":"2"},{"name":"current","in":"query","required":false,"description":"Current (A)","schema":{"type":"string"},"example":"2"},{"name":"time","in":"query","required":false,"description":"Time (s)","schema":{"type":"string"},"example":"3600"},{"name":"charge","in":"query","required":false,"description":"Or charge (C)","schema":{"type":"string"}},{"name":"molar_volume","in":"query","required":false,"description":"Molar volume (L/mol)","schema":{"type":"string"},"example":"22.414"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Gas evolved: moles = Q/(n·F), volume = moles · molar volume (22.414 L/mol at STP). Water electrolysis gives 2 electrons per H₂ and 4 per O₂.","moles":0.0373113708,"inputs":{"time_s":3600,"charge_c":7200,"current_a":2,"electrons":2,"molar_volume_l":22.414},"volume_ml":836.29706,"volume_liters":0.83629706},"meta":{"timestamp":"2026-06-05T11:30:24.861Z","request_id":"cf5314f0-8d6e-476f-9fab-5fb4121f8fa8"},"status":"ok","message":"Gas volume","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/mass":{"get":{"operationId":"get_v1_mass","tags":["Electrolysis"],"summary":"Deposited mass","description":"","parameters":[{"name":"molar_mass","in":"query","required":true,"description":"Molar mass (g/mol)","schema":{"type":"string"},"example":"63.55"},{"name":"electrons","in":"query","required":true,"description":"Electrons n (valence)","schema":{"type":"string"},"example":"2"},{"name":"current","in":"query","required":false,"description":"Current (A)","schema":{"type":"string"},"example":"2"},{"name":"time","in":"query","required":false,"description":"Time (s)","schema":{"type":"string"},"example":"3600"},{"name":"charge","in":"query","required":false,"description":"Or charge (C)","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Faraday's first law: m = (Q·M)/(n·F) = (I·t·M)/(n·F). The mass deposited or dissolved is proportional to the charge passed.","moles":0.0373113708,"inputs":{"time_s":3600,"charge_c":7200,"current_a":2,"electrons":2,"molar_mass":63.55},"deposited_mass_g":2.37113761},"meta":{"timestamp":"2026-06-05T11:30:24.934Z","request_id":"10fadb92-de55-42e6-a816-861def554d7c"},"status":"ok","message":"Deposited mass","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":"Molar mass in g/mol, electrons n the valence (or per gas molecule), current in A, time in s, charge in C. Faraday constant 96485 C/mol.","service":"electrolysis-api","formulae":{"mass":"m = (Q·M)/(n·F)","charge":"Q = (m·n·F)/M","gas_volume":"V = (Q/(n·F)) · 22.414 L/mol"},"constants":{"faraday_c_mol":96485.33212,"molar_volume_stp_l":22.413969},"endpoints":{"GET /v1/mass":"Deposited mass from charge (or current and time), molar mass and valence.","GET /v1/meta":"This document.","GET /v1/charge":"Charge and plating time needed to deposit a target mass.","GET /v1/gas-volume":"Volume of gas evolved from the charge and electrons per molecule."},"description":"Faraday's-law electrolysis calculator: mass deposited or dissolved, the charge and time required for a target mass, and the volume of gas evolved."},"meta":{"timestamp":"2026-06-05T11:30:25.012Z","request_id":"be349b3b-8029-4614-818d-a1f65279b058"},"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":3600,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":600,"monthly_call_quota":34000,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1500,"monthly_call_quota":216000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":4700,"monthly_call_quota":1285000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/electrolysis-api"}