QR.OPTIC API v1

Generate styled QR codes programmatically. Cache-first: each unique QR is generated once and served forever.

Authentication

Free tier: no auth required (10 req/min per IP).

Premium: pass X-API-Key header or ?api_key= query param (60 req/min).

Get your key at patreon.html after becoming a supporter.

Endpoints

GET /api/qr

Generate and return an SVG QR code.

curl "/api/qr?data=https://example.com&color=%2384cc16&bg=%23ffffff&mode=gradient&color2=%2322c55e&dotType=extra-rounded&cornerType=dot"
ParamTypeDefaultTier
datastringrepo URLfree
colorhex#000000free
bghex#fffffffree
modesingle | gradientsinglepremium
color2hexpremium
dotTypesquare, rounded, extra-rounded, dots, classysquarepremium
cornerTypesquare, extra-rounded, dotsquarepremium
sizepx300free: ≤300, premium: ≤2000

POST /api/qr/generate

Same as GET but accepts JSON body. Returns { url, cached }.

Add ?dl=1 to download the SVG directly instead of getting JSON.

curl -X POST /api/qr/generate \
  -H "Content-Type: application/json" \
  -H "X-API-Key: qropt_..." \
  -d '{"data":"https://example.com","dotType":"dots"}'
curl -X POST "/api/qr/generate?dl=1" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: qropt_..." \
  -d '{"data":"https://example.com"}' \
  -o qr-code.svg

GET /api/qr/:hash

Retrieve a previously generated QR by its cache hash.

POST /api/key/create

Create a new API key (requires Patreon supporter session).

Pricing

FreeTier 1 ($3)Tier 2 ($10)Tier 3 ($50)
Rate limit10/min60/min120/min300/min
Dot typessquare onlyallallall
Gradient
Max size300px600px1000px2000px
API key✓ (3 keys)✓ (10 keys)

Sunucu Durumu →   ← QR.OPTIC Ana Sayfa