{"openapi":"3.1.0","info":{"title":"Draft Beer API","version":"1.0.0","description":"Draft-beer dispense maths as an API, computed locally and deterministically — the CO₂ pressure and beer-line numbers a homebrewer, kegerator owner or bar sets a tap by. (This is the serving side; for ABV, gravity and IBU that is a homebrewing calculation.) The carbonation endpoint gives the regulator head pressure that holds a target carbonation at the serving temperature, from the standard volumes-temperature-pressure regression: 2.5 volumes of CO₂ at 38 °F needs about 11 psi, and colder beer holds the same carbonation at a lower pressure — British ales sit around 1.5–2.0 volumes, US ales 2.2–2.7, lagers and wheats higher. The balance endpoint sizes the beer line so the system pours a clean head instead of foaming or pouring slow: line length = (applied pressure − 0.5 × rise − residual) ÷ the line’s resistance per foot, where gravity adds about 0.5 psi per foot of lift and roughly 1 psi is left at the faucet — so 12 psi with no rise on 3/16-inch vinyl (≈3 psi/ft) wants about 3.7 feet, while narrower or wider tubing changes everything. Everything is computed locally and deterministically, so it is instant and private. Ideal for homebrew, kegerator, bar, brewery-taproom and beverage app developers, draft-system and troubleshooting tools, and hospitality software. Pure local computation — no key, no third-party service, instant. Dispense side only. Live, nothing stored. 2 compute endpoints.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/draftbeer-api","description":"oanor gateway"}],"tags":[{"name":"Draft"},{"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/balance":{"get":{"operationId":"get_v1_balance","tags":["Draft"],"summary":"Beer-line balancing","description":"","parameters":[{"name":"pressure_psi","in":"query","required":true,"description":"Applied/regulator pressure (psi)","schema":{"type":"string"},"example":"12"},{"name":"rise_ft","in":"query","required":false,"description":"Vertical lift keg→faucet (ft)","schema":{"type":"string"},"example":"0"},{"name":"line","in":"query","required":false,"description":"3/16-vinyl, 1/4-vinyl, 3/16-poly, …","schema":{"type":"string"},"example":"3/16-vinyl"},{"name":"resistance_psi_per_ft","in":"query","required":false,"description":"Custom line resistance (psi/ft)","schema":{"type":"string"}},{"name":"faucet_residual_psi","in":"query","required":false,"description":"Residual at faucet (default 1)","schema":{"type":"string"},"example":"1"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Line length = (applied pressure − 0.5 × rise − residual) ÷ line resistance per foot. Gravity adds ~0.5 psi per foot of lift; ~1 psi residual is left at the faucet. A balanced line pours a proper head with no foaming or over-restriction. If length is ≤ 0, use a higher-resistance (narrower) line.","inputs":{"rise_ft":0,"pressure_psi":12,"faucet_residual_psi":1,"resistance_psi_per_ft":3},"balanced":true,"line_length_m":1.12,"line_length_ft":3.67},"meta":{"timestamp":"2026-06-06T07:14:00.143Z","request_id":"02148117-40f8-4ed4-9538-188bcc457770"},"status":"ok","message":"Line balance","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/carbonation":{"get":{"operationId":"get_v1_carbonation","tags":["Draft"],"summary":"CO₂ pressure for carbonation","description":"","parameters":[{"name":"volumes","in":"query","required":true,"description":"Target CO₂ volumes","schema":{"type":"string"},"example":"2.5"},{"name":"temperature","in":"query","required":true,"description":"Serving temperature","schema":{"type":"string"},"example":"38"},{"name":"temp_unit","in":"query","required":false,"description":"f or c (default f)","schema":{"type":"string"},"example":"f"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Regulator head pressure to hold the target CO₂ volumes at the serving temperature (the gas equilibrium). Colder beer holds CO₂ at lower pressure. British ales ~1.5–2.0 vols, US ales ~2.2–2.7, lagers ~2.4–2.8, many lagers/wheats higher.","inputs":{"volumes":2.5,"temp_unit":"f","temperature_f":38},"pressure_bar":0.78,"pressure_kpa":77.5,"pressure_psi":11.2},"meta":{"timestamp":"2026-06-06T07:14:00.221Z","request_id":"414c3b58-cdfe-45ea-8157-0607914d8060"},"status":"ok","message":"Carbonation 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":"Dispense side only (not brewing). Carbonation uses the standard volumes/temperature/pressure regression. Balance: length = (pressure − 0.5·rise − residual) ÷ resistance/ft; 3/16\" vinyl ≈ 3 psi/ft. For ABV, gravity or IBU use a homebrewing API.","service":"draftbeer-api","endpoints":{"GET /v1/meta":"This document.","GET /v1/balance":"Beer-line length to balance a system from pressure, rise and line resistance.","GET /v1/carbonation":"Regulator CO₂ pressure for a target carbonation (volumes) at serving temperature."},"description":"Draft-beer dispense maths: CO₂ head pressure for a target carbonation at temperature, and beer-line balancing."},"meta":{"timestamp":"2026-06-06T07:14:00.312Z","request_id":"01ad6cb6-eea3-493b-a72f-7e462f5ce7a0"},"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":7200,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":416,"monthly_call_quota":56300,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1168,"monthly_call_quota":230500,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":3705,"monthly_call_quota":1344000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/draftbeer-api"}