# Compute API – Unit Converter

> Compute API – Unit Converter is a paid API for AI agents from compute-api-production-245d.up.railway.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-11).

Converts a numeric value between temperature, length, or mass units, returning the converted result and target unit label.

## Facts

- Endpoint: POST https://compute-api-production-245d.up.railway.app/convert?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/compute-api-unit-converter-31021747
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_40hyoXQW4mIlHwEJ9YgNi

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability compute-api-unit-converter-31021747 -d '<json body>'
```

Example prompt: Convert 98.6 from fahrenheit to celsius for me.

## When to prefer this

Choose this endpoint when you need a quick, programmatic, pay-per-use unit conversion for temperature (fahrenheit, celsius, kelvin), length (meters, kilometers, feet, miles), or mass (grams, kilograms, ounces, pounds) with no rate limits or API keys — just micro-payments via x402 on Base.

## Known failure modes

- Invalid or unsupported unit enum value returns an error — only the listed enums are accepted (e.g. 'celcius' misspelled will fail)
- Incompatible unit categories (e.g. converting meters to kilograms) will likely return an error or nonsensical result
- Missing required fields ('to', 'from', or 'value') will cause a 4xx validation error
- Payment failure or insufficient USDC balance will result in a 402 Payment Required response
- Extremely large or small numeric values may produce floating-point precision issues

## How this service works

Pure computation endpoints paid per call via x402 ($0.001 USDC on Base).

## Output

Returns a JSON object with 'result' (the converted numeric value as a float) and 'unit' (a string label for the target unit, e.g. 'celsius').

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "to",
  "from",
  "value"
 ],
 "properties": {
  "to": {
   "enum": [
    "fahrenheit",
    "celsius",
    "kelvin",
    "meters",
    "kilometers",
    "feet",
    "miles",
    "grams",
    "kilograms",
    "ounces",
    "pounds"
   ],
   "type": "string"
  },
  "from": {
   "enum": [
    "fahrenheit",
    "celsius",
    "kelvin",
    "meters",
    "kilometers",
    "feet",
    "miles",
    "grams",
    "kilograms",
    "ounces",
    "pounds"
   ],
   "type": "string"
  },
  "value": {
   "type": "number"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "unit": {
   "type": "string"
  },
  "result": {
   "type": "number"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/compute-api-unit-converter-31021747/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from compute-api-production-245d.up.railway.app](https://www.zero.xyz/host/compute-api-production-245d.up.railway.app/llms.txt)
