utilpeek: convert units of measurement (exact factors)
convert_unitsConvert a numeric value from one measurement unit to another in the same category, such as length, mass, temperature, volume, pressure, energy, power, data size, time, or fuel economy.
Instructions
utilpeek: Convert units of measurement: length, weight, temperature, volume, pressure, energy, data size. For numbers in words use text_numbers. Returns a value converted between two units of one category, with the exact factor: length, mass, temperature (with offsets), volume (US and imperial), area, speed, pressure, energy, power, data size (kB = 1000 bytes, KiB = 1024), time and fuel economy (reciprocal). Cross-category or unknown units, ambiguous spellings (KB), temperatures below absolute zero and 0 into a reciprocal fuel unit are a 422 before any payment (not charged). gal, qt, pt, cup and fl_oz are US; the imperial ones end in _imp. Typically under 0.1 s. Price: USD 0.001. Free: 10 utilpeek calls per IP per UTC day. Docs: https://tanod.dev/learn/unit-conversion-api.html
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Unit to convert to, of the same category as `from`. | |
| from | Yes | Unit to convert from: a symbol or name such as in, ft, mi, kg, lb, C, F, K, L, gal, gal_imp, m2, acre, km/h, mph, kn, psi, inHg, atm, kWh, BTU, eV, hp, kB, KiB, Mbit, h, L/100km, mpg, mpg_imp. Case matters only where it must (kB vs kb, MB vs Mb). | |
| value | Yes | The number to convert (at most 1e300 in magnitude). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | ||
| from | No | ||
| kind | No | ||
| error | No | Only on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object. | |
| value | No | ||
| factor | No | ||
| offset | No | ||
| result | No | ||
| formula | No | ||
| to_name | No | ||
| category | No | ||
| from_name | No | ||
| factor_exact | No | ||
| offset_exact | No | ||
| factor_decimal | No | ||
| offset_decimal | No |