GnistAI GnistAI
Log in

Unit Conversion

Convert between units across 10 categories — length, mass, volume, area, speed, time, temperature, digital storage, energy, and pressure.

Overview   |   MCP   |   REST API   |   OpenAPI   |   CLI   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 4 tools tools 4 4 type: calculator type type calculator calculator lifecycle: maintained lifecycle lifecycle maintained maintained Utilities

Data source: Built-in conversion factors

REST Bridge Endpoint https://context.gnist.ai/rest/unit-conversion/
Authentication

All requests require a Gnist-API-Key header (or api_key query parameter).

Free tier: 100 calls/day. Get your API key.

Tools (4)

convert_units

Convert 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.

ParameterTypeRequiredDescription
valuenumberrequiredThe numeric value to convert.
from_unitstringrequiredSource unit (e.g. 'kilometer', 'pound', 'fahrenheit').
to_unitstringrequiredTarget unit (e.g. 'mile', 'kilogram', 'celsius').
Request Body
{
  "value": 1.0,
  "from_unit": "example",
  "to_unit": "example"
}
list_unit_categories

List 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.

Request Body
{
  "query": "example"
}
list_units_in_category

List all available units in a specific category.

ParameterTypeRequiredDescription
categorystringrequiredCategory name (e.g. 'length', 'mass', 'temperature').
Request Body
{
  "category": "example"
}
report_feedback

Report 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'.

ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")
Request Body
{
  "feedback": "example"
}

Quick Start

Shell
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"}'
Python
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())

Related Toolkits (Utilities)

Resources