# Qty Batch Unit Conversion & Quantity Parsing

> Qty Batch Unit Conversion & Quantity Parsing is a paid API for AI agents from qty.vercel.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-12).

Batch-converts units and parses messy quantities, prices, recipe amounts, sizes, and dates deterministically without inventing numbers

## Facts

- Endpoint: GET https://qty.vercel.app/v1/batch?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/qty-batch-unit-conversion-quantity-parsing-0a43d5e0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_LwvDMaU2MmdzR1u7WoMom

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-batch-unit-conversion-quantity-parsing-0a43d5e0
```

Example prompt: I have a bunch of mixed quantity strings like '2.5 kg', '$4.99/lb', '3 cups flour', and '500ml' — can you parse and normalize all of them into canonical numeric values and units in one batch call?

## When to prefer this

Choose this endpoint when you need deterministic, non-hallucinated unit conversion or quantity parsing across multiple values in a single call. Ideal for agents processing recipe ingredients, product dimensions, price strings, or any heterogeneous quantity data where accuracy and reliability matter more than generative interpretation. Prefer over LLM-based quantity extraction when you cannot afford invented numbers.

## Known failure modes

- Input string is too ambiguous or malformed — returns ok:false with error code 'unparsed'
- Missing required 'input' field returns a validation error
- Unknown or unsupported unit type may result in unparsed error
- Batch items with mixed parseable and unparseable entries return mixed ok/error per index

## 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 array of results, one per input item. Each result includes an ok flag, the item index, and either a quantities array with parsed numeric values and canonical units, or an error object with a code (e.g. 'unparsed') if the input could not be interpreted. Also includes a see map with links to docs, MCP, OpenAPI, and agent card.

## 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"
  },
  "results": [
   {
    "ok": true,
    "index": 0,
    "quantities": []
   },
   {
    "ok": false,
    "error": {
     "code": "unparsed"
    },
    "index": 1
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/qty-batch-unit-conversion-quantity-parsing-0a43d5e0/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)
