Two-Stroke Mix API
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.
api.oanor.com/twostroke-api