Data source: Built-in conversion factors
https://context.gnist.ai/rest/unit-conversion/
AuthenticationAll requests require a Gnist-API-Key header (or api_key query parameter).
Free tier: 100 calls/day. Get your API key.
Tools (4)
convert_unitsConvert a value from one unit to another.
Supports 10 categories: length, mass, volume, area, speed, time,
temperature, digital storage, energy, and pressure.
Units must be in the same category (e.g. both length units).
Examples: kilometer→mile, pound→kilogram, fahrenheit→celsius,
gigabyte→mebibyte, kilowatt_hour→btu, psi→bar.
| Parameter | Type | Required | Description |
|---|---|---|---|
value | number | required | The numeric value to convert. |
from_unit | string | required | Source unit (e.g. 'kilometer', 'pound', 'fahrenheit'). |
to_unit | string | required | Target unit (e.g. 'mile', 'kilogram', 'celsius'). |
{
"value": 1.0,
"from_unit": "example",
"to_unit": "example"
}list_unit_categoriesList all supported unit categories and their units.
Returns every category (length, mass, volume, area, speed, time,
temperature, digital_storage, energy, pressure) with all available units.
{
"query": "example"
}list_units_in_categoryList all available units in a specific category.
| Parameter | Type | Required | Description |
|---|---|---|---|
category | string | required | Category name (e.g. 'length', 'mass', 'temperature'). |
{
"category": "example"
}report_feedbackReport a bug, feature request, or general feedback for this data source.
Use this when something doesn't work as expected, when you'd like
a new feature, or when you have suggestions for improvement.
Args:
feedback: Describe the issue or suggestion.
feedback_type: One of 'bug', 'feature_request', or 'general'.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: "general") |
{
"feedback": "example"
}Quick Start
curl -X POST "https://context.gnist.ai/rest/unit-conversion/convert_units" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"value": 1.0, "from_unit": "example", "to_unit": "example"}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/rest/unit-conversion/convert_units",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={
"value": 1.0,
"from_unit": "example",
"to_unit": "example"
},
)
print(resp.json())