{"openapi":"3.1.0","info":{"title":"Climetry humidity calculation API","version":"1","description":"Stateless calculation of relative humidity, dew point, frost point, vapour pressure, humidity ratio and absolute humidity for one moist-air state, with an optional surface condensation check. Same validation and equations as the calculator at https://www.getclimetry.com/tools/relative-humidity-calculator (model climetry-moist-air 1.0.0). No authentication, no stored data. RH is defined over liquid water; the enhancement factor is not applied."},"externalDocs":{"url":"https://www.getclimetry.com/tools/relative-humidity-calculator/api"},"servers":[{"url":"https://www.getclimetry.com"}],"paths":{"/api/tools/humidity":{"get":{"operationId":"calculateMoistAir","summary":"Calculate moist-air properties for one state","description":"Give air_temperature and exactly one of relative_humidity or dew_point. Units are set for all inputs and outputs by \"units\". Unknown or repeated parameters are rejected. Query strings longer than 1024 characters are rejected.","parameters":[{"name":"units","in":"query","required":true,"schema":{"type":"string","enum":["si","us"]},"description":"Unit system for inputs and outputs. \"si\": °C, kPa, g/kg, g/m³. \"us\": °F, inHg, gr/lb, gr/ft³. Relative humidity is always in percent."},{"name":"air_temperature","in":"query","required":true,"schema":{"type":"string","pattern":"^-?(\\d+(\\.\\d+)?|\\.\\d+)$","description":"Dry-bulb air temperature, 0.01 °C / 32.02 °F to 60 °C / 140 °F."}},{"name":"relative_humidity","in":"query","required":false,"schema":{"type":"string","pattern":"^-?(\\d+(\\.\\d+)?|\\.\\d+)$","description":"Relative humidity over liquid water in percent, 1 to 100. Mutually exclusive with dew_point."}},{"name":"dew_point","in":"query","required":false,"schema":{"type":"string","pattern":"^-?(\\d+(\\.\\d+)?|\\.\\d+)$","description":"Dew point over liquid water, 0.01 °C / 32.02 °F up to the air temperature. Mutually exclusive with relative_humidity. Air drier than this has only a frost point; give relative_humidity instead."}},{"name":"surface_temperature","in":"query","required":false,"schema":{"type":"string","pattern":"^-?(\\d+(\\.\\d+)?|\\.\\d+)$","description":"Optional surface temperature for the condensation check, -40 °C / -40 °F to 80 °C / 176 °F."}},{"name":"pressure","in":"query","required":false,"schema":{"type":"string","pattern":"^-?(\\d+(\\.\\d+)?|\\.\\d+)$","description":"Air pressure, 50 kPa / 14.77 inHg to 110 kPa / 32.48 inHg. Default 101.325 kPa (29.92 inHg); the response says when the default was used."}}],"responses":{"200":{"description":"Calculated state.","content":{"application/json":{"schema":{"type":"object","required":["model","units","mode","inputs","results","surface","warnings"],"properties":{"model":{"type":"object","description":"Model id and version, equations and assumptions."},"units":{"type":"string","enum":["si","us"]},"mode":{"type":"string","enum":["rh-to-dew-point","dew-point-to-rh"]},"inputs":{"type":"object","description":"The inputs as used, including the pressure and whether it was the default."},"results":{"type":"object","required":["relative_humidity","dew_point","frost_point","vapour_pressure","humidity_ratio","absolute_humidity"],"properties":{"relative_humidity":{"type":"object","required":["value","unit","display"],"properties":{"value":{"type":["number","null"],"description":"Unrounded value in the requested unit system; null when the quantity does not exist for this air (see reason)."},"unit":{"type":"string"},"display":{"type":["string","null"],"description":"The value rounded as on the calculator page (typographic minus sign)."},"reason":{"type":"string","description":"Present only when value is null."}}},"dew_point":{"type":"object","required":["value","unit","display"],"properties":{"value":{"type":["number","null"],"description":"Unrounded value in the requested unit system; null when the quantity does not exist for this air (see reason)."},"unit":{"type":"string"},"display":{"type":["string","null"],"description":"The value rounded as on the calculator page (typographic minus sign)."},"reason":{"type":"string","description":"Present only when value is null."}},"description":"Null with a reason when the vapour pressure is below the triple point (611.657 Pa)."},"frost_point":{"type":"object","required":["value","unit","display"],"properties":{"value":{"type":["number","null"],"description":"Unrounded value in the requested unit system; null when the quantity does not exist for this air (see reason)."},"unit":{"type":"string"},"display":{"type":["string","null"],"description":"The value rounded as on the calculator page (typographic minus sign)."},"reason":{"type":"string","description":"Present only when value is null."}},"description":"Over ice. Null with a reason when the air has a dew point at or above 0.01 °C."},"vapour_pressure":{"type":"object","required":["value","unit","display"],"properties":{"value":{"type":["number","null"],"description":"Unrounded value in the requested unit system; null when the quantity does not exist for this air (see reason)."},"unit":{"type":"string"},"display":{"type":["string","null"],"description":"The value rounded as on the calculator page (typographic minus sign)."},"reason":{"type":"string","description":"Present only when value is null."}}},"humidity_ratio":{"type":"object","required":["value","unit","display"],"properties":{"value":{"type":["number","null"],"description":"Unrounded value in the requested unit system; null when the quantity does not exist for this air (see reason)."},"unit":{"type":"string"},"display":{"type":["string","null"],"description":"The value rounded as on the calculator page (typographic minus sign)."},"reason":{"type":"string","description":"Present only when value is null."}}},"absolute_humidity":{"type":"object","required":["value","unit","display"],"properties":{"value":{"type":["number","null"],"description":"Unrounded value in the requested unit system; null when the quantity does not exist for this air (see reason)."},"unit":{"type":"string"},"display":{"type":["string","null"],"description":"The value rounded as on the calculator page (typographic minus sign)."},"reason":{"type":"string","description":"Present only when value is null."}}}}},"surface":{"type":["object","null"],"description":"Present when surface_temperature was given.","properties":{"reference":{"type":"string","enum":["dew point","frost point"]},"reference_temperature":{"type":"object","required":["value","unit","display"],"properties":{"value":{"type":["number","null"],"description":"Unrounded value in the requested unit system; null when the quantity does not exist for this air (see reason)."},"unit":{"type":"string"},"display":{"type":["string","null"],"description":"The value rounded as on the calculator page (typographic minus sign)."},"reason":{"type":"string","description":"Present only when value is null."}}},"margin":{"type":"object","required":["value","unit","display"],"properties":{"value":{"type":["number","null"],"description":"Unrounded value in the requested unit system; null when the quantity does not exist for this air (see reason)."},"unit":{"type":"string"},"display":{"type":["string","null"],"description":"The value rounded as on the calculator page (typographic minus sign)."},"reason":{"type":"string","description":"Present only when value is null."}},"description":"Surface temperature minus reference temperature (temperature difference)."},"reaches_reference":{"type":"boolean"},"surface_below_freezing":{"type":"boolean"}}},"warnings":{"type":"array","items":{"type":"string"}}}},"example":{"model":{"id":"climetry-moist-air","version":"1.0.0","api_version":"1"},"units":"si","mode":"rh-to-dew-point","inputs":{"air_temperature":{"value":22,"unit":"°C"},"relative_humidity":{"value":60,"unit":"%"},"pressure":{"value":101.325,"unit":"kPa","source":"default"},"surface_temperature":null},"results":{"relative_humidity":{"value":60,"unit":"%","display":"60.0"},"dew_point":{"value":13.88654163,"unit":"°C","display":"13.9"},"frost_point":{"value":null,"unit":"°C","display":null,"reason":"Not reported: the air has a dew point at or above 0.01 °C. A frost point is given only when the water vapour pressure is below 611.657 Pa."},"vapour_pressure":{"value":1.587,"unit":"kPa","display":"1.587"},"humidity_ratio":{"value":9.897,"unit":"g/kg","display":"9.90"},"absolute_humidity":{"value":11.65,"unit":"g/m³","display":"11.65"}},"surface":null,"warnings":["No pressure given: standard sea-level pressure (101.325 kPa, 29.92 inHg) was used. It affects humidity ratio, not RH or dew point."]}}}},"400":{"description":"Malformed query or input outside the supported range.","content":{"application/json":{"schema":{"type":"object","required":["error","model","documentation"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["unknown_parameter","duplicate_parameter","missing_parameter","invalid_units","conflicting_parameters","invalid_number","invalid_input","query_too_long","calculation_failed"]},"message":{"type":"string"},"fields":{"type":"object","additionalProperties":{"type":"string"},"description":"Per-parameter explanation, keyed by parameter name."}}},"model":{"type":"object"},"documentation":{"type":"string","format":"uri"}}}}}},"414":{"description":"Query string too long.","content":{"application/json":{"schema":{"type":"object","required":["error","model","documentation"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["unknown_parameter","duplicate_parameter","missing_parameter","invalid_units","conflicting_parameters","invalid_number","invalid_input","query_too_long","calculation_failed"]},"message":{"type":"string"},"fields":{"type":"object","additionalProperties":{"type":"string"},"description":"Per-parameter explanation, keyed by parameter name."}}},"model":{"type":"object"},"documentation":{"type":"string","format":"uri"}}}}}}}}}}}