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
| Name | Type | Description |
|---|---|---|
| data | string (required) | Content encoded in the QR (URL, text, vCard, Wi-Fi string, etc.) |
| format | png | svg | Output format. Defaults to png. |
| size | 64 – 2048 | Output dimensions in pixels. Defaults to 512. |
| margin | 0 – 16 | Quiet-zone modules around the QR. Defaults to 2. |
| ecl | L | M | Q | H | Error correction level (~7% / 15% / 25% / 30% recovery). Defaults to M. |
| dark | hex (no #) | Foreground color, e.g. 0b0f19. Defaults to black. |
| light | hex (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.