{"openapi":"3.1.0","info":{"title":"Soap Making API","version":"1.0.0","description":"Soap-making and saponification maths as an API, computed locally and deterministically — the lye-calculator numbers every cold- and hot-process soaper needs, with the safety margin built in. The lye endpoint takes a list of oils as oil:grams pairs (olive, coconut, palm, shea, castor, lard, tallow and a couple of dozen more, each with its standard SAP value) and returns the sodium hydroxide (NaOH) or potassium hydroxide (KOH) to saponify them: lye = Σ(oil grams × SAP) × (1 − superfat), so 1 kg of coconut oil at 5 % superfat needs 169.1 g of NaOH (or 263.6 g of 90 %-pure KOH for liquid soap). It sizes the water by lye-to-water ratio, percentage of oils, or lye-solution concentration, adds the fragrance (a few percent of the oils) and totals the batch weight. The mould endpoint sizes a batch to a mould: oils to fill it ≈ volume(cm³) × 0.40, from a volume or length × width × height. SAP values are grams of NaOH per gram of oil. Everything is computed locally and deterministically, so it is instant and private. Ideal for soap-making, cosmetics, handmade-craft and maker app developers, lye-calculator and recipe tools, and soaping education. Pure local computation — no key, no third-party service, instant. Metric: grams, cm³, percent. Live, nothing stored. 2 compute endpoints. Lye is caustic — wear protection and double-check a new recipe; this is a planning aid.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/soap-api","description":"oanor gateway"}],"tags":[{"name":"Soap"},{"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/lye":{"get":{"operationId":"get_v1_lye","tags":["Soap"],"summary":"Lye / water / fragrance","description":"","parameters":[{"name":"oils","in":"query","required":true,"description":"oil:grams pairs, e.g. olive:500,coconut:300","schema":{"type":"string"},"example":"olive:500,coconut:300,palm:200"},{"name":"superfat","in":"query","required":false,"description":"Superfat % (default 5)","schema":{"type":"string"},"example":"5"},{"name":"lye_type","in":"query","required":false,"description":"naoh (bar) or koh (liquid)","schema":{"type":"string"},"example":"naoh"},{"name":"koh_purity","in":"query","required":false,"description":"KOH purity % (default 90)","schema":{"type":"string"}},{"name":"water_percent","in":"query","required":false,"description":"Water as % of oils","schema":{"type":"string"},"example":"38"},{"name":"water_ratio","in":"query","required":false,"description":"Or lye:water ratio","schema":{"type":"string"}},{"name":"lye_concentration","in":"query","required":false,"description":"Or lye solution %","schema":{"type":"string"}},{"name":"fragrance_percent","in":"query","required":false,"description":"Fragrance % of oils (default 4)","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Lye = Σ(oil grams × SAP) × (1 − superfat). Superfat leaves that % of oils unsaponified for a milder bar. KOH (liquid soap) = NaOH amount × 1.403 ÷ purity. SAP values are g NaOH per g oil.","inputs":{"oils":[{"name":"olive","grams":500},{"name":"coconut","grams":300},{"name":"palm","grams":200}],"lye_type":"NaOH","superfat_percent":5},"lye_type":"NaOH","lye_grams":141.17,"water_grams":380,"water_method":"38% of oils","fragrance_grams":40,"total_oil_grams":1000,"fragrance_percent":4,"batch_weight_grams":1561.17,"lye_solution_grams":521.17},"meta":{"timestamp":"2026-06-06T07:14:12.606Z","request_id":"aadc1cdb-0f2a-4b1b-b125-b0edec7f5d89"},"status":"ok","message":"Lye calculator","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/mould":{"get":{"operationId":"get_v1_mould","tags":["Soap"],"summary":"Mould → oil weight","description":"","parameters":[{"name":"volume","in":"query","required":false,"description":"Mould volume (cm³, or L×W×H)","schema":{"type":"string"},"example":"1000"},{"name":"length","in":"query","required":false,"description":"Length (cm)","schema":{"type":"string"}},{"name":"width","in":"query","required":false,"description":"Width (cm)","schema":{"type":"string"}},{"name":"height","in":"query","required":false,"description":"Height (cm)","schema":{"type":"string"}},{"name":"oil_density","in":"query","required":false,"description":"g oil per cm³ (default 0.40)","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Oils to fill a mould ≈ volume(cm³) × 0.40. Feed this oil weight into /v1/lye (split across your oils by percentage) to size the lye and water.","inputs":{"volume":1000,"oil_density":0.4},"total_oil_grams":400,"mould_volume_cm3":1000},"meta":{"timestamp":"2026-06-06T07:14:12.700Z","request_id":"6abdf54f-d73a-434e-8dd8-195217fd1a90"},"status":"ok","message":"Mould sizing","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 + SAP table","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"oils":{"hemp":0.1345,"lard":0.138,"neem":0.1387,"palm":0.141,"shea":0.128,"olive":0.134,"canola":0.1241,"castor":0.128,"jojoba":0.069,"tallow":0.14,"avocado":0.133,"babassu":0.175,"beeswax":0.069,"coconut":0.178,"soybean":0.135,"grapeseed":0.1265,"rice-bran":0.128,"sunflower":0.134,"palm-kernel":0.156,"cocoa-butter":0.137,"mango-butter":0.135,"sweet-almond":0.136},"notes":"Metric: grams, cm³, percent. SAP = g NaOH per g of oil. Always run a new recipe through a trusted lye calculator and wear protection — lye is caustic. KOH for liquid soap, NaOH for bar soap.","service":"soap-api","endpoints":{"GET /v1/lye":"Lye, water, fragrance and batch weight from an oils list with superfat.","GET /v1/meta":"This document (includes the supported oils and SAP values).","GET /v1/mould":"Total oil weight to fill a mould volume."},"description":"Soap-making saponification maths: lye (NaOH/KOH) for a set of oils with superfat, water and fragrance, plus mould sizing."},"meta":{"timestamp":"2026-06-06T07:14:12.799Z","request_id":"ec5dc23b-7f04-46ed-8e56-54aac0041ca2"},"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":5950,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":350,"monthly_call_quota":58000,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":990,"monthly_call_quota":238000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":3150,"monthly_call_quota":1380000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/soap-api"}