{"openapi":"3.1.0","info":{"title":"Doc Tools","version":"1.1.0","contact":{"name":"AgentPay","email":"nasilver20@gmail.com","url":"https://github.com/noah-silver/agentpay"},"description":"Document utilities agents otherwise have to install libraries for: extract per-page text from a PDF URL, normalize RSS/Atom/JSON feeds into JSON items, and crawl a site's sitemaps (via robots.txt) into a URL list.\n\nPay per call with x402 v2 in USDC on Algorand (algorand:wGHE2Pwdvd7S12BL5FaOP20EGYesN73k) or Base (eip155:8453), or use a prepaid credits key."},"servers":[{"url":"https://agentpay.agentpay-apis.workers.dev"}],"paths":{"/tools/v1/pdf-text":{"get":{"operationId":"tools_pdf_text","tags":["Doc Tools"],"summary":"Extract per-page text from a PDF URL (up to 20MB).","description":"Extract per-page text from a PDF URL (up to 20MB). Price per call: $0.01 USDC via x402, or from prepaid credits.","parameters":[{"name":"url","in":"query","required":true,"description":"URL of a PDF","schema":{"type":"string"},"example":"https://example.com/file.pdf"}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]},"x-x402":{"accepts":[{"scheme":"exact","network":"algorand:wGHE2Pwdvd7S12BL5FaOP20EGYesN73k","amount":"10000","asset":"31566704","payTo":"F2ZYO2DDPQXOACUYBYQIHMQRAB3TJFZVCNUD3OU3CR5OOJUKFZOF5EYVJ4","maxTimeoutSeconds":60,"extra":{}},{"scheme":"exact","network":"eip155:8453","amount":"10000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x5d5d827D899CdcaCbD2b2e80162D805B3783C9D8","maxTimeoutSeconds":60,"extra":{"name":"USD Coin","version":"2"}}]},"security":[],"responses":{"200":{"description":"Success (JSON)"},"400":{"description":"Invalid input (rejected before any payment)"},"402":{"description":"Payment required. x402 v2 PaymentRequired in the PAYMENT-REQUIRED header (base64); v1-compatible JSON body."}}}},"/tools/v1/feed":{"get":{"operationId":"tools_feed","tags":["Doc Tools"],"summary":"Parse an RSS, Atom or JSON Feed into normalized JSON items.","description":"Parse an RSS, Atom or JSON Feed into normalized JSON items. Price per call: $0.005 USDC via x402, or from prepaid credits.","parameters":[{"name":"url","in":"query","required":true,"description":"Feed URL","schema":{"type":"string"},"example":"https://hnrss.org/frontpage"},{"name":"limit","in":"query","required":false,"description":"Max items (default 50)","schema":{"type":"integer"}}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{}}]},"x-x402":{"accepts":[{"scheme":"exact","network":"algorand:wGHE2Pwdvd7S12BL5FaOP20EGYesN73k","amount":"5000","asset":"31566704","payTo":"F2ZYO2DDPQXOACUYBYQIHMQRAB3TJFZVCNUD3OU3CR5OOJUKFZOF5EYVJ4","maxTimeoutSeconds":60,"extra":{}},{"scheme":"exact","network":"eip155:8453","amount":"5000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x5d5d827D899CdcaCbD2b2e80162D805B3783C9D8","maxTimeoutSeconds":60,"extra":{"name":"USD Coin","version":"2"}}]},"security":[],"responses":{"200":{"description":"Success (JSON)"},"400":{"description":"Invalid input (rejected before any payment)"},"402":{"description":"Payment required. x402 v2 PaymentRequired in the PAYMENT-REQUIRED header (base64); v1-compatible JSON body."}}}},"/tools/v1/sitemap":{"get":{"operationId":"tools_sitemap","tags":["Doc Tools"],"summary":"List a site's URLs from its sitemaps (follows robots.txt and sitemap indexes).","description":"List a site's URLs from its sitemaps (follows robots.txt and sitemap indexes). Price per call: $0.005 USDC via x402, or from prepaid credits.","parameters":[{"name":"url","in":"query","required":true,"description":"Site origin or sitemap URL","schema":{"type":"string"},"example":"https://example.com"},{"name":"limit","in":"query","required":false,"description":"Max URLs (default 5000)","schema":{"type":"integer"}}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{}}]},"x-x402":{"accepts":[{"scheme":"exact","network":"algorand:wGHE2Pwdvd7S12BL5FaOP20EGYesN73k","amount":"5000","asset":"31566704","payTo":"F2ZYO2DDPQXOACUYBYQIHMQRAB3TJFZVCNUD3OU3CR5OOJUKFZOF5EYVJ4","maxTimeoutSeconds":60,"extra":{}},{"scheme":"exact","network":"eip155:8453","amount":"5000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x5d5d827D899CdcaCbD2b2e80162D805B3783C9D8","maxTimeoutSeconds":60,"extra":{"name":"USD Coin","version":"2"}}]},"security":[],"responses":{"200":{"description":"Success (JSON)"},"400":{"description":"Invalid input (rejected before any payment)"},"402":{"description":"Payment required. x402 v2 PaymentRequired in the PAYMENT-REQUIRED header (base64); v1-compatible JSON body."}}}},"/credits/buy":{"get":{"operationId":"credits_buy","summary":"Buy prepaid credits with one x402 payment ($1-$500); returns an API key.","parameters":[{"name":"usd","in":"query","required":false,"schema":{"type":"number","default":1},"example":1}],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"1"},"protocols":[{"x402":{}}]},"security":[],"responses":{"200":{"description":"{ apiKey, credit, creditHuman, transaction, network }"},"402":{"description":"Payment required"}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Prepaid credits key from /credits/buy or /credits/redeem."},"x402":{"type":"apiKey","in":"header","name":"PAYMENT-SIGNATURE","description":"x402 v2 payment payload (base64 JSON). X-PAYMENT (v1) also accepted for Base."}}}}