Catalog/convert-units

Convert

Unit conversion API

Convert between physical units — length, mass, volume, area, speed, data size, time, and temperature. Answers 'convert 5 miles to km', 'how many ounces in a kilogram', '100 F to C', 'GB to MB'.

Price$0.01per request
MethodPOST
Route/v1/convert/units
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
convertunitsmeasurementmetricimperialtemperature
API URLhttps://x402.hexl.dev/v1/convert/units
Integration docs
Example request
{
  "value": 5,
  "from": "mi",
  "to": "km"
}
Example response
{
  "value": 5,
  "from": "mi",
  "to": "km",
  "result": 8.04672,
  "category": "length"
}
Input schema
{
  "type": "object",
  "required": [
    "value",
    "from",
    "to"
  ],
  "properties": {
    "value": {
      "type": "number"
    },
    "from": {
      "type": "string",
      "examples": [
        "mi"
      ]
    },
    "to": {
      "type": "string",
      "examples": [
        "km"
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "required": [
    "value",
    "from",
    "to",
    "result",
    "category"
  ],
  "properties": {
    "value": {
      "type": "number"
    },
    "from": {
      "type": "string"
    },
    "to": {
      "type": "string"
    },
    "result": {
      "type": "number"
    },
    "category": {
      "type": "string"
    }
  }
}