{"openapi":"3.1.0","info":{"title":"Coffee Roasting API","version":"1.0.0","description":"Coffee-roasting maths as an API, computed locally and deterministically — the roast-profile numbers a home or specialty roaster tracks batch to batch. The loss endpoint works the weight-loss relationship from any two of the green weight, the roasted weight and the loss percentage: weight loss % = (green − roasted) / green × 100, so 1 kg of green dropping to 840 g is a 16 % loss, a 15 % target leaves 850 g, and to bag 800 g of roasted you charge 952 g of green (roasted ÷ (1 − loss%)). Light roasts shed about 12–14 %, medium 15–17 %, dark 18–20 %. The development endpoint computes the development time and the Development Time Ratio (DTR) from the total roast time and the first-crack time — DTR = (total − first crack) / total × 100, with most roasters aiming for roughly 20–25 %; times accepted as seconds or mm:ss. Everything is computed locally and deterministically, so it is instant and private. Ideal for coffee-roasting, roastery, specialty-coffee and roast-logging app developers, profile and batch tools, and roasting education. Pure local computation — no key, no third-party service, instant. Weights in grams, times in seconds or mm:ss. Live, nothing stored. 2 compute endpoints. This is roast-profile maths; for brewing ratios use a coffee-brewing API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/coffeeroast-api","description":"oanor gateway"}],"tags":[{"name":"Roasting"},{"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/development":{"get":{"operationId":"get_v1_development","tags":["Roasting"],"summary":"Development time ratio","description":"","parameters":[{"name":"total_time","in":"query","required":true,"description":"Total roast time (sec or mm:ss)","schema":{"type":"string"},"example":"10:00"},{"name":"first_crack","in":"query","required":true,"description":"First-crack time (sec or mm:ss)","schema":{"type":"string"},"example":"8:00"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Development Time Ratio (DTR) = (total − first crack) / total × 100. Most roasters target ~20–25%; lower can taste underdeveloped, higher can flatten acidity.","inputs":{"total_time":"10:00","first_crack":"8:00"},"total_seconds":600,"development_time":"2:00","development_seconds":120,"first_crack_seconds":480,"development_ratio_percent":20},"meta":{"timestamp":"2026-06-06T07:14:12.308Z","request_id":"6d3dc603-9746-4b78-bcd1-c49fb95753a4"},"status":"ok","message":"Development 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/loss":{"get":{"operationId":"get_v1_loss","tags":["Roasting"],"summary":"Roast weight loss","description":"","parameters":[{"name":"green_weight","in":"query","required":false,"description":"Green coffee weight","schema":{"type":"string"},"example":"1000"},{"name":"roasted_weight","in":"query","required":false,"description":"Roasted weight","schema":{"type":"string"},"example":"840"},{"name":"loss_percent","in":"query","required":false,"description":"Loss % (give any two)","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Weight loss % = (green − roasted) / green × 100. Light roasts lose ~12–14%, medium ~15–17%, dark ~18–20%. Green needed = roasted / (1 − loss%).","inputs":{"green_weight":1000,"roasted_weight":840},"green_weight":1000,"roasted_weight":840,"weight_loss_grams":160,"weight_loss_percent":16},"meta":{"timestamp":"2026-06-06T07:14:12.394Z","request_id":"a25525e0-f88d-43d9-aa3d-83734e56af50"},"status":"ok","message":"Weight loss","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":"Weights in grams (or any consistent unit); times as seconds or mm:ss. This is roast-profile maths; for brewing ratios use a coffee-brewing API.","service":"coffeeroast-api","endpoints":{"GET /v1/loss":"Weight loss % from any two of green, roasted, loss% — including green needed for a target yield.","GET /v1/meta":"This document.","GET /v1/development":"Development time and DTR from the total roast time and first-crack time."},"description":"Coffee-roasting maths: weight loss (green↔roasted), development-time ratio (DTR), and batch sizing."},"meta":{"timestamp":"2026-06-06T07:14:12.484Z","request_id":"6312630b-bcaf-41ca-a8de-2898941d7d1c"},"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":6150,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":340,"monthly_call_quota":59500,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":950,"monthly_call_quota":242000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":3050,"monthly_call_quota":1395000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/coffeeroast-api"}