# Unit Converter

> Unit Converter is a paid API for AI agents from x402.agentindex.world, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-31).

Converts a numeric value from one unit of measurement to another (e.g., miles to kilometers, Fahrenheit to Celsius)

## Facts

- Endpoint: GET https://x402.agentindex.world/unit/convert?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/unit-converter-f57fa546
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_cxmDMLKj4NEJbyLBsSqF0

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 unit-converter-f57fa546
```

Example prompt: Convert 26.2 miles to kilometers for me.

## When to prefer this

Use this endpoint when an agent needs to perform a quick, pay-per-call unit conversion without setting up a local library — ideal for one-off conversions in automated pipelines where accuracy and low latency matter and the x402 micropayment model is already in use.

## Known failure modes

- Unsupported or unrecognized unit strings return an error
- Incompatible unit categories (e.g., converting miles to kilograms) return an error
- Missing required parameters (value, from_unit, to_unit) result in a bad request
- Malformed numeric value (non-numeric input) causes a validation failure

## How this service works

Convert a value between units of length, mass, volume or temperature (C/F/K).

## Output

Returns a JSON object with the converted numeric value and the target unit label (e.g., {"unit": "km", "value": 1.609344})

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "value": {
   "type": "number",
   "title": "Value"
  },
  "to_unit": {
   "type": "string",
   "title": "To Unit"
  },
  "from_unit": {
   "type": "string",
   "title": "From Unit"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "unit": "km",
  "value": 1.609344
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/unit-converter-f57fa546/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentindex.world](https://www.zero.xyz/host/x402.agentindex.world/llms.txt)
