{"uid":"cap_gajA3Fe51da2toSdOT5v_","slug":"qr-code-generator-svg-110561d8","name":"QR Code Generator (SVG)","description":"Use when you need a qr code generator for a URL, text, Wi-Fi or payment link as an SVG image. Do not use for reading or decoding an existing QR code, logos, colored codes or PNG output. Returns JSON with a QR code for your text or URL as SVG markup and an SVG data URL, with error correction level and border options, generated by the uqr library for 0.004 USDC per call. Typical response time 500 ms (p95). Category: Media.","url":"https://x402-gateway.blackwoodstate8.workers.dev/v1/qr-code?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["text"],"properties":{"ecc":{"enum":["L","M","Q","H"],"type":"string","description":"Error correction level: L 7%, M 15% (default), Q 25%, H 30%"},"text":{"type":"string","maxLength":2000,"minLength":1,"description":"Text or URL to encode, e.g. https://example.com (up to 2000 characters)"},"border":{"type":"integer","maximum":10,"minimum":0,"description":"Quiet zone around the code, in modules (default 2)"},"pixelSize":{"type":"integer","maximum":20,"minimum":1,"description":"SVG units per module (default 10)"}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["svg","dataUrl","version","modules","ecc","bytes"],"properties":{"ecc":{"type":"string"},"svg":{"type":"string"},"next":{"type":"object","required":["service","tool","method","url","useWhen","sample"],"properties":{"url":{"type":"string","description":"Paid route of the next call"},"tool":{"type":"string","description":"MCP tool name of the same call"},"method":{"enum":["GET","POST"],"type":"string"},"sample":{"type":"string","description":"Free fixed sample of the whole family"},"service":{"type":"string","description":"Service id of the suggested next paid call"},"useWhen":{"type":"string","description":"When the next call is the right one"}},"description":"Suggested next paid call in the same family (call it in a loop when the task continues)","additionalProperties":false},"bytes":{"type":"number"},"dataUrl":{"type":"string"},"modules":{"type":"number"},"version":{"type":"number"}},"additionalProperties":false}}}}},"responseSchema":{"type":"json","example":{"ecc":"M","svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 370 370\"><r...(10900 characters)","bytes":10900,"dataUrl":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcm...(14562 characters)","modules":37,"version":4}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_qBcX8YHAt-80528Co6D51","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates a QR code as SVG markup and data URL from a text string or URL, with configurable error correction and border settings","exampleAgentPrompt":"Generate a QR code SVG for https://example.com with high error correction (H) and a border of 3 modules.","exampleUseCases":[{"title":"QR code for a product landing page","prompt":"Create a QR code for https://myshop.com/product/shoes — use medium error correction and a 2-module border, and give me the SVG so I can embed it in the packaging design."},{"title":"Wi-Fi sharing QR code","prompt":"Generate an SVG QR code for this Wi-Fi credentials string: WIFI:T:WPA;S:HomeNetwork;P:mypassword123;; — use high error correction so it scans easily even if the printout is a bit crumpled."},{"title":"Payment link QR for invoice","prompt":"Make a QR code for this payment link https://pay.example.com/invoice/INV-2024-0042 with Q-level error correction and a border of 4, I want the SVG markup to put on a printed invoice."}],"resultDescription":"Returns a JSON object containing the full SVG markup of the QR code, an SVG data URL suitable for embedding in HTML or CSS, the QR version number, the number of modules, the error correction level used, and the byte size of the encoded data.","failureModes":["Text exceeds 2000 characters — request rejected with validation error","Invalid error correction level enum value — rejected","pixelSize or border out of allowed range — rejected","Empty or missing text field — rejected","Payment not authorized or insufficient USDC balance — payment failure"],"whenToPreferThis":"Choose this endpoint when you need a QR code returned as an SVG (not PNG or other raster format) and do not require logos, color customization, or decoding of existing QR codes. It is ideal for programmatic embedding in web pages, PDFs, or print assets where vector format is preferred.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T18:42:26.627Z","isFirstParty":false,"canonicalSlug":"qr-code-generator-svg-110561d8"}