---
title: "QR code generator"
method: GET
path: "/api/qr"
tags: ["Design & Assets"]
---

# QR code generator

`GET /api/qr`

## Request

- Base URL: `https://api.webbersites.com`
- URL: `https://api.webbersites.com/api/qr`
- Auth: API key in header `X-PAYMENT`

QR code generator: GET ?data=<text|url> and receive a scannable QR as SVG plus PNG (base64) and a data: URI. Options: size (px, default 512), margin (quiet-zone modules, default 2), ecc (L|M|Q|H, default M), dark/light hex colors. Deterministic, no network, no tracking — encode URLs, wifi, vCards, or payment URIs up to 2,000 chars.

Price: $0.01 per call, paid in USDC via the x402 protocol (see the x402 security scheme).

## Query parameters

- `data` string, required
- `size` number
- `margin` number
- `ecc` string
- `dark` string
- `light` string

## Response `200`

Success

- object
  - `data` string
  - `version` number
  - `ecc` string
  - `width` number
  - `svg` string
  - `png_base64` string
  - `data_uri` string

## Other responses

- `402`: Payment required — the response body lists accepted payment methods (amount, asset, network, pay-to address). Retry the request with a signed X-PAYMENT header.

---

[API](https://skmtc.dev/webbersites/apis/webbersites-x402-data-api.md) · [All operations](https://skmtc.dev/webbersites/apis/webbersites-x402-data-api/llms.txt) · [OpenAPI document](https://skmtc.dev/webbersites/apis/webbersites-x402-data-api/revisions/c14a76c67a94?raw)
