{"uid":"cap_In-dPVSeLWJJ_vCiy-U_U","slug":"47620-qr-code-generator-api-e868a889","name":"47620 QR Code Generator API","description":"Generate a QR code for any text/URL and return it as an inline SVG (and a base64 data URI). Query: ?text=<content> (required), size=<px per module, default 6> and margin=<modules, default 4>. Pure CPU, no external service.","url":"https://47620.xyz/x/util/qr?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","properties":{"fields":{"type":"string","description":"Optional comma-separated top-level response keys to keep (e.g. \"health,slot,solUsd\"). Omit for the full payload."}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type","example"],"properties":{"type":{"type":"string","const":"json"},"example":{"type":"object","required":["ok","endpoint"],"properties":{"ok":{"type":"boolean"},"endpoint":{"type":"string"}},"additionalProperties":true}},"additionalProperties":false}}},"responseSchema":null,"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_YoQ18-tWmg74z5lCEtj9V","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates a QR code for any text or URL and returns it as an inline SVG and base64 data URI, processed entirely on-server with no external dependencies.","exampleAgentPrompt":"Generate a QR code for https://mystore.com/promo with a module size of 8 pixels and a margin of 2 modules, and give me the SVG I can embed directly in my webpage.","exampleUseCases":[{"title":"Embed QR code in email campaign","prompt":"Create a QR code for https://sale.mybrand.com/summer using a module size of 6 and margin of 4, and return the inline SVG so I can paste it into my HTML email."},{"title":"QR code for Wi-Fi credentials","prompt":"Generate a QR code that encodes the text WIFI:S:MyNetwork;T:WPA;P:MyP@ssword;; — I want the SVG version to print and stick on my router."},{"title":"Dynamic product label QR code","prompt":"Make a QR code for the URL https://products.example.com/item/98765 with a larger module size of 10 pixels so it's easy to scan from a printed label."}],"resultDescription":"Returns a JSON object containing an inline SVG string of the QR code and a base64-encoded data URI, both representing the QR code for the provided text or URL. The SVG can be embedded directly in HTML and the data URI can be used as an image src attribute.","failureModes":["Missing required 'text' query parameter returns an error response","Extremely long text strings may produce very large QR codes or exceed encoding capacity","Invalid or non-integer values for 'size' or 'margin' parameters may return errors or fall back to defaults","Payment of 0.002 USDC via x402 required; missing or invalid payment header returns 402 Payment Required"],"whenToPreferThis":"Choose this endpoint when you need server-side, dependency-free QR code generation with no calls to external image services (Google Charts, QR.io, etc.), and when you need the output as a portable inline SVG or base64 data URI that can be embedded directly in HTML or used as an image source without hosting a file. Ideal for agents automating document generation, email campaigns, or product labeling where privacy and self-containment matter.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T00:46:47.954Z","isFirstParty":false,"canonicalSlug":"47620-qr-code-generator-api-e868a889"}