Skip to content
Upgfrog.online

API

One endpoint, styled SVG out

The same renderer the website uses, exposed over HTTP. No API key, no rate-limit tier, no account. Point it at your own deployment of this app.

Endpoint

GETPOST/api/qr

GET takes query parameters, POST takes a JSON body with the same keys. Both return an image/svg+xml document, or a JSON object with an error field and status 400 when something is wrong.

Responses are safe to cache indefinitely — the same parameters always produce the same image. CORS is open, so browser-side calls work.

Examples

curl -o qr.svg \
  "https://your-domain.example/api/qr?data=https%3A%2F%2Fupfrog.online&size=800&dotType=extra-rounded&foregroundStyle=linear&gradientColorA=%2315803d&gradientColorB=%230369a1"

What comes back

Rendered by the endpoint above with a linear gradient and extra-rounded modules.

Parameters

NameTypeDefaultNotes
datastringrequiredThe content to encode. Up to 2,000 characters.
sizenumber512Edge length in pixels, 64–4000.
marginnumber4% of sizeQuiet zone in pixels.
eccL | M | Q | HQError correction level. Use H with a logo.
shapesquare | circlesquareOutline of the whole code.
dotTypesquare | dots | rounded | extra-rounded | classy | classy-roundedsquareModule shape.
cornerSquareTypesquare | dot | extra-rounded | rounded | dots | classysquareCorner frame shape.
cornerDotTypesquare | dot | extra-rounded | rounded | classy | dotssquareCorner dot shape.
foregroundStylesolid | linear | radialsolidWhether the foreground uses a gradient.
foregroundcolour#0f172aUsed when foregroundStyle is solid.
gradientColorAcolour#15803dGradient start colour.
gradientColorBcolour#0369a1Gradient end colour.
gradientAnglenumber45Degrees, linear gradients only.
backgroundcolour#ffffffBackground colour.
transparentbooleanfalseRenders without a background fill.
backgroundRoundnumber0Background corner radius, 0–1.
cornerSquareColorcolourinheritsOverrides the corner frame colour.
cornerDotColorcolourinheritsOverrides the corner dot colour.
logodata URLnoneCentre image, as a data: URL. POST only in practice.
logoSizenumber0.4Fraction of the code covered, 0.1–0.6.
logoMarginnumber8Clear space around the logo, in pixels.
hideBackgroundDotsbooleantrueClears modules beneath the logo.

Errors

A 400 response carries a JSON body such as {"error":"The `data` parameter is required."}. Unknown values for enum parameters are not rejected — they fall back to the default, so a typo yields a plain code rather than a failed request.

Raster output

The endpoint returns SVG only, which is the right format for print and scales freely. Convert to PNG at the edge with any SVG rasteriser, or use the download buttons in the web generator, which produce PNG, JPG, WEBP and PDF in the browser.