{"uid":"cap_oLa_nCcoP5nT76uSBEnH7","slug":"qr-code-generator-api-x402-47b41bca","name":"QR Code Generator API (x402)","description":"QR code generator: text, URL, payment URI (e.g. ethereum:/USDC request) or Wi-Fi credentials (ssid + password) to a QR code as SVG (inline + data URI) and/or GIF data URI. Error correction L/M/Q/H, scale, quiet-zone margin, colours, optional 0/1 module matrix. UTF-8 byte mode, computed locally, nothing stored.","url":"https://freetier-agent-api.pages.dev/api/qr-code?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":[],"properties":{"ecc":{"enum":["L","M","Q","H"],"type":"string","description":"error correction, default M"},"auth":{"enum":["WPA","WEP","nopass"],"type":"string","description":"Wi-Fi security, default WPA when a password is given"},"dark":{"type":"string","description":"hex colour, default 000000 (svg only)"},"ssid":{"type":"string","description":"Wi-Fi network name (instead of text) -> WIFI: QR"},"text":{"type":"string","description":"content to encode, up to 2,000 characters"},"light":{"type":"string","description":"hex colour, default ffffff (svg only)"},"scale":{"type":"string","description":"pixels per module, 1-40, default 8"},"format":{"enum":["svg","gif","both"],"type":"string","description":"default svg"},"margin":{"type":"string","description":"quiet zone in modules, 0-20, default 4"},"matrix":{"enum":["true","false"],"type":"string","description":"true adds rows of 0/1"},"password":{"type":"string","description":"Wi-Fi password (with ssid)"}}}}},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"ecc":{"type":["string","null"]},"svg":{"type":["string","null"]},"kind":{"type":["string","null"]},"more":{"type":"object","properties":{"note":{"type":["string","null"]},"full_datasets":{"type":["string","null"]}}},"note":{"type":["string","null"]},"text":{"type":["string","null"]},"bytes":{"type":["number","null"]},"scale":{"type":["number","null"]},"margin":{"type":["number","null"]},"matrix":{"type":"array","items":{"type":["string","null"]}},"library":{"type":["string","null"]},"modules":{"type":["number","null"]},"size_px":{"type":["number","null"]},"version":{"type":["number","null"]},"gif_data_uri":{"type":["string","null"]},"svg_data_uri":{"type":["string","null"]}}}}}}},"responseSchema":{"type":"json","example":{"ecc":"M","svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 74 74\" width=\"74\" height=\"74\" shape-rendering=\"crispEdges\"><rect width=\"100%\" height=\"100%\" fill=\"#fffff...","kind":"text","more":{"note":"Full dataset downloads available by card","full_datasets":"https://freetier-kits-shop.fourthwall.com"},"note":"Byte mode, UTF-8. Keep the margin (quiet zone) at 4 for reliable scanning. QR Code is a registered trademark of DENSO WAVE INCORPORATED.","text":"https://freetier-agent-api.pages.dev","bytes":36,"scale":2,"margin":4,"matrix":["11111110100100111010101111111","10000010101110000001101000001"],"library":"qrcode-generator 2.0.4 (MIT, Kazuhiko Arase)","modules":29,"size_px":74,"version":3,"gif_data_uri":"data:image/gif;base64,R0lGODdhSgBKAIAAAAAAAP///ywAAAAASgBKAAAC/4yPqcvtD6OctNqLs968+w+G4kiWZgKk6roaKfIeLODSQTzntqTPNby7sX7CWk9FiTFwNt+jVWwoI1MF04h8ZquoIIQJBee...","svg_data_uri":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA3NCA3NCIgd2lkdGg9Ijc0IiBoZWlnaHQ9Ijc0IiBzaGFwZS1yZW5kZXJpbmc..."}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0015","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.0015/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0015","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0015","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_bXztrxj4bTcooDL2gIQud","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0015","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates QR codes from text, URLs, or Wi-Fi credentials, returning SVG/GIF images and metadata, paid per call via x402 USDC on Base.","exampleAgentPrompt":"Generate a QR code for https://mystore.example.com in SVG format with high error correction (H level), a scale of 6, and use dark color #1a1a2e on a white background.","exampleUseCases":[{"title":"Shareable link QR for event","prompt":"Make a QR code for https://myevent.example.com/register in SVG format with scale 10 and a dark navy color #001f54 — I want to print it on flyers."},{"title":"Wi-Fi guest network QR code","prompt":"Generate a Wi-Fi QR code for my network called GuestNet with WPA security and password Sunshine2024! — give me both SVG and GIF versions."},{"title":"High-reliability QR for product packaging","prompt":"Create a QR code encoding the text 'Scan to activate warranty at https://warranty.myco.com' with error correction set to H and a margin of 6 so it survives being printed on rough packaging."}],"resultDescription":"Returns a JSON object containing the rendered SVG markup, base64-encoded GIF data URI, base64-encoded SVG data URI, QR version number, module count, pixel dimensions, error correction level (ecc), scale, margin, byte count, encoding mode (e.g. 'text'), and optionally a binary matrix array of 0/1 rows. All image data is ready to embed directly in HTML or save to file.","failureModes":["Text exceeds 2,000 characters — QR capacity exceeded, no code generated","Invalid hex color value for dark/light parameters — may default or error","Invalid scale value outside 1–40 range — rejected or defaulted","Missing required `text` or `ssid` parameter — API returns error","x402 payment failure (insufficient USDC balance or wrong network) — 402 response, no output","Invalid ecc value — must be L, M, Q, or H"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, no-signup QR code generator that returns both SVG and GIF formats with full metadata (matrix, version, size), supports Wi-Fi QR codes, allows custom colors, and charges only $0.0015 USDC per call via x402 with no API key required. Prefer it for agent workflows where pay-per-use micropayments are acceptable and no persistent account is needed.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-20T00:34:38.364Z","isFirstParty":false,"canonicalSlug":"qr-code-generator-api-x402-47b41bca"}