{"openapi":"3.1.0","info":{"title":"Agent402 — pay-per-call tools for AI agents","version":"2.0.0","description":"Machine-payable web tools for AI agents. Every endpoint is paid per call in USDC on Base via the x402 protocol: no signup, no API keys — the first request returns HTTP 402 with payment requirements, an x402 client pays and retries. Free discovery: GET /api/pricing, GET /llms.txt.","contact":{"url":"https://agent402.tools"}},"servers":[{"url":"https://agent402.tools"}],"tags":[{"name":"web","description":"Web & documents"},{"name":"memory","description":"Agent memory"},{"name":"network","description":"Network & domains"},{"name":"conversion","description":"Data conversion"},{"name":"text","description":"Text processing"},{"name":"encoding","description":"Encoding & crypto"},{"name":"identifiers","description":"Generators & IDs"},{"name":"time","description":"Time & scheduling"},{"name":"validation","description":"Validation & parsing"}],"paths":{"/api/extract":{"post":{"operationId":"extract","summary":"Extract article ($0.005/call via x402)","description":"Extract the main article content from any public URL as clean markdown. Returns title, byline, excerpt, word count, and markdown.\n\nPrice: $0.005 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/extract","tags":["web"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"url":"https://example.com/article","title":"Article title","byline":"Author","excerpt":"Short summary…","wordCount":850,"markdown":"# Article title\n\nBody…"}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.005","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Public http(s) URL to extract"}},"required":["url"]},"example":{"url":"https://example.com/article"}}}}}},"/api/meta":{"get":{"operationId":"metaGet","summary":"Page metadata ($0.002/call via x402)","description":"Fetch page metadata for a URL: title, description, OpenGraph, Twitter cards, canonical URL, favicon.\n\nPrice: $0.002 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/meta","tags":["web"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"url":"https://example.com","title":"Example","description":"Example site","og":{"title":"Example"},"twitter":{}}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.002","x-payment-protocol":"x402","parameters":[{"name":"url","in":"query","required":true,"description":"Public http(s) URL","schema":{"type":"string"}}]}},"/api/dns":{"get":{"operationId":"dnsGet","summary":"DNS lookup ($0.001/call via x402)","description":"DNS lookup for a domain. Supported record types: A, AAAA, MX, TXT, NS, CNAME.\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/dns","tags":["network"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"name":"example.com","type":"A","records":["93.184.215.14"]}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","parameters":[{"name":"name","in":"query","required":true,"description":"Domain name, e.g. example.com","schema":{"type":"string"}},{"name":"type","in":"query","required":false,"description":"Record type (default A)","schema":{"type":"string"}}]}},"/api/render":{"post":{"operationId":"render","summary":"Browser render ($0.02/call via x402)","description":"Render a page in a real headless Chromium browser (JavaScript executed), then extract the main content as clean markdown. Use this for SPAs and JS-heavy sites where plain fetching returns an empty shell.\n\nPrice: $0.02 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/render","tags":["web"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"url":"https://example.com/spa-page","title":"Page title","wordCount":500,"markdown":"…","rendered":true}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.02","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Public http(s) URL to render"}},"required":["url"]},"example":{"url":"https://example.com/spa-page"}}}}}},"/api/screenshot":{"get":{"operationId":"screenshotGet","summary":"Screenshot ($0.015/call via x402)","description":"Screenshot any public URL in headless Chromium. Returns a PNG image. Query params: ?url=https://…&fullPage=true (optional).\n\nPrice: $0.015 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/screenshot","tags":["web"],"responses":{"200":{"description":"Success","content":{"image/png":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.015","x-payment-protocol":"x402","parameters":[{"name":"url","in":"query","required":true,"description":"Public http(s) URL to screenshot","schema":{"type":"string"}},{"name":"fullPage","in":"query","required":false,"description":"true for full-page capture (default false)","schema":{"type":"string"}}]}},"/api/pdf":{"post":{"operationId":"pdf","summary":"PDF to text ($0.01/call via x402)","description":"Fetch a PDF from a URL and extract its text content. Returns page count, document info, and the full text (up to 20MB PDFs).\n\nPrice: $0.01 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/pdf","tags":["web"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"url":"https://example.com/whitepaper.pdf","pages":12,"info":{"title":"Whitepaper"},"wordCount":4800,"text":"…"}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.01","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Public http(s) URL of a PDF"}},"required":["url"]},"example":{"url":"https://example.com/whitepaper.pdf"}}}}}},"/api/memory":{"post":{"operationId":"memory-write","summary":"Memory write ($0.002/call via x402)","description":"Persistent key-value memory for agents, scoped to the paying wallet. Your x402 payment IS your authentication: the wallet that pays owns the namespace. No signup, no API keys. Body: {\"key\": \"…\", \"value\": any JSON} to write, or {\"key\": \"…\", \"delete\": true} to remove. Values up to 64KB.\n\nPrice: $0.002 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/memory-write","tags":["memory"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"key":"research/task-42","bytes":42,"updated":1760000000000,"persistent":true}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.002","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Key to write (max 256 chars)"},"value":{"description":"Any JSON value (max 64KB serialized)"},"delete":{"type":"boolean","description":"Set true to delete the key instead"}},"required":["key"]},"example":{"key":"research/task-42","value":{"status":"done","findings":["…"]}}}}}},"get":{"operationId":"memory-readGet","summary":"Memory read ($0.001/call via x402)","description":"Read from your wallet-scoped memory. ?key=… returns the stored value; omit key to list your keys. Only the wallet that paid for the writes can read them.\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/memory-read","tags":["memory"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"key":"research/task-42","value":{"status":"done"},"updated":1760000000000}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","parameters":[{"name":"key","in":"query","required":false,"description":"Key to read; omit to list all your keys","schema":{"type":"string"}}]}},"/api/hash":{"post":{"operationId":"hash","summary":"Hash ($0.001/call via x402)","description":"Cryptographic hash of a text string. Algorithms: sha256 (default), sha512, sha1, md5. Returns hex and base64 digests.\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/hash","tags":["encoding"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"algo":"sha256","hex":"b94d27…","base64":"uU0n…"}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"Text to hash (max 100KB)"},"algo":{"type":"string","description":"sha256 | sha512 | sha1 | md5"}},"required":["text"]},"example":{"text":"hello world","algo":"sha256"}}}}}},"/api/hmac":{"post":{"operationId":"hmac","summary":"HMAC ($0.001/call via x402)","description":"HMAC signature of a message with a shared key. Algorithms: sha256 (default), sha512, sha1. Returns hex and base64.\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/hmac","tags":["encoding"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"algo":"sha256","hex":"f7bc…","base64":"97w…"}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"Message to sign (max 100KB)"},"key":{"type":"string","description":"Shared secret key"},"algo":{"type":"string","description":"sha256 | sha512 | sha1"}},"required":["text","key"]},"example":{"text":"payload","key":"secret","algo":"sha256"}}}}}},"/api/base64":{"post":{"operationId":"base64","summary":"Base64 ($0.001/call via x402)","description":"Base64 encode or decode text. mode: encode (default) or decode. Handles URL-safe base64 on decode.\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/base64","tags":["encoding"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"mode":"encode","result":"aGVsbG8="}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"Input text (max 100KB)"},"mode":{"type":"string","description":"encode | decode"}},"required":["text"]},"example":{"text":"hello","mode":"encode"}}}}}},"/api/hex":{"post":{"operationId":"hex","summary":"Hex ($0.001/call via x402)","description":"Hex encode or decode text. mode: encode (default) or decode.\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/hex","tags":["encoding"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"mode":"encode","result":"6869"}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"Input text (max 100KB)"},"mode":{"type":"string","description":"encode | decode"}},"required":["text"]},"example":{"text":"hi","mode":"encode"}}}}}},"/api/url-code":{"post":{"operationId":"url-code","summary":"URL encode/decode ($0.001/call via x402)","description":"Percent-encode or decode a string for URLs. mode: encode (default) or decode. component: true (default) uses encodeURIComponent semantics.\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/url-code","tags":["encoding"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"mode":"encode","result":"a%20b%26c"}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"Input text (max 100KB)"},"mode":{"type":"string","description":"encode | decode"},"component":{"type":"boolean","description":"Use component encoding (default true)"}},"required":["text"]},"example":{"text":"a b&c","mode":"encode"}}}}}},"/api/jwt-decode":{"post":{"operationId":"jwt-decode","summary":"JWT decode ($0.001/call via x402)","description":"Decode a JWT without verification: header, payload, expiry status, and time remaining. (Decoding only — signatures are NOT verified.)\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/jwt-decode","tags":["encoding"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"header":{"alg":"HS256"},"payload":{"sub":"123","exp":1760000000},"expired":false,"expiresInSeconds":3600}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"The JWT string"}},"required":["token"]},"example":{"token":"eyJhbGciOi…"}}}}}},"/api/uuid":{"get":{"operationId":"uuidGet","summary":"UUID generator ($0.001/call via x402)","description":"Generate UUIDs. ?version=4 (default, random) or 7 (time-ordered), ?count=1..100.\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/uuid","tags":["identifiers"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"version":7,"uuids":["0190a1b2-…"]}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","parameters":[{"name":"version","in":"query","required":false,"description":"4 (random) or 7 (time-ordered)","schema":{"type":"string"}},{"name":"count","in":"query","required":false,"description":"How many (1-100, default 1)","schema":{"type":"string"}}]}},"/api/ulid":{"get":{"operationId":"ulidGet","summary":"ULID generator ($0.001/call via x402)","description":"Generate ULIDs (sortable, timestamp-prefixed identifiers). ?count=1..100.\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/ulid","tags":["identifiers"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"ulids":["01J9ZK7M3N…"]}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","parameters":[{"name":"count","in":"query","required":false,"description":"How many (1-100, default 1)","schema":{"type":"string"}}]}},"/api/password":{"get":{"operationId":"passwordGet","summary":"Password generator ($0.001/call via x402)","description":"Generate cryptographically random passwords. ?length=8..128 (default 24), ?symbols=true|false (default true), ?count=1..20.\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/password","tags":["identifiers"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"passwords":["k9#mP2…"],"entropyBits":190}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","parameters":[{"name":"length","in":"query","required":false,"description":"8-128, default 24","schema":{"type":"string"}},{"name":"symbols","in":"query","required":false,"description":"Include symbols (default true)","schema":{"type":"string"}},{"name":"count","in":"query","required":false,"description":"How many (1-20, default 1)","schema":{"type":"string"}}]}},"/api/random":{"get":{"operationId":"randomGet","summary":"Random ($0.001/call via x402)","description":"Cryptographically secure randomness. ?bytes=1..1024 returns hex; or ?min=&max= returns a uniform integer; ?count=1..100.\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/random","tags":["identifiers"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"integers":[42,7,93]}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","parameters":[{"name":"bytes","in":"query","required":false,"description":"Return N random bytes as hex (1-1024)","schema":{"type":"string"}},{"name":"min","in":"query","required":false,"description":"Integer lower bound (inclusive)","schema":{"type":"string"}},{"name":"max","in":"query","required":false,"description":"Integer upper bound (inclusive)","schema":{"type":"string"}},{"name":"count","in":"query","required":false,"description":"How many values (1-100, default 1)","schema":{"type":"string"}}]}},"/api/totp":{"post":{"operationId":"totp","summary":"TOTP code ($0.002/call via x402)","description":"Compute the current TOTP code (RFC 6238, 30s period, SHA-1, 6 digits) from a base32 secret. Useful for agents that must complete 2FA flows they are authorized for.\n\nPrice: $0.002 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/totp","tags":["encoding"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"code":"492039","secondsRemaining":17}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.002","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string","description":"Base32 TOTP secret"},"digits":{"type":"number","description":"6 (default) or 8"}},"required":["secret"]},"example":{"secret":"JBSWY3DPEHPK3PXP"}}}}}},"/api/json-format":{"post":{"operationId":"json-format","summary":"JSON validate & format ($0.001/call via x402)","description":"Validate, pretty-print, or minify JSON. Returns parse errors with position when invalid.\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/json-format","tags":["conversion"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"valid":true,"formatted":"{\n  \"a\": 1\n}"}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"json":{"type":"string","description":"JSON text to validate/format (max 100KB)"},"indent":{"type":"number","description":"Spaces of indentation; 0 = minify (default 2)"}},"required":["json"]},"example":{"json":"{\"a\":1}","indent":2}}}}}},"/api/json-to-csv":{"post":{"operationId":"json-to-csv","summary":"JSON to CSV ($0.002/call via x402)","description":"Convert a JSON array of objects to CSV. Nested objects are flattened to dot-path columns.\n\nPrice: $0.002 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/json-to-csv","tags":["conversion"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"csv":"name,role.title\nAda,Engineer\n","rows":1,"columns":2}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.002","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"json":{"description":"Array of objects (or a JSON string of one)"},"delimiter":{"type":"string","description":"Default ,"}},"required":["json"]},"example":{"json":[{"name":"Ada","role":{"title":"Engineer"}}]}}}}}},"/api/csv-to-json":{"post":{"operationId":"csv-to-json","summary":"CSV to JSON ($0.002/call via x402)","description":"Parse CSV (quoted fields supported) into a JSON array of objects, using the first row as headers (header=false for arrays).\n\nPrice: $0.002 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/csv-to-json","tags":["conversion"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"rows":[{"name":"Ada","age":"36"}],"count":1}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.002","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string","description":"CSV text (max 100KB)"},"delimiter":{"type":"string","description":"Default ,"},"header":{"type":"boolean","description":"First row is headers (default true)"}},"required":["csv"]},"example":{"csv":"name,age\nAda,36\n"}}}}}},"/api/yaml-to-json":{"post":{"operationId":"yaml-to-json","summary":"YAML to JSON ($0.002/call via x402)","description":"Parse YAML into JSON (safe schema — no code execution).\n\nPrice: $0.002 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/yaml-to-json","tags":["conversion"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"json":{"name":"Ada","tags":["eng"]}}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.002","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"yaml":{"type":"string","description":"YAML text (max 100KB)"}},"required":["yaml"]},"example":{"yaml":"name: Ada\ntags:\n  - eng"}}}}}},"/api/json-to-yaml":{"post":{"operationId":"json-to-yaml","summary":"JSON to YAML ($0.002/call via x402)","description":"Convert JSON to YAML.\n\nPrice: $0.002 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/json-to-yaml","tags":["conversion"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"yaml":"name: Ada\ntags:\n  - eng\n"}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.002","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"json":{"description":"Any JSON value (or a JSON string of one)"}},"required":["json"]},"example":{"json":{"name":"Ada","tags":["eng"]}}}}}}},"/api/xml-to-json":{"post":{"operationId":"xml-to-json","summary":"XML to JSON ($0.002/call via x402)","description":"Parse XML into a JSON object tree (attributes under _attrs, text under _text; repeated elements become arrays).\n\nPrice: $0.002 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/xml-to-json","tags":["conversion"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"json":{"user":{"_attrs":{"id":"1"},"name":"Ada"}}}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.002","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"xml":{"type":"string","description":"XML text (max 100KB)"}},"required":["xml"]},"example":{"xml":"<user id='1'><name>Ada</name></user>"}}}}}},"/api/markdown-to-html":{"post":{"operationId":"markdown-to-html","summary":"Markdown to HTML ($0.002/call via x402)","description":"Render CommonMark + GFM markdown to HTML.\n\nPrice: $0.002 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/markdown-to-html","tags":["conversion"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"html":"<h1>Hi</h1>\n<p><strong>bold</strong></p>\n"}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.002","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"markdown":{"type":"string","description":"Markdown text (max 100KB)"}},"required":["markdown"]},"example":{"markdown":"# Hi\n\n**bold**"}}}}}},"/api/html-to-markdown":{"post":{"operationId":"html-to-markdown","summary":"HTML to Markdown ($0.002/call via x402)","description":"Convert an HTML fragment or document you already have into clean markdown. (To fetch + convert a live URL, use /api/extract.)\n\nPrice: $0.002 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/html-to-markdown","tags":["conversion"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"markdown":"# Hi\n\n**bold**"}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.002","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"html":{"type":"string","description":"HTML text (max 100KB)"}},"required":["html"]},"example":{"html":"<h1>Hi</h1><p><b>bold</b></p>"}}}}}},"/api/json-diff":{"post":{"operationId":"json-diff","summary":"JSON diff ($0.002/call via x402)","description":"Deep-compare two JSON values. Returns a list of changed/added/removed paths (capped at 1000 differences).\n\nPrice: $0.002 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/json-diff","tags":["conversion"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"equal":false,"differences":[{"path":"y","type":"changed","a":2,"b":3},{"path":"z","type":"added","b":4}]}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.002","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"a":{"description":"First JSON value"},"b":{"description":"Second JSON value"}},"required":["a","b"]},"example":{"a":{"x":1,"y":2},"b":{"x":1,"y":3,"z":4}}}}}}},"/api/json-query":{"post":{"operationId":"json-query","summary":"JSON query ($0.001/call via x402)","description":"Extract a value from JSON by dot/bracket path, e.g. \"items[2].name\".\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/json-query","tags":["conversion"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"found":true,"value":"b"}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"json":{"description":"JSON value (or a JSON string of one)"},"path":{"type":"string","description":"Path like \"a.b[0].c\""}},"required":["json","path"]},"example":{"json":{"items":[{"name":"a"},{"name":"b"}]},"path":"items[1].name"}}}}}},"/api/slugify":{"post":{"operationId":"slugify","summary":"Slugify ($0.001/call via x402)","description":"Turn any text into a URL-safe slug (lowercase, hyphenated, diacritics stripped).\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/slugify","tags":["text"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"slug":"hello-world-2024"}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"Text to slugify"},"separator":{"type":"string","description":"Default -"}},"required":["text"]},"example":{"text":"Héllo, Wörld! 2024"}}}}}},"/api/case":{"post":{"operationId":"case","summary":"Case convert ($0.001/call via x402)","description":"Convert text between camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, Title Case, lower, UPPER.\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/case","tags":["text"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"result":"helloWorldExample"}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"Input text"},"to":{"type":"string","description":"camel | pascal | snake | kebab | constant | title | lower | upper"}},"required":["text","to"]},"example":{"text":"hello world example","to":"camel"}}}}}},"/api/text-stats":{"post":{"operationId":"text-stats","summary":"Text statistics ($0.001/call via x402)","description":"Characters, words, sentences, paragraphs, average word length, reading time, and an LLM token estimate for any text.\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/text-stats","tags":["text"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"characters":1200,"words":210,"sentences":14,"paragraphs":4,"readingTimeMinutes":1.1,"estimatedTokens":300}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"Text to analyze (max 500KB)"}},"required":["text"]},"example":{"text":"Some long document…"}}}}}},"/api/keywords":{"post":{"operationId":"keywords","summary":"Keyword extraction ($0.002/call via x402)","description":"Top keywords and two-word phrases by frequency (stopwords removed). Cheap, deterministic signal for routing, tagging, and dedup.\n\nPrice: $0.002 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/keywords","tags":["text"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"keywords":[{"term":"payment","count":9}],"phrases":[{"term":"x402 protocol","count":4}]}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.002","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"Text to analyze (max 500KB)"},"limit":{"type":"number","description":"Max keywords (default 15)"}},"required":["text"]},"example":{"text":"Long article text…","limit":10}}}}}},"/api/text-diff":{"post":{"operationId":"text-diff","summary":"Text diff ($0.002/call via x402)","description":"Line-by-line diff of two texts (LCS). Returns unified-style ops and change counts. Up to 2000 lines per side.\n\nPrice: $0.002 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/text-diff","tags":["text"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"added":1,"removed":1,"unchanged":1,"diff":[{"op":" ","line":"line1"},{"op":"-","line":"line2"},{"op":"+","line":"line2 changed"}]}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.002","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"a":{"type":"string","description":"Original text"},"b":{"type":"string","description":"New text"}},"required":["a","b"]},"example":{"a":"line1\nline2","b":"line1\nline2 changed"}}}}}},"/api/regex":{"post":{"operationId":"regex","summary":"Regex test ($0.001/call via x402)","description":"Run a regular expression against text. Returns up to 100 matches with index and capture groups. Pattern ≤ 200 chars, text ≤ 10KB.\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/regex","tags":["text"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"matchCount":1,"matches":[{"match":"a@b.com","index":11,"groups":["a","b.com"]}]}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pattern":{"type":"string","description":"Regex pattern (JS syntax, max 200 chars)"},"flags":{"type":"string","description":"Regex flags, e.g. gi (default g)"},"text":{"type":"string","description":"Text to search (max 10KB)"}},"required":["pattern","text"]},"example":{"pattern":"\\b(\\w+)@(\\w+\\.\\w+)\\b","flags":"g","text":"mail me at a@b.com"}}}}}},"/api/lorem":{"get":{"operationId":"loremGet","summary":"Lorem ipsum ($0.001/call via x402)","description":"Placeholder text. ?paragraphs=1..20 or ?words=1..2000.\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/lorem","tags":["text"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"text":"Lorem ipsum dolor sit amet…"}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","parameters":[{"name":"paragraphs","in":"query","required":false,"description":"1-20 (default 1)","schema":{"type":"string"}},{"name":"words","in":"query","required":false,"description":"Alternative: exact word count (1-2000)","schema":{"type":"string"}}]}},"/api/time":{"get":{"operationId":"timeGet","summary":"Current time ($0.001/call via x402)","description":"Current time: UTC ISO, epoch seconds/ms, day of week/year, ISO week — optionally rendered in any IANA timezone via ?tz=.\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/time","tags":["time"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"utc":"2026-06-11T10:00:00.000Z","epochSeconds":1781172000,"dayOfWeek":"Thursday","local":"2026-06-11 06:00:00 EDT"}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","parameters":[{"name":"tz","in":"query","required":false,"description":"IANA timezone (optional)","schema":{"type":"string"}}]}},"/api/time-convert":{"post":{"operationId":"time-convert","summary":"Time convert ($0.001/call via x402)","description":"Convert between epoch (s or ms), ISO 8601, and any IANA timezone. Give a value, get every representation back.\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/time-convert","tags":["time"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"utc":"2026-06-11T10:00:00.000Z","epochSeconds":1781172000,"epochMillis":1781172000000,"local":"2026-06-11 19:00:00 JST"}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"description":"Epoch seconds/ms, ISO string, or 'now'"},"tz":{"type":"string","description":"IANA timezone to render in (optional)"}},"required":["value"]},"example":{"value":1781172000,"tz":"Asia/Tokyo"}}}}}},"/api/cron-next":{"post":{"operationId":"cron-next","summary":"Cron next runs ($0.002/call via x402)","description":"Parse a 5-field cron expression and return the next N run times (UTC).\n\nPrice: $0.002 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/cron-next","tags":["time"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"expr":"*/15 9-17 * * 1-5","next":["2026-06-11T09:00:00.000Z"]}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.002","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expr":{"type":"string","description":"5-field cron: minute hour day-of-month month day-of-week"},"count":{"type":"number","description":"How many upcoming runs (1-20, default 5)"},"from":{"description":"Start time (epoch/ISO, default now)"}},"required":["expr"]},"example":{"expr":"*/15 9-17 * * 1-5","count":5}}}}}},"/api/duration":{"post":{"operationId":"duration","summary":"Duration parse/humanize ($0.001/call via x402)","description":"Parse a duration like \"2h30m\" / \"1d4h\" / \"90s\" to seconds, or humanize a number of seconds.\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/duration","tags":["time"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"seconds":9000,"human":"2h 30m","iso8601":"PT2H30M"}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"description":"Duration string (\"1d2h3m4s\") or number of seconds"}},"required":["value"]},"example":{"value":"2h30m"}}}}}},"/api/date-diff":{"post":{"operationId":"date-diff","summary":"Date difference ($0.001/call via x402)","description":"Difference between two dates/times in ms, seconds, minutes, hours, days, and a human summary.\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/date-diff","tags":["time"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"millis":13948800000,"days":161.4,"human":"161d 10h"}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"description":"Start (epoch/ISO)"},"to":{"description":"End (epoch/ISO, default now)"}},"required":["from"]},"example":{"from":"2026-01-01","to":"2026-06-11T10:00:00Z"}}}}}},"/api/email-validate":{"post":{"operationId":"email-validate","summary":"Email validate ($0.002/call via x402)","description":"Validate an email address: syntax check plus live MX record lookup on the domain (deliverability signal, not a guarantee).\n\nPrice: $0.002 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/email-validate","tags":["validation"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"email":"ada@example.com","syntaxValid":true,"domain":"example.com","mxRecords":["mail.example.com"],"deliverableDomain":true}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.002","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email address to check"}},"required":["email"]},"example":{"email":"ada@example.com"}}}}}},"/api/url-parse":{"post":{"operationId":"url-parse","summary":"URL parse ($0.001/call via x402)","description":"Parse a URL into components: protocol, host, port, path, query params (decoded), hash, origin, punycode hostname.\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/url-parse","tags":["validation"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"protocol":"https:","hostname":"ex.com","port":"8080","pathname":"/a/b","query":{"x":"1","y":"hello world"},"hash":"#frag"}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to parse"}},"required":["url"]},"example":{"url":"https://ex.com:8080/a/b?x=1&y=hello%20world#frag"}}}}}},"/api/ip-info":{"post":{"operationId":"ip-info","summary":"IP info ($0.002/call via x402)","description":"Classify an IP address: version, public/private/loopback/link-local, integer form, and reverse-DNS (PTR) lookup.\n\nPrice: $0.002 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/ip-info","tags":["validation"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"ip":"8.8.8.8","version":4,"scope":"public","ptr":["dns.google"]}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.002","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ip":{"type":"string","description":"IPv4 or IPv6 address"}},"required":["ip"]},"example":{"ip":"8.8.8.8"}}}}}},"/api/user-agent":{"post":{"operationId":"user-agent","summary":"User-agent parse ($0.001/call via x402)","description":"Heuristic user-agent string parser: browser, version, OS, device class, and bot detection.\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/user-agent","tags":["validation"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"browser":"Chrome","version":"125.0","os":"Windows","device":"desktop","bot":false}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ua":{"type":"string","description":"User-Agent header value"}},"required":["ua"]},"example":{"ua":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0 Safari/537.36"}}}}}},"/api/color":{"post":{"operationId":"color","summary":"Color convert ($0.001/call via x402)","description":"Convert a color between hex, RGB, and HSL. Accepts \"#1a2b3c\", \"rgb(26,43,60)\", or \"hsl(210,40%,17%)\".\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/color","tags":["validation"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"hex":"#4ade80","rgb":[74,222,128],"hsl":[142,69,58],"luminance":0.58}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"color":{"type":"string","description":"Color in hex, rgb(), or hsl() form"}},"required":["color"]},"example":{"color":"#4ade80"}}}}}},"/api/semver":{"post":{"operationId":"semver","summary":"Semver parse/compare ($0.001/call via x402)","description":"Parse a semantic version, or compare two (a vs b → -1/0/1, with greater/lesser flags).\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/semver","tags":["validation"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"a":{"major":2,"minor":4,"patch":0},"comparison":-1,"aGreater":false,"equal":false}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"a":{"type":"string","description":"Version to parse (or left side of compare)"},"b":{"type":"string","description":"Optional right side of compare"}},"required":["a"]},"example":{"a":"2.4.0","b":"2.10.1"}}}}}},"/api/mime":{"get":{"operationId":"mimeGet","summary":"MIME lookup ($0.001/call via x402)","description":"Look up a MIME type by file extension (?ext=png) or extensions by MIME type (?type=image/png). Covers ~50 common types.\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/mime","tags":["validation"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"ext":"webp","mime":"image/webp"}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","parameters":[{"name":"ext","in":"query","required":false,"description":"File extension (with or without dot)","schema":{"type":"string"}},{"name":"type","in":"query","required":false,"description":"MIME type to reverse-lookup","schema":{"type":"string"}}]}},"/api/iban-validate":{"post":{"operationId":"iban-validate","summary":"IBAN validate ($0.001/call via x402)","description":"Validate an IBAN: country code, length, and the ISO 13616 mod-97 checksum.\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/iban-validate","tags":["validation"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"valid":true,"country":"DE","formatted":"DE89 3704 0044 0532 0130 00"}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"iban":{"type":"string","description":"IBAN (spaces allowed)"}},"required":["iban"]},"example":{"iban":"DE89370400440532013000"}}}}}},"/api/card-validate":{"post":{"operationId":"card-validate","summary":"Card number validate ($0.001/call via x402)","description":"Validate a payment card number (Luhn checksum) and detect the brand. Numbers are not stored or logged.\n\nPrice: $0.001 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/card-validate","tags":["validation"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"valid":true,"brand":"visa","length":16}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.001","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"Card number (spaces/dashes allowed)"}},"required":["number"]},"example":{"number":"4242 4242 4242 4242"}}}}}},"/api/http-check":{"post":{"operationId":"http-check","summary":"HTTP check ($0.003/call via x402)","description":"Check any public URL: status code, latency, final URL after redirects, and response headers. The uptime primitive for agent monitors.\n\nPrice: $0.003 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/http-check","tags":["network"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"up":true,"status":200,"latencyMs":87,"finalUrl":"https://example.com/","headers":{"content-type":"text/html"}}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.003","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Public http(s) URL"},"method":{"type":"string","description":"GET (default) or HEAD"}},"required":["url"]},"example":{"url":"https://example.com"}}}}}},"/api/tls-cert":{"post":{"operationId":"tls-cert","summary":"TLS certificate ($0.003/call via x402)","description":"Inspect the TLS certificate of any public host: subject, issuer, validity window, days remaining, SANs, and SHA-256 fingerprint.\n\nPrice: $0.003 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/tls-cert","tags":["network"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"host":"example.com","issuer":"DigiCert","validTo":"2027-01-01T00:00:00.000Z","daysRemaining":204,"altNames":["example.com"]}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.003","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"host":{"type":"string","description":"Hostname (port 443)"}},"required":["host"]},"example":{"host":"example.com"}}}}}},"/api/whois":{"post":{"operationId":"whois","summary":"Domain WHOIS (RDAP) ($0.003/call via x402)","description":"Domain registration data via RDAP (the structured WHOIS successor): registrar, creation/expiry dates, status, nameservers.\n\nPrice: $0.003 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/whois","tags":["network"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"domain":"example.com","registrar":"IANA","created":"1995-08-14","expires":"2026-08-13","nameservers":["a.iana-servers.net"],"status":["client transfer prohibited"]}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.003","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"Domain name (registrable, e.g. example.com)"}},"required":["domain"]},"example":{"domain":"example.com"}}}}}},"/api/robots-check":{"post":{"operationId":"robots-check","summary":"Robots.txt check ($0.002/call via x402)","description":"Fetch a site's robots.txt and answer: may this user-agent crawl this path? Returns the matched rule and all declared sitemaps.\n\nPrice: $0.002 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/robots-check","tags":["network"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"allowed":true,"matchedRule":null,"sitemaps":["https://example.com/sitemap.xml"]}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.002","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"URL whose path to check"},"userAgent":{"type":"string","description":"User-agent token (default *)"}},"required":["url"]},"example":{"url":"https://example.com/some/page","userAgent":"MyAgent"}}}}}},"/api/sitemap":{"post":{"operationId":"sitemap","summary":"Sitemap reader ($0.003/call via x402)","description":"Fetch and parse a sitemap.xml (or sitemap index): returns up to 500 URLs with lastmod, or the child sitemaps of an index.\n\nPrice: $0.003 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/sitemap","tags":["network"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"example":{"type":"urlset","count":42,"urls":[{"loc":"https://example.com/","lastmod":"2026-06-01"}]}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.003","x-payment-protocol":"x402","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Sitemap URL (xml)"}},"required":["url"]},"example":{"url":"https://example.com/sitemap.xml"}}}}}},"/api/qr":{"get":{"operationId":"qrGet","summary":"QR code ($0.002/call via x402)","description":"Generate a QR code PNG from any text or URL. ?text=…&size=256 (128-1024).\n\nPrice: $0.002 per call, paid in USDC on Base via the x402 protocol. Unpaid requests receive HTTP 402 with payment requirements; any x402 v2 client can pay and retry automatically. Docs: https://agent402.tools/tools/qr","tags":["identifiers"],"responses":{"200":{"description":"Success","content":{"image/png":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid input"},"402":{"description":"Payment Required — x402 payment requirements in the response body/headers"}},"x-price":"$0.002","x-payment-protocol":"x402","parameters":[{"name":"text","in":"query","required":true,"description":"Content to encode (max 2KB)","schema":{"type":"string"}},{"name":"size","in":"query","required":false,"description":"Image width px (128-1024, default 256)","schema":{"type":"string"}}]}}}}