{"uid":"cap_4DJnE8Wr-chNGB4Qy0E0R","slug":"toolrail-qr-code-generator-ca9aa4c6","name":"Toolrail QR Code Generator","description":"Generate a QR code as PNG or SVG from any text or URL (up to 2000 chars, 64-2048 px). Pairs with the PDF endpoint for payment links and labels. Use when you need a scannable QR image for a URL, payment link or label.","url":"https://toolrail.dev/qr?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"data":{"type":"string"},"size":{"type":"integer"},"format":{"type":"string"}}},"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_Gg64OX2vVu2MHxFPe72eg","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 image (PNG or SVG) from any text or URL, with configurable size up to 2048px.","exampleAgentPrompt":"Generate a PNG QR code at 512 pixels for this payment link: https://pay.example.com/invoice/abc123 — I want to add it to a receipt label.","exampleUseCases":[{"title":"QR code for a payment link","prompt":"Create a 512px PNG QR code for this Coinbase Commerce payment link https://commerce.coinbase.com/pay/abc123 so I can print it on an invoice."},{"title":"SVG QR code for a product label","prompt":"Generate an SVG QR code for the URL https://myshop.com/products/widget-pro at 256 pixels — I need to embed it on a product label."},{"title":"QR code for a Wi-Fi login","prompt":"Make a 400 pixel PNG QR code that encodes the text WIFI:S:MyNetwork;T:WPA;P:hunter2;; so guests can scan and connect to my Wi-Fi."}],"resultDescription":"Returns a QR code image file — either a PNG bitmap or an SVG vector — encoding the provided text or URL. The image dimensions are determined by the requested size parameter (64–2048 px).","failureModes":["Input data exceeds 2000 character limit — request rejected","Invalid size value outside 64–2048 px range — error returned","Unsupported format value (not PNG or SVG) — error returned","Empty or missing data field — error returned","Payment not fulfilled (x402 protocol) — 402 response before image is returned"],"whenToPreferThis":"Choose this endpoint when you need a quick, programmatic QR code image (PNG or SVG) from any text or URL, especially when chaining with the Toolrail PDF endpoint to produce payment links or printable labels. It is ideal for agent workflows that generate invoices, shipping labels, or product packaging requiring a scannable code without relying on a browser-based tool.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T12:49:06.992Z","isFirstParty":false,"canonicalSlug":"toolrail-qr-code-generator-ca9aa4c6"}