$ man qr-code-generate
/qr-code-generate(1)
PRICE / CALL
$0.001
USDC · base mainnet · scheme: exact
METHOD
POST
CLUSTER
webprobeCATEGORY
uncategorized
STATUS
● live
NAME
qr-code-generate — qr code generator / qr maker / vcard qr / wifi qr / url to qr / svg qr / png qr / customizable error correction
SYNOPSIS
POST https://x402.org/v1/qr-code-generate
Content-Type: application/json
X-PAYMENT: <signed-transferWithAuthorization>
{ ... }↳ first call →
402 Payment Required. Sign USDCtransferWithAuthorization, retry with theX-PAYMENT header.DESCRIPTION
QR code generator / QR maker / vCard QR / WiFi QR / URL to QR / SVG QR / PNG QR / customizable error correction. Generates a QR code from arbitrary text — URL, vCard, WiFi join string, plain text — and returns it as a base64-encoded PNG (default) or SVG. Configurable size (64-1024 px), error correction level (L/M/Q/H), quiet-zone margin, and foreground/background hex colors. Pure JS encoder via the qrcode npm package — no upstream API call, deterministic output.
INPUT — request schema
| property | type | description | req? |
|---|---|---|---|
| text | string | Text to encode. Any string up to ~4296 chars (alphanumeric). | required |
| format | string | Output image format. Default 'png'. enum: png · svg | optional |
| size | number | Image side length in pixels. Range [64, 1024]. Default 256. | optional |
| error_correction | string | Reed-Solomon error-correction level. L=7%, M=15% (default), Q=25%, H=30% redundancy. enum: L · M · Q · H | optional |
| margin | number | Quiet-zone margin in modules. Range [0, 20]. Default 4. | optional |
| foreground | string | QR module color as 6 or 8-digit hex (e.g. '#000000'). Default '#000000'. | optional |
| background | string | Background color as 6 or 8-digit hex (e.g. '#FFFFFF'). Default '#FFFFFF'. | optional |
OUTPUT — response shape
| field | type | description |
|---|---|---|
| format | string | Output image format returned, either "png" (default, base64-encoded) or "svg" (XML markup). |
| size | string | Pixel dimensions of the square QR image (e.g. "256x256"), reflecting the requested size parameter. |
| data_base64 | string | Base64-encoded QR image bytes (PNG) or the raw SVG markup string, depending on the requested format. |
| content_type | string | MIME type of the encoded payload, either image/png or image/svg+xml, for direct embedding or decoding. |
| source | string | Generator identifier, always "qrcode-npm" since encoding happens locally with no upstream API call. |
EXAMPLES — two ways to call
EXAMPLE 1 · curl
curl -X POST https://x402.org/v1/qr-code-generate \
-H 'Content-Type: application/json' \
-d '{ }'first response =
402 Payment Required with payment requirements; sign + retry with X-PAYMENT.EXAMPLE 2 · mcp
# install once claude mcp add x402 --command "npx x402-deployer-mcp" # then ask Claude Code: # "use the qr-code-generate tool to ..."
MCP server handles payment automatically — your coding agent just calls the tool by name.
METADATA
- tags
- qr-codeqr-generatorbarcodevcardwifi-qrsvgpngqr-encoder
- methods
- POST
- cluster
- webprobe
- price
- $0.001 USDC per call
ADJACENT — other endpoints in webprobe
| endpoint | description | price |
|---|---|---|
| hacker-news-search | Hacker News search / HN search / yc-news / Algolia HN. | $0.001 |
| hn-search | HN search / Hacker News search / yc-news / startup-news search / Algolia HN / who-is-hiring scraper / programmer-news firehose. | $0.001 |
| ip-asn | IP to ASN / IP geolocation / IP-to-ISP lookup / WHOIS for IP / cloud-provider attribution. | $0.001 |
| tld-info | TLD info / top-level domain registry lookup / ccTLD vs gTLD / TLD introduction year / new gTLD registry. | $0.001 |
| user-agent-parse | User-Agent parser / UA classifier / browser detection / OS detection / bot detection / AI crawler identifier (GPTBot, ClaudeBot, Perplexi… | $0.001 |
| arxiv-bibtex | arXiv to BibTeX / arxiv citation generator / paper bibtex / LaTeX citation builder / academic citation lookup. | $0.002 |
| github-readme | GitHub README fetch / repo readme / open-source-readme-as-markdown / package documentation puller. | $0.002 |
| keyword-suggest | Keyword autocomplete / search suggest / SEO keyword research / query expansion / autocomplete suggestions. | $0.002 |
SEE ALSO