API documentation

A single stateless endpoint. Hit it from any HTTP client and get back a QR code.

Endpoint

GET /api/public/qr

Query parameters

NameTypeDescription
datastring (required)Content encoded in the QR (URL, text, vCard, Wi-Fi string, etc.)
formatpng | svgOutput format. Defaults to png.
size64 – 2048Output dimensions in pixels. Defaults to 512.
margin0 – 16Quiet-zone modules around the QR. Defaults to 2.
eclL | M | Q | HError correction level (~7% / 15% / 25% / 30% recovery). Defaults to M.
darkhex (no #)Foreground color, e.g. 0b0f19. Defaults to black.
lighthex (no #)Background color, e.g. ffffff. Defaults to white.

Example

curl -L "https://b2bqr.app/api/public/qr?data=https://example.com&format=svg&size=512&ecl=H" \
  -o qr.svg

Response

The response body is the raw image bytes with Content-Type: image/png or image/svg+xml. Non-2xx responses return a JSON body { "error": "..." }.

Rate limits

Free: 50 generations per IP per day. Pro: 1,000 API calls per month. Business: 50,000 API calls per month with team key support. See pricing.