# Toolrail > Pay-per-call utility API for AI agents via the x402 payment protocol (USDC on Base or Solana — every 402 offers both). No API keys, no subscriptions: call an endpoint, receive HTTP 402 with payment instructions, pay, retry, get the resource. Gas is sponsored by the facilitator. Base URL: https://toolrail.dev Agent setup: fetch https://toolrail.dev/skill.md and follow it. No wallet? https://toolrail.dev/mcp exposes 27 of these tools for free via MCP (Streamable HTTP, rate-limited) — add with `claude mcp add --transport http toolrail https://toolrail.dev/mcp`. ## What it offers - PDF generation from JSON templates (invoice, report, contract) or raw HTML - Global calendar: public holidays and business-day math for 187 countries - EU VAT: current rates for 44 European countries (EC TEDB, daily) + official VIES number validation + net/gross price calculator - FX: ECB reference rates for 30+ currencies, current and historical since 1999 - Validation: IBAN (88 countries, ISO 13616), phone numbers (~240 regions), and tax IDs for LATAM + Spain (RUT, CUIT, CPF/CNPJ, RFC, RUC, NIT, NIF) - LATAM: all-region official FX aggregator (CLP/ARS/BRL/MXN/COP/PEN in one call), inflation-indexed units (UF, UVA, UVR, UDI), Brazil rates (SELIC/CDI/IPCA/PTAX) and CEP lookup, Argentina inflation + country risk, Colombia TRM, Peru SBS rate, Mexico FIX + TIIE, Chilean IPC adjustment calculator - QR code generation (PNG/SVG) - Chile operational data: UF/UTM/dolar indicators, UF-CLP conversion, business-day math with official holidays, RUT validation, net salary calculation, on-duty pharmacies ## Endpoints (price per call in USD, paid in USDC) - POST /pdf — $0.01 — Generate a print-ready PDF from JSON data (invoice, report, contract templates) or raw HTML. Returns application/pdf. No account or subscription needed. - GET /vat/rates — $0.003 — 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. - POST /vat/validate — $0.005 — Validate an EU VAT number against the official European Commission VIES registry, with retries and caching for reliability. Returns validity, company name and address. - POST /vat/price — $0.003 — 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. - GET /fx/convert — $0.003 — Convert between 30+ major currencies using official European Central Bank reference rates, current or historical since 1999. - GET /fx/rates — $0.003 — Full ECB reference rate table for any base currency, current or for a historical date since 1999. - GET /days/holidays — $0.003 — 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. - GET /days/business-days — $0.003 — 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. - POST /validate/iban — $0.002 — 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. - POST /validate/phone — $0.002 — Validate and format phone numbers for ~240 regions (Google libphonenumber): validity, region, line type, E.164 / international / national formats. - POST /validate/tax-id — $0.003 — 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. - GET /latam/indexacion — $0.003 — 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. - GET /latam/dolar-argentina — $0.003 — Argentine dollar quotes in one call: oficial, blue (parallel) and euro rates plus the gap percentage — the region's most watched FX spread. - GET /latam/fx — $0.01 — 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. - GET /br/indices — $0.003 — 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. - GET /br/cep — $0.002 — Brazilian postal code (CEP) lookup: street, neighborhood, city, state and IBGE code for any of Brazil's 700k+ CEPs. - GET /ar/indices — $0.003 — Argentina's macro pulse: latest monthly inflation, compounded year-over-year inflation, and country risk (riesgo país) in basis points. - GET /co/trm — $0.003 — Colombia's official TRM (Tasa Representativa del Mercado) — the legal COP/USD rate used for taxes and contracts, with validity dates. - GET /pe/tipo-cambio — $0.003 — Peru's official SBS exchange rate (buy/sell PEN per USD) from the central bank (BCRP). - GET /mx/indicadores — $0.003 — Mexico's official FIX dollar rate (used for obligations) and TIIE 28-day interest rate, from Banco de México. - GET /cl/reajuste — $0.01 — 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. - POST /qr — $0.002 — 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. - GET /cl/indicadores — $0.003 — Chilean economic indicators: UF, UTM, dolar observado, euro, IPC — current or for a given date. Official Banco Central de Chile data. - GET /cl/uf — $0.003 — Convert amounts between UF (Unidad de Fomento) and Chilean pesos at any date. Essential for Chilean contracts, rents and insurance. - GET /cl/dias-habiles — $0.003 — Chilean business-day calculator: add N working days to a date respecting national holidays. Types: administrativo (Mon-Fri) or corrido. - GET /cl/feriados — $0.003 — Official Chilean public holidays for 2026-2027 as structured JSON, including statutory moved holidays. - POST /cl/rut — $0.002 — Validate and format a Chilean RUT (tax ID) including check digit (modulo 11). - POST /cl/sueldo-liquido — $0.01 — Chilean net salary calculator: gross to net with AFP, health, unemployment insurance and impuesto unico using live UF/UTM values and current legal brackets. - GET /cl/farmacias-turno — $0.003 — On-duty (night shift) pharmacies in Chile by comuna, from the official MINSAL registry. - GET /guia/pdf — $7.00 — 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. ## Free endpoints - GET / — JSON catalog (or human landing page for browsers) - GET /health — liveness - GET /pdf/templates — PDF template schemas with examples - GET /openapi.json — OpenAPI 3.1 description - GET /skill.md — agent-readable setup instructions ## Example (no payment yet — returns 402 with payment requirements) curl https://toolrail.dev/fx/convert?from=USD&to=EUR&amount=100