{"uid":"cap_qNcgEkA2-n2wGtTKNJIcI","slug":"402utils-qr-code-generator-2bb57c38","name":"402utils QR Code Generator","description":"Generate a QR code as PNG or SVG from any text or URL. Pick the size, error-correction level (L/M/Q/H) and foreground/background colours; a 4-module quiet zone is always included so it scans reliably. Returns the raw image bytes. No logo overlay (compositing is out of scope).","url":"https://402utils.com/v1/qr","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"bg":{"type":"string","description":"Background hex colour (default #ffffff)."},"fg":{"type":"string","description":"Foreground hex colour (default #000000)."},"data":{"type":"string","description":"Text or URL to encode (max 2 KB)."},"size":{"type":"integer","default":512,"maximum":1024,"minimum":128,"description":"Output size in px."},"format":{"enum":["png","svg"],"type":"string","default":"png"},"ecLevel":{"enum":["L","M","Q","H"],"type":"string","default":"M","description":"Error-correction level."}}},"responseSchema":{"type":"json","example":"<binary image/png stream>"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_nz3dkqt-m3ddzWjKX_hd0","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates a QR code as PNG or SVG from any text or URL, with configurable size, error-correction level, and colors.","exampleAgentPrompt":"Generate a 512px PNG QR code for https://myshop.example.com using high error-correction (H level), with a dark blue foreground (#003366) on a white background.","exampleUseCases":null,"resultDescription":"Raw image bytes of the generated QR code in the requested format (PNG or SVG), ready for display or embedding. The image always includes a 4-module quiet zone for reliable scanning.","failureModes":["Input data exceeds 2 KB limit — returns an error about data length","Invalid hex color format for fg/bg — returns a validation error","Requested size outside 128–1024px range — returns a validation error","Invalid ecLevel value (not L/M/Q/H) — returns a validation error","Payment not provided or insufficient — returns HTTP 402"],"whenToPreferThis":"Use this endpoint when you need to programmatically generate a QR code image (PNG or SVG) from a URL or text string, especially when you need fine-grained control over error-correction level, image size, and custom colors. It is a simple, stateless, pay-per-call endpoint with no logo overlay support — ideal for automation pipelines that need reliable, scannable QR codes without dependencies on a hosted dashboard.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:48:30.955Z","isFirstParty":false}