{"openapi":"3.1.0","info":{"title":"Gas Mixture API","version":"1.0.0","description":"Gas-mixture maths as an API, computed locally and deterministically. The partial-pressure endpoint applies Dalton's law — give a list of component partial pressures and it sums them to the total and returns each gas's mole fraction; or give a total pressure and a mole fraction to get a partial pressure; or component and total moles to get a mole fraction (and a partial pressure when a total pressure is supplied). The mole-fraction endpoint takes the moles of each component and returns every mole fraction and, with a total pressure, the partial pressures; supply the molar masses too and it adds the mass fractions and the average molar mass of the mixture. The effusion endpoint applies Graham's law, rate₁/rate₂ = √(M₂/M₁), to compare how fast two gases effuse or diffuse from their molar masses, naming the faster gas and the time ratio. Everything is computed locally and deterministically, so it is instant and private. Ideal for chemistry-education, laboratory, process and scuba app developers, gas-blending and stoichiometry tools, and STEM teaching. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is gas-mixture maths; for the ideal-gas law of a single gas use a gas-law API and for molar mass from a formula a molar-mass API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/gasmixture-api","description":"oanor gateway"}],"tags":[{"name":"Gas Mixture"},{"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/effusion":{"get":{"operationId":"get_v1_effusion","tags":["Gas Mixture"],"summary":"Graham effusion","description":"","parameters":[{"name":"molar_mass1","in":"query","required":true,"description":"Molar mass of gas 1 (g/mol)","schema":{"type":"string"},"example":"2"},{"name":"molar_mass2","in":"query","required":true,"description":"Molar mass of gas 2 (g/mol)","schema":{"type":"string"},"example":"32"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Graham's law: rate₁/rate₂ = √(M₂/M₁). The lighter gas effuses (and diffuses) faster; time scales inversely with rate.","inputs":{"molar_mass1":2,"molar_mass2":32},"faster_gas":"gas 1","rate_ratio_1_over_2":4,"rate_ratio_2_over_1":0.25,"time_ratio_1_over_2":0.25},"meta":{"timestamp":"2026-06-04T18:38:01.522Z","request_id":"1275834a-4af1-4298-b9d7-5d2aaf2cda74"},"status":"ok","message":"Effusion","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/mole-fraction":{"get":{"operationId":"get_v1_mole_fraction","tags":["Gas Mixture"],"summary":"Mole & mass fractions","description":"","parameters":[{"name":"moles","in":"query","required":true,"description":"Comma-separated component moles","schema":{"type":"string"},"example":"3,1"},{"name":"total_pressure","in":"query","required":false,"description":"Total pressure for partials","schema":{"type":"string"},"example":"4"},{"name":"molar_masses","in":"query","required":false,"description":"Comma-separated molar masses (g/mol)","schema":{"type":"string"},"example":"2,32"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Mole fraction = nᵢ / Σn. With molar masses, mass fractions and the average molar mass are also returned.","inputs":{"components":2,"total_moles":4},"mass_fractions":[0.157895,0.842105],"mole_fractions":[0.75,0.25],"partial_pressures":[3,1],"average_molar_mass":9.5},"meta":{"timestamp":"2026-06-04T18:38:01.617Z","request_id":"8c18559f-2c45-41fb-8978-1959e2bd6ad3"},"status":"ok","message":"Mole fraction","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/partial-pressure":{"get":{"operationId":"get_v1_partial_pressure","tags":["Gas Mixture"],"summary":"Dalton partial pressure","description":"","parameters":[{"name":"partials","in":"query","required":false,"description":"Comma-separated partial pressures","schema":{"type":"string"},"example":"0.8,0.2"},{"name":"total_pressure","in":"query","required":false,"description":"Total pressure","schema":{"type":"string"},"example":"2"},{"name":"mole_fraction","in":"query","required":false,"description":"Mole fraction (0–1)","schema":{"type":"string"},"example":"0.21"},{"name":"moles","in":"query","required":false,"description":"Component moles","schema":{"type":"string"}},{"name":"total_moles","in":"query","required":false,"description":"Total moles","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Dalton's law: the total pressure is the sum of the component partial pressures.","inputs":{"partials":[0.8,0.2]},"mole_fractions":[0.8,0.2],"total_pressure":1},"meta":{"timestamp":"2026-06-04T18:38:01.713Z","request_id":"3878501e-bc4e-442b-a3b6-464f3cf37b5f"},"status":"ok","message":"Partial pressure","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":"Pressures in any consistent unit; amounts in moles; molar masses in g/mol. Lists are comma-separated. Ideal-gas mixtures.","service":"gasmixture-api","formulae":{"dalton":"P_total = ΣPᵢ, Pᵢ = xᵢ·P_total","graham":"rate₁/rate₂ = √(M₂/M₁)","mole_fraction":"xᵢ = nᵢ / Σn"},"endpoints":{"GET /v1/meta":"This document.","GET /v1/effusion":"Graham's law effusion/diffusion rate ratio from two molar masses.","GET /v1/mole-fraction":"Mole fractions, partial pressures and mass fractions from component amounts.","GET /v1/partial-pressure":"Dalton's law — total from partials, partial from a mole fraction, or fraction from moles."},"description":"Gas-mixture calculator: Dalton's law of partial pressures, mole and mass fractions of a mixture, and Graham's law of effusion and diffusion."},"meta":{"timestamp":"2026-06-04T18:38:01.818Z","request_id":"a6dfc070-6d57-46d7-9b78-038951d66bab"},"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":3000,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":500,"monthly_call_quota":40000,"rps_limit":5,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1500,"monthly_call_quota":250000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":4900,"monthly_call_quota":1539000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/gasmixture-api"}