{"openapi":"3.1.0","info":{"title":"Two-Stroke Mix API","version":"1.0.0","description":"Two-stroke premix maths as an API, computed locally and deterministically — the gas-to-oil numbers anyone running a chainsaw, string trimmer, leaf blower, outboard, dirt bike or RC engine mixes fuel by. The mix endpoint gives the oil to add to a tank of fuel at a given ratio: oil = fuel ÷ ratio, so one US gallon at 50:1 needs about 75.7 ml (2.6 fl oz) of two-stroke oil, 40:1 about 94.6 ml (3.2 fl oz) and 32:1 about 118 ml (4.0 fl oz), and it returns the total mix and the oil percentage too, in litres, gallons, millilitres or fluid ounces. The ratio endpoint runs it the other way — measure the fuel and the oil you actually put in and it tells you the real N:1 ratio, the oil percentage and the nearest common ratio, so you can check a mix or reverse-engineer a pre-mixed can. Get it wrong and it matters: too little oil and the engine seizes, too much and it fouls plugs and smokes — so always use the ratio in your tool’s manual. Everything is computed locally and deterministically, so it is instant and private. Ideal for small-engine, outdoor-power-equipment, marine, powersports and DIY app developers, fuel-mixing and shop tools, and maintenance software. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 2 compute endpoints.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/twostroke-api","description":"oanor gateway"}],"tags":[{"name":"TwoStroke"},{"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/mix":{"get":{"operationId":"get_v1_mix","tags":["TwoStroke"],"summary":"Oil for a fuel volume","description":"","parameters":[{"name":"fuel","in":"query","required":true,"description":"Fuel volume","schema":{"type":"string"},"example":"1"},{"name":"ratio","in":"query","required":true,"description":"Gas:oil ratio ('50:1' or '50')","schema":{"type":"string"},"example":"50:1"},{"name":"unit","in":"query","required":false,"description":"l, gal, impgal, ml or floz (default l)","schema":{"type":"string"},"example":"gal"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Oil = fuel ÷ ratio (a 50:1 mix is 50 parts fuel to 1 part oil). One US gallon at 50:1 needs about 2.6 fl oz of oil; at 40:1 about 3.2; at 32:1 about 4.0. Measure into the fuel, not the other way round, and shake.","inputs":{"fuel":1,"unit":"gal","ratio":"50:1"},"oil_ml":75.7,"fuel_ml":3785.4,"oil_fl_oz":2.56,"oil_percent":1.96,"total_mix_ml":3861.1},"meta":{"timestamp":"2026-06-06T07:13:56.538Z","request_id":"66b07f2c-2257-4e32-9fa9-5a45ad840543"},"status":"ok","message":"Premix oil","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/ratio":{"get":{"operationId":"get_v1_ratio","tags":["TwoStroke"],"summary":"Ratio from amounts","description":"","parameters":[{"name":"fuel","in":"query","required":true,"description":"Fuel amount","schema":{"type":"string"},"example":"5000"},{"name":"oil","in":"query","required":true,"description":"Oil amount","schema":{"type":"string"},"example":"100"},{"name":"unit","in":"query","required":false,"description":"same unit for both (default ml)","schema":{"type":"string"},"example":"ml"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Ratio = fuel ÷ oil (both in the same unit), reported as N:1. A bigger first number is leaner (less oil). Always use the ratio your engine's manual specifies; too little oil seizes it, too much fouls plugs and smokes.","ratio":50,"inputs":{"oil":100,"fuel":5000,"unit":"ml"},"oil_percent":1.96,"ratio_label":"50:1","nearest_common_ratio":"50:1"},"meta":{"timestamp":"2026-06-06T07:13:56.631Z","request_id":"28a15af7-b16f-408f-b9d1-b07a20b49b26"},"status":"ok","message":"Identify ratio","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":"Ratio as '50:1' or a number; volume in l, gal (US), impgal, ml or floz. Oil = fuel ÷ ratio. Use the manufacturer's specified ratio and a quality two-stroke oil. For four-stroke or fuel economy use a different API.","service":"twostroke-api","endpoints":{"GET /v1/mix":"Oil (ml / fl oz) to add to a fuel volume at a given ratio.","GET /v1/meta":"This document.","GET /v1/ratio":"The gas:oil ratio from measured fuel and oil amounts."},"description":"Two-stroke premix maths: oil needed for a fuel volume at a gas:oil ratio, and the ratio from measured amounts."},"meta":{"timestamp":"2026-06-06T07:13:56.717Z","request_id":"6cf4962f-25de-4ec4-9e38-268236203a27"},"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":6880,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":423,"monthly_call_quota":55900,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1162,"monthly_call_quota":229800,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":3715,"monthly_call_quota":1334000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/twostroke-api"}