Catalog/ref-cooking-units

Reference

Ingredient-density cooking converter API

Convert cooking quantities between volume and weight using an ingredient DENSITY table (e.g. 1 cup flour = ~125 g, 1 cup sugar = ~200 g) and convert oven temperatures (C/F/gas mark) — the value-add being density-aware volume-to-weight conversion. Differs from util/convert-units which is generic and density-unaware. Answers 'how many grams is 1 cup of flour', 'convert 200g sugar to cups', '350F in celsius', 'gas mark for 180C'.

Price$0.01per request
MethodPOST
Route/v1/ref/cooking-units
StatusLive
MIME typeapplication/json
Rate limit60/minute
CacheNo cache
refcookingrecipeconversiondensitygramscupsoven
API URLhttps://x402.hexl.dev/v1/ref/cooking-units
Integration docs
Example request
{
  "quantity": 1,
  "from": "cup",
  "to": "g",
  "ingredient": "flour"
}
Example response
{
  "result": 125.1551,
  "quantity": 1,
  "from": "cup",
  "to": "g",
  "ingredient": "flour",
  "densityGPerMl": 0.529,
  "dimension": "volume->weight"
}
Input schema
{
  "type": "object",
  "required": [
    "quantity",
    "from",
    "to"
  ],
  "properties": {
    "quantity": {
      "type": "number",
      "examples": [
        1
      ]
    },
    "from": {
      "type": "string",
      "examples": [
        "cup"
      ]
    },
    "to": {
      "type": "string",
      "examples": [
        "g"
      ]
    },
    "ingredient": {
      "type": "string",
      "examples": [
        "flour"
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}