edobleedoble QR

edoble QR API

A simple, database-free REST endpoint for generating QR codes on demand. Use it to integrate QR generation into your own apps and services.

Endpoint

GET  /api/qrcode
POST /api/qrcode

Parameters

FieldTypeDefaultDescription
textstringrequiredContent to encode (URL, text, etc.)
formatstringpngpng | svg | base64
sizenumber512Image width in px (64–2048)
marginnumber2Quiet zone size (0–10)
eccstringMError correction: L | M | Q | H
darkhex color#202089Foreground color
lighthex color#FFFFFFBackground color

GET example

curl "https://your-domain.vercel.app/api/qrcode?text=https://edoble.com&size=512&dark=%23202089" \
  -o qrcode.png

POST example

curl -X POST https://your-domain.vercel.app/api/qrcode \
  -H "Content-Type: application/json" \
  -d '{
    "text": "https://edoble.com",
    "format": "base64",
    "size": 512,
    "dark": "#202089",
    "light": "#FFFFFF"
  }'

Response

format=png or format=svg return the image directly (image/png or image/svg+xml). format=base64 returns JSON:

{ "dataUrl": "data:image/png;base64,..." }

Notes

  • No API key required, no database — every request is generated on the fly.
  • CORS is enabled for all origins so you can call it from the browser.
  • Rate limiting / auth can be added later without changing the response shape.