{"openapi":"3.1.0","info":{"title":"Cooking API","version":"1.0.0","description":"Recipe and kitchen conversions as an API. Convert between volume units (teaspoon, tablespoon, cup, fl-oz, ml, litre, pint, quart, gallon) and between mass units (gram, kilogram, ounce, pound) — and, crucially, between volume and mass for a specific ingredient using its density, so 1 cup of all-purpose flour ≈ 125 g, 1 cup of granulated sugar ≈ 200 g and 1 cup of water ≈ 237 g. 30 common ingredients are built in (flours, sugars, butter, oils, honey, rice, oats, cocoa, cornstarch and more), each with its grams-per-cup. Perfect for recipe apps, scaling and \"metric vs cups\" conversion, shopping lists and meal-prep tools. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. Distinct from general physical unit conversion, which has no ingredient densities.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/cooking-api","description":"oanor gateway"}],"tags":[{"name":"Cooking"},{"name":"Reference"},{"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/convert":{"get":{"operationId":"get_v1_convert","tags":["Cooking"],"summary":"Convert a cooking measure","description":"","parameters":[{"name":"amount","in":"query","required":true,"description":"Amount","schema":{"type":"string"},"example":"1"},{"name":"from","in":"query","required":true,"description":"Unit (cup, g, tbsp, ml, oz…)","schema":{"type":"string"},"example":"cup"},{"name":"to","in":"query","required":true,"description":"Unit","schema":{"type":"string"},"example":"g"},{"name":"ingredient","in":"query","required":false,"description":"For volume<->mass (e.g. all-purpose-flour)","schema":{"type":"string"},"example":"all-purpose-flour"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"to":"g","from":"cup","amount":1,"result":124.918589,"ingredient":"all-purpose-flour","density_g_per_ml":0.528},"meta":{"timestamp":"2026-06-03T01:09:44.282Z","request_id":"dd9504e2-b331-44cc-9c0e-7358da774c63"},"status":"ok","message":"Convert a cooking measure","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/ingredients":{"get":{"operationId":"get_v1_ingredients","tags":["Reference"],"summary":"Supported ingredients","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"count":30,"mass_units":["mg","g","kg","oz","lb","lbs"],"ingredients":[{"name":"water","grams_per_cup":236.588236,"density_g_per_ml":1},{"name":"milk","grams_per_cup":243.922471,"density_g_per_ml":1.031},{"name":"heavy-cream","grams_per_cup":239.427295,"density_g_per_ml":1.012},{"name":"vegetable-oil","grams_per_cup":217.188001,"density_g_per_ml":0.918},{"name":"olive-oil","grams_per_cup":217.188001,"density_g_per_ml":0.918},{"name":"honey","grams_per_cup":339.977295,"density_g_per_ml":1.437},{"name":"maple-syrup","grams_per_cup":324.125883,"density_g_per_ml":1.37},{"name":"all-purpose-flour","grams_per_cup":124.918589,"density_g_per_ml":0.528},{"name":"bread-flour","grams_per_cup":130.12353,"density_g_per_ml":0.55},{"name":"whole-wheat-flour","grams_per_cup":120.66,"density_g_per_ml":0.51},{"name":"cake-flour","grams_per_cup":115.928236,"density_g_per_ml":0.49},{"name":"granulated-sugar","grams_per_cup":199.917059,"density_g_per_ml":0.845},{"name":"brown-sugar","grams_per_cup":220.027059,"density_g_per_ml":0.93},{"name":"powdered-sugar","grams_per_cup":119.950236,"density_g_per_ml":0.507},{"name":"caster-sugar","grams_per_cup":199.917059,"density_g_per_ml":0.845},{"name":"butter","grams_per_cup":226.888118,"density_g_per_ml":0.959},{"name":"salt","grams_per_cup":283.905883,"density_g_per_ml":1.2},{"name":"table-salt","grams_per_cup":283.905883,"density_g_per_ml":1.2},{"name":"kosher-salt","grams_per_cup":163.245883,"density_g_per_ml":0.69},{"name":"baking-soda","grams_per_cup":227.124707,"density_g_per_ml":0.96},{"name":"baking-powder","grams_per_cup":212.929412,"density_g_per_ml":0.9},{"name":"white-rice","grams_per_cup":185.012001,"density_g_per_ml":0.782},{"name":"rolled-oats","grams_per_cup":89.90353,"density_g_per_ml":0.38},{"name":"cocoa-powder","grams_per_cup":100.076824,"density_g_per_ml":0.423},{"name":"cornstarch","grams_per_cup":127.994236,"density_g_per_ml":0.541},{"name":"cornflour","grams_per_cup":127.994236,"density_g_per_ml":0.541},{"name":"chocolate-chips","grams_per_cup":179.807059,"density_g_per_ml":0.76},{"name":"peanut-butter","grams_per_cup":257.881177,"density_g_per_ml":1.09},{"name":"yogurt","grams_per_cup":243.685883,"density_g_per_ml":1.03},{"name":"breadcrumbs","grams_per_cup":108.830589,"density_g_per_ml":0.46}],"volume_units":["ml","milliliter","milliliters","l","liter","liters","tsp","teaspoon","teaspoons","tbsp","tablespoon","tablespoons","floz","fl-oz","cup","cups","pint","pt","quart","qt","gallon","gal"]},"meta":{"timestamp":"2026-06-03T01:09:44.366Z","request_id":"b2497327-c0ca-4ea7-a3b5-bda8c2e132c5"},"status":"ok","message":"Supported ingredients","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":{"name":"Cooking API","notes":"Volume units are US customary (1 cup = 236.59 ml). Volume<->mass requires an ingredient (defaults to water). Densities are typical values; brands vary. Nothing is stored.","version":"v1","endpoints":[{"path":"/v1/convert","params":{"to":"unit (required)","from":"unit (required)","amount":"required","ingredient":"needed for volume<->mass, e.g. all-purpose-flour"},"returns":"the converted amount"},{"path":"/v1/ingredients","params":[],"returns":"supported ingredients (with grams per cup) and units"},{"path":"/v1/meta","params":[],"returns":"this document"}],"description":"Recipe and kitchen conversions: between volume units (teaspoon, tablespoon, cup, ml, fl-oz, pint…), between mass units (g, kg, oz, lb), and — crucially — between volume and mass for a specific ingredient using its density (1 cup of all-purpose flour ≈ 125 g, 1 cup of sugar ≈ 200 g). Pure local, no key."},"meta":{"timestamp":"2026-06-03T01:09:44.451Z","request_id":"2d6259b2-ae04-45d6-8284-772eb12fba4c"},"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":1025,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":65,"monthly_call_quota":8650,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2055,"monthly_call_quota":137500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":5855,"monthly_call_quota":725000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/cooking-api"}