{"openapi":"3.1.0","info":{"title":"Qty","version":"1.0.0","summary":"Deterministic quantities for agents. Free convert. Paid interpretation.","description":"Qty parses and converts quantities in code. It does not call a model. It does not invent numbers. Temperature is affine. US and imperial gallons differ. The international foot is the default foot. Pace is not speed unless a speed unit is requested. Every JSON response has a top-level see object pointing at docs.","x-guidance":"Use GET /units and POST /v1/convert when you already have a number and two unit codes. Paid POST routes interpret messy text. GET on a paid path returns HTTP 402 with the price and does not run the handler. Ready-made tools: /tools/openai.json, /tools/anthropic.json, and /tools/ai-sdk.ts, generated from the same schemas as MCP. Paying client: packages/client (@qty/client). Time zones, ISO durations, and N days from a date are POST /v1/date ($0.002). Building estimates are POST /v1/estimate ($0.003). Prepaid credits are a design only at /docs/prepaid-credits. Qty does not store balances."},"servers":[{"url":"https://qty.vercel.app"}],"paths":{"/health":{"get":{"operationId":"health","summary":"Liveness.","description":"Returns ok. No payment, no Redis, no network.","tags":["free"],"security":[],"responses":{"200":{"description":"Deterministic JSON. Includes see.","content":{"application/json":{"example":{"see":{"llms":"/llms.txt","llmsFull":"/llms-full.txt","openapi":"/openapi.json","docs":"/docs","x402":"/.well-known/x402.json","agentCard":"/.well-known/agent-card.json","mcp":"/mcp","tools":"/tools/openai.json","anthropicTools":"/tools/anthropic.json","aiSdk":"/tools/ai-sdk.ts","credits":"/docs/prepaid-credits"},"ok":true,"service":"qty","version":"1.0.0"}}}},"400":{"description":"Stable error code. use_parse means call POST /v1/parse ($0.002)."}}}},"/units":{"get":{"operationId":"listUnits","summary":"Every unit code, alias, dimension, and definition id.","description":"Call this before convert when you are unsure of a code. Free.","tags":["free"],"security":[],"responses":{"200":{"description":"Deterministic JSON. Includes see.","content":{"application/json":{"example":{"see":{"llms":"/llms.txt","llmsFull":"/llms-full.txt","openapi":"/openapi.json","docs":"/docs","x402":"/.well-known/x402.json","agentCard":"/.well-known/agent-card.json","mcp":"/mcp","tools":"/tools/openai.json","anthropicTools":"/tools/anthropic.json","aiSdk":"/tools/ai-sdk.ts","credits":"/docs/prepaid-credits"},"units":[{"code":"mi","aliases":["mile","statute mile"],"dimension":"length","definitionId":"length.mile.statute"}]}}}},"400":{"description":"Stable error code. use_parse means call POST /v1/parse ($0.002)."}}}},"/v1/convert":{"post":{"operationId":"convert","summary":"Free conversion of a finite number between two known codes.","description":"Use when you already have a number and two codes from GET /units, such as 10 mi to km or 32 F to C. Temperature is affine. If the text is messy (5'11\", a stick of butter, a price, a size, a date), this returns 400 use_parse and you must call POST /v1/parse. Deterministic. assumptions is always an array. Limited to 60 requests per 60 seconds per client. Over the limit returns 429 rate_limited with Retry-After. The hint points at paid POST /v1/batch ($0.01). The client is ipAddress() from @vercel/functions (x-real-ip), otherwise the first public address in x-vercel-forwarded-for, then x-forwarded-for. Ports and non-addresses are ignored. The address is not stored. Responses include x-ratelimit-source (redis, memory, or none), x-ratelimit-key-prefix (first 8 hex chars of the client hash), and x-ratelimit-window (the fixed window id). The counter is shared through the same Redis as the feed (KV_REST_API_* or UPSTASH_REDIS_REST_*). A Redis error does not fail the route.","tags":["free"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"},"example":{"value":10,"from":"mi","to":"km"}}}},"responses":{"200":{"description":"Deterministic JSON. Includes see.","content":{"application/json":{"example":{"see":{"llms":"/llms.txt","llmsFull":"/llms-full.txt","openapi":"/openapi.json","docs":"/docs","x402":"/.well-known/x402.json","agentCard":"/.well-known/agent-card.json","mcp":"/mcp","tools":"/tools/openai.json","anthropicTools":"/tools/anthropic.json","aiSdk":"/tools/ai-sdk.ts","credits":"/docs/prepaid-credits"},"result":16.09344,"from":"mi","to":"km","formula":"10 mi × 1.609344 km/mi = 16.09344 km","definitionId":"length.mile.statute","assumptions":[]}}}},"400":{"description":"Stable error code. use_parse means call POST /v1/parse ($0.002)."},"429":{"description":"rate_limited. POST /v1/convert allows 60 requests per 60 seconds. Retry-After is set. The hint points at paid POST /v1/batch."}}}},"/v1/feed":{"get":{"operationId":"feed","summary":"Recent sanitised conversions and counters.","description":"Free. Cached for about 2 seconds. Events contain route, kind, from value and unit, to value and unit, or a short category, plus a timestamp. Raw text, receipts, wallets, IPs, and headers are never stored. Empty when Redis is not configured.","tags":["free"],"security":[],"responses":{"200":{"description":"Deterministic JSON. Includes see.","content":{"application/json":{"example":{"see":{"llms":"/llms.txt","llmsFull":"/llms-full.txt","openapi":"/openapi.json","docs":"/docs","x402":"/.well-known/x402.json","agentCard":"/.well-known/agent-card.json","mcp":"/mcp","tools":"/tools/openai.json","anthropicTools":"/tools/anthropic.json","aiSdk":"/tools/ai-sdk.ts","credits":"/docs/prepaid-credits"},"events":[],"totals":{"all":0,"routes":{}},"configured":false}}}},"400":{"description":"Stable error code. use_parse means call POST /v1/parse ($0.002)."}}}},"/v1/parse":{"get":{"operationId":"parseQuote","summary":"402 price quote for /v1/parse.","description":"GET returns HTTP 402 with the x402 price quote for POST /v1/parse ($0.002). The handler does not run.","tags":["paid"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002"},"protocols":[{"x402":{"scheme":"exact","networks":["eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"]}}]},"responses":{"402":{"description":"Payment required ($0.002). Body and PAYMENT-REQUIRED header quote the price."}}},"post":{"operationId":"parse","summary":"Interpret messy quantity text into a list of quantities. Call this when convert returns use_parse. Deterministic. Never ","description":"Interpret messy quantity text into a list of quantities. Call this when convert returns use_parse. Deterministic. Never invents a number: unknown amounts are null with a reason. Same text always returns the same quantities. Does not call a model or any other service. Price $0.002 exact USDC on eip155:8453 (0x41F7c3FfC3Cda926797Eb388bB65Ccd8A1deC352) and solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp (GhBZyUbBH2qdTbUXtNjFnbiqeh9c7rsReVU6kjJVCbp6). Unpaid POST and GET calls return 402 and do not include the result. Settlement happens only after a 2xx.","tags":["paid"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002"},"protocols":[{"x402":{"scheme":"exact","networks":["eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"]}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"Messy quantity text. Do not send a bare number plus two codes; that is free convert."},"to":{"type":"string","description":"Optional target unit code from GET /units."},"system":{"type":"string","enum":["us","imperial","si"]},"holidays":{"type":"array","items":{"type":"string"}},"referenceDate":{"type":"string","description":"YYYY-MM-DD. Required for date maths that do not name a date. Never assumed to be today."}},"required":["text"]},"example":{"text":"5'11\"","to":"cm"}}}},"responses":{"200":{"description":"Paid result. Same input, same output. Unknown amounts are null with reason.","content":{"application/json":{"schema":{"type":"object","properties":{"see":{"type":"object"},"quantities":{"type":"array","items":{"type":"object","properties":{"value":{"type":["number","null"]},"unit":{"type":["string","null"]},"siValue":{"type":["number","null"]},"siUnit":{"type":["string","null"]},"textValue":{"type":["string","null"]},"formula":{"type":["string","null"]},"definitionId":{"type":["string","null"]},"confidence":{"type":"number"},"warnings":{"type":"array","items":{"type":"string"}},"assumptions":{"type":"array","items":{"type":"string"}},"reason":{"type":["string","null"]},"label":{"type":["string","null"]}},"required":["value","unit","formula","definitionId","confidence","warnings"]}}},"required":["see"]},"example":{"see":{"llms":"/llms.txt","llmsFull":"/llms-full.txt","openapi":"/openapi.json","docs":"/docs","x402":"/.well-known/x402.json","agentCard":"/.well-known/agent-card.json","mcp":"/mcp","tools":"/tools/openai.json","anthropicTools":"/tools/anthropic.json","aiSdk":"/tools/ai-sdk.ts","credits":"/docs/prepaid-credits"},"quantities":[{"value":180.34,"unit":"cm","siValue":1.8034,"siUnit":"m","formula":"5 ft × 0.3048 m + 11 in × 0.0254 m = 1.8034 m; 1.8034 m = 180.34 cm","definitionId":"length.foot.international","confidence":0.98,"warnings":[],"assumptions":["Feet and inches use the international foot (0.3048 m) and the international inch (0.0254 m)."],"reason":null,"label":"height"}]}}}},"400":{"description":"Invalid request. Stable error.code and hint."},"402":{"description":"Payment required ($0.002). Body includes price, payTo, network, and path."},"500":{"description":"payee_not_configured when X402_PAY_TO is missing."}}}},"/v1/batch":{"get":{"operationId":"batchQuote","summary":"402 price quote for /v1/batch.","description":"GET returns HTTP 402 with the x402 price quote for POST /v1/batch ($0.01). The handler does not run.","tags":["paid"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{"scheme":"exact","networks":["eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"]}}]},"responses":{"402":{"description":"Payment required ($0.01). Body and PAYMENT-REQUIRED header quote the price."}}},"post":{"operationId":"batch","summary":"Parse up to 100 messy texts for a flat price. One bad row does not fail the batch. Each row is ok with quantities or ok:","description":"Parse up to 100 messy texts for a flat price. One bad row does not fail the batch. Each row is ok with quantities or ok:false with a stable error code. Deterministic. No per-row upto pricing in v1. Price $0.01 exact USDC on eip155:8453 (0x41F7c3FfC3Cda926797Eb388bB65Ccd8A1deC352) and solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp (GhBZyUbBH2qdTbUXtNjFnbiqeh9c7rsReVU6kjJVCbp6). Unpaid POST and GET calls return 402 and do not include the result. Settlement happens only after a 2xx.","tags":["paid"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{"scheme":"exact","networks":["eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"]}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"text":{"type":"string"},"to":{"type":"string"},"system":{"type":"string"}},"required":["text"]}}},"required":["items"]},"example":{"items":[{"text":"10 mi","to":"km"},{"text":"not a quantity"}]}}}},"responses":{"200":{"description":"Paid result. Same input, same output. Unknown amounts are null with reason.","content":{"application/json":{"schema":{"type":"object","properties":{"see":{"type":"object"},"results":{"type":"array"}},"required":["see","results"]},"example":{"see":{"llms":"/llms.txt","llmsFull":"/llms-full.txt","openapi":"/openapi.json","docs":"/docs","x402":"/.well-known/x402.json","agentCard":"/.well-known/agent-card.json","mcp":"/mcp","tools":"/tools/openai.json","anthropicTools":"/tools/anthropic.json","aiSdk":"/tools/ai-sdk.ts","credits":"/docs/prepaid-credits"},"results":[{"index":0,"ok":true,"quantities":[]},{"index":1,"ok":false,"error":{"code":"unparsed"}}]}}}},"400":{"description":"Invalid request. Stable error.code and hint."},"402":{"description":"Payment required ($0.01). Body includes price, payTo, network, and path."},"500":{"description":"payee_not_configured when X402_PAY_TO is missing."}}}},"/v1/receipt":{"get":{"operationId":"receiptQuote","summary":"402 price quote for /v1/receipt.","description":"GET returns HTTP 402 with the x402 price quote for POST /v1/receipt ($0.001). The handler does not run.","tags":["paid"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{"scheme":"exact","networks":["eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"]}}]},"responses":{"402":{"description":"Payment required ($0.001). Body and PAYMENT-REQUIRED header quote the price."}}},"post":{"operationId":"receipt","summary":"Canonical audit JSON plus sha256 of a previous Qty result. Includes input, definition ids, formulas, and a timestamp. Th","description":"Canonical audit JSON plus sha256 of a previous Qty result. Includes input, definition ids, formulas, and a timestamp. The hash ignores the timestamp so the same payload always hashes the same. No chain write. Price $0.001 exact USDC on eip155:8453 (0x41F7c3FfC3Cda926797Eb388bB65Ccd8A1deC352) and solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp (GhBZyUbBH2qdTbUXtNjFnbiqeh9c7rsReVU6kjJVCbp6). Unpaid POST and GET calls return 402 and do not include the result. Settlement happens only after a 2xx.","tags":["paid"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{"scheme":"exact","networks":["eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"]}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"A previous parse or convert result."},"example":{"quantities":[{"value":180.34,"unit":"cm","formula":"5 ft + 11 in","definitionId":"length.foot.international"}]}}}},"responses":{"200":{"description":"Paid result. Same input, same output. Unknown amounts are null with reason.","content":{"application/json":{"schema":{"type":"object","properties":{"see":{"type":"object"},"document":{"type":"object"},"sha256":{"type":"string"}},"required":["see","document","sha256"]},"example":{"see":{"llms":"/llms.txt","llmsFull":"/llms-full.txt","openapi":"/openapi.json","docs":"/docs","x402":"/.well-known/x402.json","agentCard":"/.well-known/agent-card.json","mcp":"/mcp","tools":"/tools/openai.json","anthropicTools":"/tools/anthropic.json","aiSdk":"/tools/ai-sdk.ts","credits":"/docs/prepaid-credits"},"document":{"kind":"qty.receipt.v1","definitions":[],"formulas":[],"timestamp":"2026-10-05T00:00:00.000Z"},"sha256":"0000000000000000000000000000000000000000000000000000000000000000"}}}},"400":{"description":"Invalid request. Stable error.code and hint."},"402":{"description":"Payment required ($0.001). Body includes price, payTo, network, and path."},"500":{"description":"payee_not_configured when X402_PAY_TO is missing."}}}},"/v1/compare-prices":{"get":{"operationId":"compare-pricesQuote","summary":"402 price quote for /v1/compare-prices.","description":"GET returns HTTP 402 with the x402 price quote for POST /v1/compare-prices ($0.002). The handler does not run.","tags":["paid"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002"},"protocols":[{"x402":{"scheme":"exact","networks":["eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"]}}]},"responses":{"402":{"description":"Payment required ($0.002). Body and PAYMENT-REQUIRED header quote the price."}}},"post":{"operationId":"compare-prices","summary":"Normalise unit prices and say which offer is cheaper. Currency is a label only; Qty never converts between currencies. M","description":"Normalise unit prices and say which offer is cheaper. Currency is a label only; Qty never converts between currencies. Multipacks are totalled first. Returns price per base unit (litre, kilogram, or each). Price $0.002 exact USDC on eip155:8453 (0x41F7c3FfC3Cda926797Eb388bB65Ccd8A1deC352) and solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp (GhBZyUbBH2qdTbUXtNjFnbiqeh9c7rsReVU6kjJVCbp6). Unpaid POST and GET calls return 402 and do not include the result. Settlement happens only after a 2xx.","tags":["paid"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002"},"protocols":[{"x402":{"scheme":"exact","networks":["eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"]}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"offers":{"type":"array","items":{"type":"string"}},"text":{"type":"string","description":"Alternative to offers. Split on vs."}}},"example":{"offers":["£2.50 for 750ml","£3 for 1L"]}}}},"responses":{"200":{"description":"Paid result. Same input, same output. Unknown amounts are null with reason.","content":{"application/json":{"schema":{"type":"object","properties":{"see":{"type":"object"},"comparison":{"type":"object"},"quantities":{"type":"array"}}},"example":{"see":{"llms":"/llms.txt","llmsFull":"/llms-full.txt","openapi":"/openapi.json","docs":"/docs","x402":"/.well-known/x402.json","agentCard":"/.well-known/agent-card.json","mcp":"/mcp","tools":"/tools/openai.json","anthropicTools":"/tools/anthropic.json","aiSdk":"/tools/ai-sdk.ts","credits":"/docs/prepaid-credits"},"comparison":{"cheaperIndex":1,"currency":"GBP","baseUnit":"L"}}}}},"400":{"description":"Invalid request. Stable error.code and hint."},"402":{"description":"Payment required ($0.002). Body includes price, payTo, network, and path."},"500":{"description":"payee_not_configured when X402_PAY_TO is missing."}}}},"/v1/scale-recipe":{"get":{"operationId":"scale-recipeQuote","summary":"402 price quote for /v1/scale-recipe.","description":"GET returns HTTP 402 with the x402 price quote for POST /v1/scale-recipe ($0.002). The handler does not run.","tags":["paid"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002"},"protocols":[{"x402":{"scheme":"exact","networks":["eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"]}}]},"responses":{"402":{"description":"Payment required ($0.002). Body and PAYMENT-REQUIRED header quote the price."}}},"post":{"operationId":"scale-recipe","summary":"Scale ingredient amounts by servings or a factor. Cup, tbsp, tsp, and stick convert between us, imperial, and si using t","description":"Scale ingredient amounts by servings or a factor. Cup, tbsp, tsp, and stick convert between us, imperial, and si using the labelled assumption table. Mass and volume convert only for flour, sugar, butter, water, milk, and rice. Anything else is null with a reason. Price $0.002 exact USDC on eip155:8453 (0x41F7c3FfC3Cda926797Eb388bB65Ccd8A1deC352) and solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp (GhBZyUbBH2qdTbUXtNjFnbiqeh9c7rsReVU6kjJVCbp6). Unpaid POST and GET calls return 402 and do not include the result. Settlement happens only after a 2xx.","tags":["paid"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002"},"protocols":[{"x402":{"scheme":"exact","networks":["eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"]}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fromServings":{"type":"number"},"toServings":{"type":"number"},"factor":{"type":"number"},"ingredients":{"type":"array","items":{"type":"string"}},"system":{"type":"string","enum":["us","imperial","si"]},"to":{"type":"string"},"text":{"type":"string"}}},"example":{"fromServings":4,"toServings":6,"ingredients":["2 cups flour","1 stick of butter"]}}}},"responses":{"200":{"description":"Paid result. Same input, same output. Unknown amounts are null with reason.","content":{"application/json":{"schema":{"type":"object","properties":{"see":{"type":"object"},"recipe":{"type":"object"},"quantities":{"type":"array"}}},"example":{"see":{"llms":"/llms.txt","llmsFull":"/llms-full.txt","openapi":"/openapi.json","docs":"/docs","x402":"/.well-known/x402.json","agentCard":"/.well-known/agent-card.json","mcp":"/mcp","tools":"/tools/openai.json","anthropicTools":"/tools/anthropic.json","aiSdk":"/tools/ai-sdk.ts","credits":"/docs/prepaid-credits"},"recipe":{"factor":1.5,"definitionId":"recipe.scale.servings.v1"}}}}},"400":{"description":"Invalid request. Stable error.code and hint."},"402":{"description":"Payment required ($0.002). Body includes price, payTo, network, and path."},"500":{"description":"payee_not_configured when X402_PAY_TO is missing."}}}},"/v1/size":{"get":{"operationId":"sizeQuote","summary":"402 price quote for /v1/size.","description":"GET returns HTTP 402 with the x402 price quote for POST /v1/size ($0.002). The handler does not run.","tags":["paid"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002"},"protocols":[{"x402":{"scheme":"exact","networks":["eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"]}}]},"responses":{"402":{"description":"Payment required ($0.002). Body and PAYMENT-REQUIRED header quote the price."}}},"post":{"operationId":"size","summary":"Convert shoe and clothing sizes using Qty size table v1. Men's UK 9 shoe is EU 43 and US 10. Ambiguous gender or categor","description":"Convert shoe and clothing sizes using Qty size table v1. Men's UK 9 shoe is EU 43 and US 10. Ambiguous gender or category returns null and a reason. Brand variance is always a warning. No interpolation. Price $0.002 exact USDC on eip155:8453 (0x41F7c3FfC3Cda926797Eb388bB65Ccd8A1deC352) and solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp (GhBZyUbBH2qdTbUXtNjFnbiqeh9c7rsReVU6kjJVCbp6). Unpaid POST and GET calls return 402 and do not include the result. Settlement happens only after a 2xx.","tags":["paid"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002"},"protocols":[{"x402":{"scheme":"exact","networks":["eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"]}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"category":{"type":"string","enum":["shoe","dress","chest","waist","bra"]},"audience":{"type":"string","enum":["men","women","kids"]},"from":{"type":"string"},"to":{"type":"string"},"size":{"type":["number","string"]},"cup":{"type":"string"}}},"example":{"text":"UK 9 men's shoe","to":"EU"}}}},"responses":{"200":{"description":"Paid result. Same input, same output. Unknown amounts are null with reason.","content":{"application/json":{"schema":{"type":"object","properties":{"see":{"type":"object"},"quantities":{"type":"array"}},"required":["see"]},"example":{"see":{"llms":"/llms.txt","llmsFull":"/llms-full.txt","openapi":"/openapi.json","docs":"/docs","x402":"/.well-known/x402.json","agentCard":"/.well-known/agent-card.json","mcp":"/mcp","tools":"/tools/openai.json","anthropicTools":"/tools/anthropic.json","aiSdk":"/tools/ai-sdk.ts","credits":"/docs/prepaid-credits"},"quantities":[{"value":43,"unit":"EU","definitionId":"size.shoe.men.v1"}]}}}},"400":{"description":"Invalid request. Stable error.code and hint."},"402":{"description":"Payment required ($0.002). Body includes price, payTo, network, and path."},"500":{"description":"payee_not_configured when X402_PAY_TO is missing."}}}},"/v1/date":{"get":{"operationId":"dateQuote","summary":"402 price quote for /v1/date.","description":"GET returns HTTP 402 with the x402 price quote for POST /v1/date ($0.002). The handler does not run.","tags":["paid"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002"},"protocols":[{"x402":{"scheme":"exact","networks":["eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"]}}]},"responses":{"402":{"description":"Payment required ($0.002). Body and PAYMENT-REQUIRED header quote the price."}}},"post":{"operationId":"date","summary":"Parse ISO-8601 durations, add N days from an explicit date, and convert IANA time zones. Working days skip Saturday and ","description":"Parse ISO-8601 durations, add N days from an explicit date, and convert IANA time zones. Working days skip Saturday and Sunday plus an optional caller holiday list. Daylight-saving gaps and overlaps are reported. There is no built-in holiday calendar. If the text needs a date and none was given, the value is null with a reason. Qty never uses the current clock. Price $0.002 exact USDC on eip155:8453 (0x41F7c3FfC3Cda926797Eb388bB65Ccd8A1deC352) and solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp (GhBZyUbBH2qdTbUXtNjFnbiqeh9c7rsReVU6kjJVCbp6). Unpaid POST and GET calls return 402 and do not include the result. Settlement happens only after a 2xx.","tags":["paid"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002"},"protocols":[{"x402":{"scheme":"exact","networks":["eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"]}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"holidays":{"type":"array","items":{"type":"string","description":"YYYY-MM-DD"}},"referenceDate":{"type":"string"},"timeZone":{"type":"string","description":"IANA zone of the wall time."},"toTimeZone":{"type":"string","description":"IANA zone to convert into."}},"required":["text"]},"example":{"text":"2026-01-15T12:00 America/New_York to Europe/London"}}}},"responses":{"200":{"description":"Paid result. Same input, same output. Unknown amounts are null with reason.","content":{"application/json":{"schema":{"type":"object","properties":{"see":{"type":"object"},"quantities":{"type":"array"}},"required":["see"]},"example":{"see":{"llms":"/llms.txt","llmsFull":"/llms-full.txt","openapi":"/openapi.json","docs":"/docs","x402":"/.well-known/x402.json","agentCard":"/.well-known/agent-card.json","mcp":"/mcp","tools":"/tools/openai.json","anthropicTools":"/tools/anthropic.json","aiSdk":"/tools/ai-sdk.ts","credits":"/docs/prepaid-credits"},"quantities":[{"textValue":"2026-01-15T17:00:00+00:00","unit":"Europe/London","definitionId":"date.timezone.v1"}]}}}},"400":{"description":"Invalid request. Stable error.code and hint."},"402":{"description":"Payment required ($0.002). Body includes price, payTo, network, and path."},"500":{"description":"payee_not_configured when X402_PAY_TO is missing."}}}},"/v1/estimate":{"get":{"operationId":"estimateQuote","summary":"402 price quote for /v1/estimate.","description":"GET returns HTTP 402 with the x402 price quote for POST /v1/estimate ($0.003). The handler does not run.","tags":["paid"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.003"},"protocols":[{"x402":{"scheme":"exact","networks":["eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"]}}]},"responses":{"402":{"description":"Payment required ($0.003). Body and PAYMENT-REQUIRED header quote the price."}}},"post":{"operationId":"estimate","summary":"Estimate paint, tiles, concrete, or gravel. Paint uses 10 m² per litre per coat and defaults to 2 coats. Tiles default t","description":"Estimate paint, tiles, concrete, or gravel. Paint uses 10 m² per litre per coat and defaults to 2 coats. Tiles default to 0.30 m × 0.30 m. A 25 kg concrete bag yields 0.012 m³. Gravel uses 1600 kg/m³. Waste defaults to 10 percent and is stated on the result. Assumptions are labels, not a quote from a supplier. Price $0.003 exact USDC on eip155:8453 (0x41F7c3FfC3Cda926797Eb388bB65Ccd8A1deC352) and solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp (GhBZyUbBH2qdTbUXtNjFnbiqeh9c7rsReVU6kjJVCbp6). Unpaid POST and GET calls return 402 and do not include the result. Settlement happens only after a 2xx.","tags":["paid"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.003"},"protocols":[{"x402":{"scheme":"exact","networks":["eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"]}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["paint","tiles","concrete","gravel"]},"length":{"type":"number"},"width":{"type":"number"},"depth":{"type":"number"},"area":{"type":"number"},"unit":{"type":"string"},"coats":{"type":"number"},"wastePercent":{"type":"number"},"tileLength":{"type":"number"},"tileWidth":{"type":"number"}},"required":["kind"]},"example":{"kind":"paint","area":40,"unit":"m2","coats":2,"wastePercent":10}}}},"responses":{"200":{"description":"Paid result. Same input, same output. Unknown amounts are null with reason.","content":{"application/json":{"schema":{"type":"object","properties":{"see":{"type":"object"},"quantities":{"type":"array"}},"required":["see"]},"example":{"see":{"llms":"/llms.txt","llmsFull":"/llms-full.txt","openapi":"/openapi.json","docs":"/docs","x402":"/.well-known/x402.json","agentCard":"/.well-known/agent-card.json","mcp":"/mcp","tools":"/tools/openai.json","anthropicTools":"/tools/anthropic.json","aiSdk":"/tools/ai-sdk.ts","credits":"/docs/prepaid-credits"},"quantities":[{"value":8.8,"unit":"L","definitionId":"building.paint.v1","assumptions":["Paint coverage is 10 m² per litre per coat (Qty building assumption table v1)."]}]}}}},"400":{"description":"Invalid request. Stable error.code and hint."},"402":{"description":"Payment required ($0.003). Body includes price, payTo, network, and path."},"500":{"description":"payee_not_configured when X402_PAY_TO is missing."}}}},"/tools/openai.json":{"get":{"operationId":"openaiTools","summary":"OpenAI tool definitions generated from the MCP schemas.","description":"Function tools for convert, units, and every paid route. Free.","tags":["free"],"security":[],"responses":{"200":{"description":"JSON tools array."}}}},"/tools/anthropic.json":{"get":{"operationId":"anthropicTools","summary":"Anthropic tool definitions generated from the MCP schemas.","description":"input_schema objects matching the MCP tool inputs. Free.","tags":["free"],"security":[],"responses":{"200":{"description":"JSON tools array."}}}},"/tools/ai-sdk.ts":{"get":{"operationId":"aiSdkExample","summary":"Vercel AI SDK example generated from the MCP schemas.","description":"Copy-paste tool() calls using jsonSchema. Free.","tags":["free"],"security":[],"responses":{"200":{"description":"TypeScript source."}}}},"/mcp":{"post":{"operationId":"mcp","summary":"Model Context Protocol Streamable HTTP endpoint.","description":"Tools: convert and units are free. parse, batch, receipt, compare-prices, scale-recipe, size, date, and estimate are paid with the same x402 prices as the HTTP routes. Schemas match /tools/openai.json and /tools/anthropic.json. A paid tool call without payment returns payment_required and does not include the result.","tags":["mcp"],"security":[],"responses":{"200":{"description":"JSON-RPC or SSE response."}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"see":{"type":"object"},"error":{"type":"object","properties":{"code":{"type":"string","enum":["use_parse","invalid_value","unknown_unit","ambiguous_unit","dimension_mismatch","invalid_request","unparsed","payee_not_configured","batch_too_large","payment_required","ambiguous","unknown_amount","unsupported_network","rate_limited","out_of_range","unsupported"]},"message":{"type":"string"},"hint":{"type":"string"},"path":{"type":"string"},"price":{"type":"string"}},"required":["code","message","hint"]}}}}}}