QR API

Send text and receive the image directly. There are no accounts, redirects, generated IDs, or stored payloads.

POST /api/v1/qr

Request

application/json
curl https://tsurette.com/api/v1/qr \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
    "data": "https://tsurette.com",
    "format": "svg",
    "errorCorrection": "L",
    "size": 1024,
    "style": {
      "foreground": "#17152b",
      "background": "#ffffff",
      "margin": 4,
      "moduleShape": "square",
      "finderStyle": "square"
    }
  }' \
  --output qr.svg

Defaults

format
svg
errorCorrection
L
size
1024
margin
4 modules
moduleShape
square
finderStyle
square

PNG dimensions are rounded down so every module remains the same whole-pixel size. SVG remains fully scalable.

Response

A successful request returns raw image/svg+xml or image/png bytes. QR version, grid size, image size, and error correction are included as response headers.

Limits

  • 5 requests per minute per IP
  • Over-limit requests return 429
  • 16 KB request bodies
  • 128–2048 px output size

The generator at /qr is local, unlimited, and available offline after the first visit.

Scanner-safe output

Version and mask are selected automatically for the smallest fitting symbol. Margins smaller than four modules, inverted colors, and color pairs below 4.5:1 contrast are rejected. Module shapes can be square, rounded, or dots; corner markers can be square, rounded, or circular.

Center logos stay browser-only so the API never has to accept, fetch, or process uploaded images.