# Qty — Deterministic Quantity Parser and Unit Converter

> Qty — Deterministic Quantity Parser and Unit Converter is a paid API for AI agents from qty.vercel.app, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-12).

Parses messy natural-language quantity expressions (measurements, prices, recipes, sizes, dates) and converts them to structured, deterministic numeric values with units and SI equivalents.

## Facts

- Endpoint: GET https://qty.vercel.app/v1/parse?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/qty-deterministic-quantity-parser-and-unit-converter-a95e9fd8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UGPqIFWJrxDBciuf2bZgI

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 qty-deterministic-quantity-parser-and-unit-converter-a95e9fd8
```

Example prompt: Can you parse '5 ft 11 in' and give me the equivalent in centimeters, along with the exact formula used and a confidence score?

## When to prefer this

Choose this endpoint when you need deterministic, traceable quantity parsing with explicit formulas and confidence scores — especially for cooking, pricing, physical measurements, or any context where inventing or hallucinating a number would be harmful. Prefer it over LLM-based conversion when auditability and reproducibility matter, or when inputs are messy natural-language strings that need to be normalized to SI units reliably.

## Known failure modes

- Ambiguous unit string with no resolvable interpretation returns low confidence or error
- Missing required 'input' parameter causes a 400-level error
- Unsupported or invented unit names may return warnings or null results
- Highly contextual quantities without enough information may produce low-confidence results with caveats

## How this service works

Qty converts known units for free and interprets messy quantities, prices, recipes, sizes, and dates in code. It never invents a number.

## Output

Returns a JSON object with an array of parsed quantities, each containing the numeric value, label, unit, SI unit, SI value, the formula used to derive the result, confidence score (0–1), any warnings, and the assumptions made during parsing. Also includes links to docs, MCP, OpenAPI spec, and related resources.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "path": {
       "type": "string"
      },
      "price": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "path": {
       "type": "string"
      },
      "price": {
       "type": "string"
      },
      "method": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "see": {
   "mcp": "/mcp",
   "docs": "/docs",
   "llms": "/llms.txt",
   "x402": "/.well-known/x402.json",
   "openapi": "/openapi.json",
   "llmsFull": "/llms-full.txt",
   "agentCard": "/.well-known/agent-card.json"
  },
  "quantities": [
   {
    "unit": "cm",
    "label": "height",
    "value": 180.34,
    "reason": null,
    "siUnit": "m",
    "formula": "5 ft × 0.3048 m + 11 in × 0.0254 m = 1.8034 m; 1.8034 m = 180.34 cm",
    "siValue": 1.8034,
    "warnings": [],
    "confidence": 0.98,
    "assumptions": [
     "Feet and inches use the international foot (0.3048 m) and the international inch (0.0254 m)."
    ],
    "definitionId": "length.foot.international"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/qty-deterministic-quantity-parser-and-unit-converter-a95e9fd8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from qty.vercel.app](https://www.zero.xyz/host/qty.vercel.app/llms.txt)
