# fastapi.online Unit Converter

> fastapi.online Unit Converter is a paid API for AI agents from api.fastapi.online, paid per call via x402, $0.0005/call, status unknown (last checked 2026-09-14).

Converts a numeric value from one unit of measurement to another unit via a simple POST call, priced per call with crypto.

## Facts

- Endpoint: POST https://api.fastapi.online/unit-convert
- Price: $0.0005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastapi-online-unit-converter-4b935f47
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_v9xsTu_veJWSQ8RUQYjGI

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 fastapi-online-unit-converter-4b935f47 -d '<json body>'
```

Example prompt: Convert 250 pounds to kilograms for me — use the fastapi.online unit converter.

## When to prefer this

Choose this endpoint when you need a quick, programmatic unit conversion without requiring a full math library or external conversion service integration. It is ideal for AI agents that need to convert single values on-the-fly within a pay-per-call crypto-payment workflow (x402 protocol), and when no signup or API key setup is desired.

## Known failure modes

- Unsupported or unrecognized unit strings in 'from' or 'to' fields may return an error or null result
- Invalid or missing 'value' field (non-numeric) causes a 400 validation error
- Units from incompatible dimensions (e.g. converting kg to meters) may return an error
- Payment failure or insufficient USDC balance returns a 402 Payment Required response

## How this service works

Chat, embeddings, OCR, speech-to-text, image editing, image understanding (captioning/Q&amp;A), text-to-speech, translation, writing tools, classification tools, developer tools, local utilities, format/checksum validators, encoding &amp; crypto utilities, date/time calculators, geo/coordinate math, math &amp; finance calculators, novelty tools, and business/social writing generators — 179 endpoints in all, across multiple specialized self-hosted models. Pay per call with crypto — no signup — or get an API key.

## Output

Returns the numeric result of converting the given value from the source unit to the target unit. The response includes the converted value in the requested target unit.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "to": {
   "type": "string",
   "maxLength": 10,
   "minLength": 1
  },
  "from": {
   "type": "string",
   "maxLength": 10,
   "minLength": 1
  },
  "value": {
   "type": "number"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastapi-online-unit-converter-4b935f47/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.fastapi.online](https://www.zero.xyz/host/api.fastapi.online/llms.txt)
