
Unit Converter API
Convert measurements instantly with natural language. Convert length, weight, temperature, volume, area, speed, time, and pressure without complex formulas.
All API requests require a valid API key passed in the Authorization header as a Bearer token.
10 requests per minute
2 endpoints available
Overview
Convert units described in plain English: length, weight, temperature, volume, area, speed, time, pressure and more. The conversion comes from an AI model and is returned as text: result holds the converted value and details holds the units and conversion factor used.
Limits
- This endpoint calls an AI model, so it is on the AI tier: 10 requests per minute and 200 per day per API key.
questioncan be up to 2,000 characters.- The model's reply is split into
resultanddetailsat a heading such as "Conversion Details" or "Explanation", or after the first line. Both are plain text and may contain Markdown. - If the conversion is not possible,
resultsays why. - AI output can be wrong. Check results that matter.
Usage info
A GET request (with your API key) returns a short usage description and example questions. It does not call the model and counts against the standard limit, not the AI limit.
Endpoints
https://opentools.ca/api/v1/tools/unit-converterRequest Body
Content-Type: application/json
| Parameter | Type | Required | Description |
|---|---|---|---|
| question | string | Required | The question in plain English (1 to 2,000 characters). |
Response Example
{
"success": true,
"result": "5 kilometers is approximately **3.107 miles**.",
"details": "- From: kilometers (km)\n- To: miles (mi)\n- Conversion factor: 1 km = 0.621371 mi\n- Calculation: 5 x 0.621371 = 3.107 mi"
}Error Codes
https://opentools.ca/api/v1/tools/unit-converterResponse Example
{
"success": true,
"description": "Convert units expressed in natural language",
"usage": {
"method": "POST",
"body": {
"question": "string (required) - The unit conversion in plain English"
}
},
"examples": [
"Convert 5 kilometers to miles",
"What is 100 Celsius in Fahrenheit?",
"How many pounds in 75 kilograms?",
"Convert 2 hours to minutes",
"What is 5 feet and 6 inches in centimeters?",
"How many liters are in 3 gallons?"
]
}Error Codes
Code Examples
curl -X POST https://opentools.ca/api/v1/tools/unit-converter \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"question": "Convert 5 kilometers to miles"}'Rather use it in your browser? Open the Unit Converter