{"openapi":"3.1.0","info":{"title":"Alcohol & ABV API","version":"1.0.0","description":"Alcohol and cocktail maths as an API, computed locally and deterministically — the ABV, dilution and standard-drink numbers a bartender, brewer or drinks app works out behind the bar. The abv endpoint mixes a drink: pass the ingredients as a volume:abv list and it returns the final alcohol by volume = (sum of volume × ABV) ÷ total volume, so a Negroni-style 2 parts at 40 %, 1 at 20 % and 1 mixer at 0 % lands at 25 % ABV (50 US proof), with mixers diluting the result. The dilution endpoint models ice melt and stirring, which add water and drop the strength: final volume = volume × (1 + dilution) and ABV falls by the same factor while the alcohol itself is unchanged, so a 4 oz stirred drink at 25 % with 25 % dilution becomes 5 oz at 20 % — stirred drinks pick up roughly 20–25 %, shaken a little more. The standard endpoint counts the dose: pure alcohol = volume × ABV, then a US standard drink is 14 grams (0.6 fl oz) and a UK unit is 10 ml of pure alcohol, so a 12 fl oz beer at 5 % is one standard drink (14 g, 1.77 UK units) and a 5 fl oz glass of 12 % wine is one too. Everything is computed locally and deterministically, so it is instant and private. Ideal for bartending, brewing, beverage, hospitality and responsible-drinking app developers, cocktail-builder and drink-tracker tools, and bar-menu calculators. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 compute endpoints. For drink recipes use a cocktails database API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/abv-api","description":"oanor gateway"}],"tags":[{"name":"Alcohol"},{"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/abv":{"get":{"operationId":"get_v1_abv","tags":["Alcohol"],"summary":"Mixed-drink ABV","description":"","parameters":[{"name":"ingredients","in":"query","required":true,"description":"Comma list of 'volume:abv'","schema":{"type":"string"},"example":"2:40,1:20,1:0"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Final ABV = (sum of volume × abv) ÷ total volume. Mixers at 0 % dilute it. US proof is twice the ABV. This is the ABV before any ice melt — see /v1/dilution for that.","inputs":{"ingredients":[{"abv":40,"volume":2},{"abv":20,"volume":1},{"abv":0,"volume":1}]},"proof_us":50,"total_volume":4,"alcohol_volume":1,"final_abv_percent":25},"meta":{"timestamp":"2026-06-06T07:14:04.102Z","request_id":"3238dbae-4a2e-43ab-b04f-9abdb41a49c5"},"status":"ok","message":"Mixed ABV","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/dilution":{"get":{"operationId":"get_v1_dilution","tags":["Alcohol"],"summary":"Ice / stirring dilution","description":"","parameters":[{"name":"volume","in":"query","required":true,"description":"Starting volume","schema":{"type":"string"},"example":"4"},{"name":"abv","in":"query","required":true,"description":"Starting ABV %","schema":{"type":"string"},"example":"25"},{"name":"dilution_percent","in":"query","required":false,"description":"Added water as % of volume (default 25)","schema":{"type":"string"},"example":"25"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Ice melt adds water: final volume = volume × (1 + dilution); ABV drops by the same factor (alcohol amount is unchanged). Stirred drinks pick up ~20–25 %, shaken ~25–30 %, builds less. Defaults to 25 %.","inputs":{"abv":25,"volume":4,"dilution_percent":25},"water_added":1,"final_volume":5,"final_abv_percent":20},"meta":{"timestamp":"2026-06-06T07:14:04.205Z","request_id":"e8044773-ed1d-4b7a-b9c8-53272b3494fc"},"status":"ok","message":"Dilution","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/standard":{"get":{"operationId":"get_v1_standard","tags":["Alcohol"],"summary":"Standard drinks + units","description":"","parameters":[{"name":"volume","in":"query","required":true,"description":"Volume","schema":{"type":"string"},"example":"12"},{"name":"abv","in":"query","required":true,"description":"ABV %","schema":{"type":"string"},"example":"5"},{"name":"unit","in":"query","required":false,"description":"floz or ml (default floz)","schema":{"type":"string"},"example":"floz"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Pure alcohol = volume × ABV. A US standard drink is 14 g (0.6 fl oz) of pure alcohol; a UK unit is 10 ml. A 12 fl oz beer at 5 % ≈ 1 standard drink; a 5 fl oz glass of 12 % wine ≈ 1 too.","inputs":{"abv":5,"unit":"floz","volume":12},"uk_units":1.77,"volume_ml":354.88,"pure_alcohol_ml":17.74,"pure_alcohol_grams":14,"us_standard_drinks":1},"meta":{"timestamp":"2026-06-06T07:14:04.310Z","request_id":"14bb5b32-2621-4c42-a535-d20fcf83006a"},"status":"ok","message":"Standard drinks","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":"Ethanol density 0.789 g/ml; US standard drink = 14 g; UK unit = 10 ml; 1 fl oz = 29.5735 ml. Volumes in /v1/abv can be any single consistent unit. For drink recipes use a cocktails database API.","service":"abv-api","endpoints":{"GET /v1/abv":"Final ABV (and US proof) of a mixed drink from a 'volume:abv' ingredient list.","GET /v1/meta":"This document.","GET /v1/dilution":"Volume and ABV after ice-melt / stirring dilution.","GET /v1/standard":"US standard drinks, UK units and grams of alcohol for a volume at an ABV."},"description":"Alcohol / cocktail maths: final ABV of a mixed drink, dilution from ice, and standard-drink / unit counting."},"meta":{"timestamp":"2026-06-06T07:14:04.407Z","request_id":"5aa482de-ba24-49d0-921f-a547a8d0f319"},"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":7350,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":415,"monthly_call_quota":56000,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1160,"monthly_call_quota":231000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":3680,"monthly_call_quota":1348000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/abv-api"}