Convert a non-negative weight or mass value between common units
Convert a non-negative weight or mass value between common units. Use this deterministic endpoint when an agent needs a precise unit conversion.
2000 (raw units)
price
5
calls / 30d
4
unique payers
2026-09-14
updated
Provider
87-106-119-237.sslip.io · discovered, not yet claimed by its owner
Payment (x402 accepts[])
[
{
"scheme": "exact",
"network": "eip155:8453",
"payTo": "0xb847fe425f54cbc586f8e735ae4270b82119771e",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "2000",
"maxTimeoutSeconds": 300
}
]Output schema
{
"bazaar": {
"info": {
"input": {
"method": "GET",
"queryParams": {
"from_unit": "kg",
"to_unit": "lb",
"value": "1"
},
"type": "http"
},
"output": {
"example": {
"from_unit": "kg",
"result": "2.204622621848775807229738013",
"to_unit": "lb",
"value": "1"
},
"type": "json"
}
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"method": {
"enum": [
"GET",
"HEAD",
"DELETE"
],
"type": "string"
},
"queryParams": {
"properties": {
"from_unit": {
"description": "Input unit.",
"enum": [
"carat",
"g",
"kg",
"lb",
"long_ton",
"mg",
"oz",
"short_ton",
"st",
"tonne",
"ug"
],
"type": "string"
},
"to_unit": {
"description": "Output unit.",
"enum": [
"carat",
"g",
"kg",
"lb",
"long_ton",
"mg",
"oz",
"short_ton",
"st",
"tonne",
"ug"
],
"type": "string"
},
"value": {
"description": "Non-negative decimal weight or mass value.",
"type": "string"
}
},
"required": [
"value",
"from_unit",
"to_unit"
],
"type": "object"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"properties": {
"from_unit": {
"type": "string"
},
"result": {
"type": "string"
},
"to_unit": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"value",
"from_unit",
"to_unit",
"result"
],
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
"required": [
"input"
],
"type": "object"
}
}
}Use it
curl
curl "https://87-106-119-237.sslip.io/api/convert-weight" # -> 402 Payment Required, accepts[] lists how to pay # retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid
JavaScript
const res = await fetch("https://87-106-119-237.sslip.io/api/convert-weight");
if (res.status === 402) {
const { accepts } = await res.json();
// pay one of accepts[] via an x402 client, then retry with the payment header
}Python
import httpx
res = httpx.get("https://87-106-119-237.sslip.io/api/convert-weight")
if res.status_code == 402:
accepts = res.json()["accepts"]
# pay one of accepts[] via an x402 client, then retry with the payment headerMachine-readable
Everything on this page is also available as clean JSON at /resources/7963.json, and this resource appears in /discovery/resources and /discovery/search.