{"openapi":"3.1.0","info":{"title":"Toolrail","version":"1.0.0","description":"Pay-per-call utility API for AI agents: PDF generation, global holidays/business days, EU VAT, ECB FX rates, IBAN/phone validation, QR codes, Chilean operational data. x402/USDC on Base & Solana."},"servers":[{"url":"https://toolrail.dev"}],"paths":{"/pdf":{"post":{"summary":"Generate a print-ready PDF from JSON data (invoice, report, contract templates) or raw HTML","description":"Generate a print-ready PDF from JSON data (invoice, report, contract templates) or raw HTML. Returns application/pdf. No account or subscription needed. Price: $0.01 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.01","x-payment-protocol":"x402","x-example":"curl -X POST https://toolrail.dev/pdf -H \"Content-Type: application/json\" -d '{\"template\":\"invoice\",\"data\":{\"number\":\"F-001\",\"currency\":\"USD\",\"tax_rate\":19,\"issuer\":{\"name\":\"Acme\"},\"client\":{\"name\":\"Client Inc\"},\"items\":[{\"description\":\"Consulting\",\"quantity\":2,\"unit_price\":150}]}}' -o invoice.pdf","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/vat/rates":{"get":{"summary":"Current VAT rates for 44 European countries (EU-27 + UK, CH, NO","description":"Current VAT rates for 44 European countries (EU-27 + UK, CH, NO...). Standard, reduced and super-reduced rates, sourced daily from the European Commission TEDB. Price: $0.003 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.003","x-payment-protocol":"x402","x-example":"curl \"https://toolrail.dev/vat/rates?country=DE\"","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/vat/validate":{"post":{"summary":"Validate an EU VAT number against the official European Commission VIES registry, with retries and caching for reliability","description":"Validate an EU VAT number against the official European Commission VIES registry, with retries and caching for reliability. Returns validity, company name and address. Price: $0.005 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.005","x-payment-protocol":"x402","x-example":"curl -X POST https://toolrail.dev/vat/validate -H \"Content-Type: application/json\" -d '{\"countryCode\":\"IE\",\"vatNumber\":\"6388047V\"}'","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/vat/price":{"post":{"summary":"VAT price calculator for 44 European countries: net-to-gross or gross-to-net with the current standard or reduced rate","description":"VAT price calculator for 44 European countries: net-to-gross or gross-to-net with the current standard or reduced rate. Returns net, VAT amount and gross. Price: $0.003 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.003","x-payment-protocol":"x402","x-example":"curl -X POST https://toolrail.dev/vat/price -H \"Content-Type: application/json\" -d '{\"amount\":100,\"country\":\"DE\",\"direction\":\"net-to-gross\"}'","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/fx/convert":{"get":{"summary":"Convert between 30+ major currencies using official European Central Bank reference rates, current or historical since 1999","description":"Convert between 30+ major currencies using official European Central Bank reference rates, current or historical since 1999. Price: $0.003 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.003","x-payment-protocol":"x402","x-example":"curl \"https://toolrail.dev/fx/convert?from=USD&to=EUR&amount=100\"","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/fx/rates":{"get":{"summary":"Full ECB reference rate table for any base currency, current or for a historical date since 1999","description":"Full ECB reference rate table for any base currency, current or for a historical date since 1999. Price: $0.003 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.003","x-payment-protocol":"x402","x-example":"curl \"https://toolrail.dev/fx/rates?base=USD\"","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/days/holidays":{"get":{"summary":"Official public holidays for 187 countries (any year 1975-2075): date, local and English name, nationwide vs regional flag","description":"Official public holidays for 187 countries (any year 1975-2075): date, local and English name, nationwide vs regional flag. Chile enhanced with a curated statutory table. Price: $0.003 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.003","x-payment-protocol":"x402","x-example":"curl \"https://toolrail.dev/days/holidays?country=DE&year=2026\"","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/days/business-days":{"get":{"summary":"Business-day calculator for 187 countries: add N working days to a date skipping weekends and official public holidays","description":"Business-day calculator for 187 countries: add N working days to a date skipping weekends and official public holidays. Essential for scheduling, deadlines and logistics. Price: $0.003 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.003","x-payment-protocol":"x402","x-example":"curl \"https://toolrail.dev/days/business-days?country=US&from=2026-08-01&days=10\"","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/validate/iban":{"post":{"summary":"Validate an IBAN (international bank account number): ISO 13616 mod-97 check digits and per-country length registry for 88 countries","description":"Validate an IBAN (international bank account number): ISO 13616 mod-97 check digits and per-country length registry for 88 countries. Returns formatted IBAN and BBAN. Price: $0.002 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.002","x-payment-protocol":"x402","x-example":"curl -X POST https://toolrail.dev/validate/iban -H \"Content-Type: application/json\" -d '{\"iban\":\"DE89 3704 0044 0532 0130 00\"}'","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/validate/phone":{"post":{"summary":"Validate and format phone numbers for ~240 regions (Google libphonenumber): validity, region, line type, E","description":"Validate and format phone numbers for ~240 regions (Google libphonenumber): validity, region, line type, E.164 / international / national formats. Price: $0.002 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.002","x-payment-protocol":"x402","x-example":"curl -X POST https://toolrail.dev/validate/phone -H \"Content-Type: application/json\" -d '{\"phone\":\"+56 9 6123 4567\"}'","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/validate/tax-id":{"post":{"summary":"Validate tax IDs across Latin America and Spain with official check-digit algorithms: Chile RUT, Argentina CUIT/CUIL, Brazil CPF and CNPJ, Mexico RFC, Peru RUC, Colombia NIT, Spain NIF/NIE","description":"Validate tax IDs across Latin America and Spain with official check-digit algorithms: Chile RUT, Argentina CUIT/CUIL, Brazil CPF and CNPJ, Mexico RFC, Peru RUC, Colombia NIT, Spain NIF/NIE. The only pan-LATAM ID validator for agents. Price: $0.003 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.003","x-payment-protocol":"x402","x-example":"curl -X POST https://toolrail.dev/validate/tax-id -H \"Content-Type: application/json\" -d '{\"country\":\"BR\",\"id\":\"529.982.247-25\"}'","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/latam/indexacion":{"get":{"summary":"Latin American inflation-indexed units used in real contracts, mortgages and rents: UF (Chile), UVA (Argentina), UVR (Colombia), UDI (Mexico) — live official central-bank values with local-currency conversion","description":"Latin American inflation-indexed units used in real contracts, mortgages and rents: UF (Chile), UVA (Argentina), UVR (Colombia), UDI (Mexico) — live official central-bank values with local-currency conversion. Price: $0.003 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.003","x-payment-protocol":"x402","x-example":"curl \"https://toolrail.dev/latam/indexacion?unidad=uva&monto=100\"","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/latam/dolar-argentina":{"get":{"summary":"Argentine dollar quotes in one call: oficial, blue (parallel) and euro rates plus the gap percentage — the region's most watched FX spread","description":"Argentine dollar quotes in one call: oficial, blue (parallel) and euro rates plus the gap percentage — the region's most watched FX spread. Price: $0.003 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.003","x-payment-protocol":"x402","x-example":"curl \"https://toolrail.dev/latam/dolar-argentina\"","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/latam/fx":{"get":{"summary":"All official LATAM exchange rates against USD in ONE call: Chilean peso (central bank), Argentine oficial+blue with gap, Brazilian real (PTAX), Mexican peso (FIX), Colombian peso (legal TRM) and Peruvian sol (SBS)","description":"All official LATAM exchange rates against USD in ONE call: Chilean peso (central bank), Argentine oficial+blue with gap, Brazilian real (PTAX), Mexican peso (FIX), Colombian peso (legal TRM) and Peruvian sol (SBS). The region's FX aggregator no one else serves. Price: $0.01 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.01","x-payment-protocol":"x402","x-example":"curl \"https://toolrail.dev/latam/fx\"","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/br/indices":{"get":{"summary":"Brazil's key official rates in one call: SELIC target, annualized CDI, monthly IPCA inflation and PTAX dollar — straight from Banco Central do Brasil's SGS API","description":"Brazil's key official rates in one call: SELIC target, annualized CDI, monthly IPCA inflation and PTAX dollar — straight from Banco Central do Brasil's SGS API. Price: $0.003 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.003","x-payment-protocol":"x402","x-example":"curl \"https://toolrail.dev/br/indices\"","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/br/cep":{"get":{"summary":"Brazilian postal code (CEP) lookup: street, neighborhood, city, state and IBGE code for any of Brazil's 700k+ CEPs","description":"Brazilian postal code (CEP) lookup: street, neighborhood, city, state and IBGE code for any of Brazil's 700k+ CEPs. Price: $0.002 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.002","x-payment-protocol":"x402","x-example":"curl \"https://toolrail.dev/br/cep?cep=01310-100\"","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/ar/indices":{"get":{"summary":"Argentina's macro pulse: latest monthly inflation, compounded year-over-year inflation, and country risk (riesgo país) in basis points","description":"Argentina's macro pulse: latest monthly inflation, compounded year-over-year inflation, and country risk (riesgo país) in basis points. Price: $0.003 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.003","x-payment-protocol":"x402","x-example":"curl \"https://toolrail.dev/ar/indices\"","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/co/trm":{"get":{"summary":"Colombia's official TRM (Tasa Representativa del Mercado) — the legal COP/USD rate used for taxes and contracts, with validity dates","description":"Colombia's official TRM (Tasa Representativa del Mercado) — the legal COP/USD rate used for taxes and contracts, with validity dates. Price: $0.003 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.003","x-payment-protocol":"x402","x-example":"curl \"https://toolrail.dev/co/trm\"","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/pe/tipo-cambio":{"get":{"summary":"Peru's official SBS exchange rate (buy/sell PEN per USD) from the central bank (BCRP)","description":"Peru's official SBS exchange rate (buy/sell PEN per USD) from the central bank (BCRP). Price: $0.003 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.003","x-payment-protocol":"x402","x-example":"curl \"https://toolrail.dev/pe/tipo-cambio\"","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/mx/indicadores":{"get":{"summary":"Mexico's official FIX dollar rate (used for obligations) and TIIE 28-day interest rate, from Banco de México","description":"Mexico's official FIX dollar rate (used for obligations) and TIIE 28-day interest rate, from Banco de México. Price: $0.003 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.003","x-payment-protocol":"x402","x-example":"curl \"https://toolrail.dev/mx/indicadores\"","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/cl/reajuste":{"get":{"summary":"Chilean IPC adjustment calculator: compound official monthly inflation between two months to reajust any amount — the standard calculation for rents, alimony and contracts in Chile","description":"Chilean IPC adjustment calculator: compound official monthly inflation between two months to reajust any amount — the standard calculation for rents, alimony and contracts in Chile. Price: $0.01 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.01","x-payment-protocol":"x402","x-example":"curl \"https://toolrail.dev/cl/reajuste?desde=2025-01&hasta=2025-06&monto=500000\"","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/qr":{"post":{"summary":"Generate a QR code as PNG or SVG from any text or URL (up to 2000 chars, 64-2048 px)","description":"Generate a QR code as PNG or SVG from any text or URL (up to 2000 chars, 64-2048 px). Pairs with the PDF endpoint for payment links and labels. Price: $0.002 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.002","x-payment-protocol":"x402","x-example":"curl -X POST https://toolrail.dev/qr -H \"Content-Type: application/json\" -d '{\"data\":\"https://toolrail.dev\",\"format\":\"png\",\"size\":512}' -o qr.png","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/cl/indicadores":{"get":{"summary":"Chilean economic indicators: UF, UTM, dolar observado, euro, IPC — current or for a given date","description":"Chilean economic indicators: UF, UTM, dolar observado, euro, IPC — current or for a given date. Official Banco Central de Chile data. Price: $0.003 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.003","x-payment-protocol":"x402","x-example":"curl \"https://toolrail.dev/cl/indicadores?indicador=uf\"","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/cl/uf":{"get":{"summary":"Convert amounts between UF (Unidad de Fomento) and Chilean pesos at any date","description":"Convert amounts between UF (Unidad de Fomento) and Chilean pesos at any date. Essential for Chilean contracts, rents and insurance. Price: $0.003 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.003","x-payment-protocol":"x402","x-example":"curl \"https://toolrail.dev/cl/uf?monto=50&direccion=uf-clp\"","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/cl/dias-habiles":{"get":{"summary":"Chilean business-day calculator: add N working days to a date respecting national holidays","description":"Chilean business-day calculator: add N working days to a date respecting national holidays. Types: administrativo (Mon-Fri) or corrido. Price: $0.003 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.003","x-payment-protocol":"x402","x-example":"curl \"https://toolrail.dev/cl/dias-habiles?desde=2026-08-01&plazo=10\"","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/cl/feriados":{"get":{"summary":"Official Chilean public holidays for 2026-2027 as structured JSON, including statutory moved holidays","description":"Official Chilean public holidays for 2026-2027 as structured JSON, including statutory moved holidays. Price: $0.003 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.003","x-payment-protocol":"x402","x-example":"curl \"https://toolrail.dev/cl/feriados?ano=2026\"","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/cl/rut":{"post":{"summary":"Validate and format a Chilean RUT (tax ID) including check digit (modulo 11)","description":"Validate and format a Chilean RUT (tax ID) including check digit (modulo 11). Price: $0.002 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.002","x-payment-protocol":"x402","x-example":"curl -X POST https://toolrail.dev/cl/rut -H \"Content-Type: application/json\" -d '{\"rut\":\"12.345.678-5\"}'","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/cl/sueldo-liquido":{"post":{"summary":"Chilean net salary calculator: gross to net with AFP, health, unemployment insurance and impuesto unico using live UF/UTM values and current legal brackets","description":"Chilean net salary calculator: gross to net with AFP, health, unemployment insurance and impuesto unico using live UF/UTM values and current legal brackets. Price: $0.01 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.01","x-payment-protocol":"x402","x-example":"curl -X POST https://toolrail.dev/cl/sueldo-liquido -H \"Content-Type: application/json\" -d '{\"bruto\":1500000,\"afp\":\"modelo\"}'","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/cl/farmacias-turno":{"get":{"summary":"On-duty (night shift) pharmacies in Chile by comuna, from the official MINSAL registry","description":"On-duty (night shift) pharmacies in Chile by comuna, from the official MINSAL registry. Price: $0.003 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$0.003","x-payment-protocol":"x402","x-example":"curl \"https://toolrail.dev/cl/farmacias-turno?comuna=VALPARAISO\"","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}},"/guia/pdf":{"get":{"summary":"PDF edition of 'Build your own x402 API' — available in Spanish, English or Portuguese (?lang=es|en|pt)","description":"PDF edition of 'Build your own x402 API' — available in Spanish, English or Portuguese (?lang=es|en|pt). A real-world walkthrough of building Toolrail: architecture, real bugs found and fixed, security checklist, discovery channels, and an honest revenue simulation. Includes a printable launch checklist. One-time purchase. Price: $7.00 per call, paid in USDC via x402 (HTTP 402 flow).","x-price-usd":"$7.00","x-payment-protocol":"x402","x-example":"curl \"https://toolrail.dev/guia/pdf?lang=en\" -o guide-x402.pdf","responses":{"200":{"description":"Resource returned after settled payment"},"402":{"description":"Payment required — header PAYMENT-REQUIRED carries base64 x402 payment requirements"}}}}}}