API CatalogQR Code API with Logo

QR Code API with Logo

Generate branded QR codes with your logo centered on the code, plus custom colors, sizing, and error correction. Logo overlay is available for PNG output. Use it for marketing campaigns, packaging, business cards, event badges, and anywhere a branded code reads better than a plain one.

This endpoint is part of the QR Code Generator API.

Open QR Code Generator API with Logo on RapidAPI

Base URL and authentication

https://qr-code-generator-api-with-logo.p.rapidapi.com
HeaderValue
Content-Typeapplication/json
X-RapidAPI-KeyYour RapidAPI key
X-RapidAPI-Hostqr-code-generator-api-with-logo.p.rapidapi.com

See Authentication, Rate limits, and Errors for shared behavior.

Endpoint

POST /v1/qr/generate

Request body

FieldTypeRequiredDefaultDescription
valuestringYesText or URL to encode. 1–4096 characters.
outputpng or svgNopngUse png for logo overlay.
logo_base64stringNonullPNG/JPEG/WebP logo as raw base64 or a data URL. PNG output only.
logo_size_ratiofloatNo0.2Logo size as a fraction of the QR, 0.050.3.
error_correctionL, M, Q, HNoMUse H with a logo so the code still scans.
fill_colorstringNo#000000Foreground (module) color.
back_colorstringNo#ffffffBackground color.
box_sizeintegerNo10Pixel size of each module, 240.
borderintegerNo4Quiet-zone width in modules, 012.

Example request

curl --request POST \
  --url https://qr-code-generator-api-with-logo.p.rapidapi.com/v1/qr/generate \
  --header "Content-Type: application/json" \
  --header "X-RapidAPI-Key: $RAPIDAPI_KEY" \
  --header "X-RapidAPI-Host: qr-code-generator-api-with-logo.p.rapidapi.com" \
  --data '{"value":"https://apimask.dev","output":"png","error_correction":"H","logo_base64":"iVBORw0KGgoAAAANSUhEUg...","logo_size_ratio":0.22,"fill_color":"#111111","back_color":"#ffffff"}'

Example response

{
  "success": true,
  "data": {
    "payload": "https://apimask.dev",
    "format": "png",
    "mime_type": "image/png",
    "data_base64": "iVBORw0KGgo...",
    "data_url": "data:image/png;base64,iVBORw0KGgo...",
    "size_px": 330
  },
  "error": null,
  "meta": { "request_id": "req_6c2a9f0b1d34" }
}

Response fields

FieldTypeDescription
payloadstringThe encoded value.
formatpng or svgOutput format.
mime_typestringimage/png or image/svg+xml.
data_base64stringImage bytes as base64.
data_urlstringReady-to-embed data: URL.
size_pxinteger or nullRendered width in pixels for PNG; null for SVG.

Logo tips

  • Use output: "png". Logo overlay is not applied to SVG output.
  • Set error_correction to H. The logo covers part of the code; the highest correction level keeps it scannable.
  • Keep logo_size_ratio at or below 0.3. Larger logos can make the code unreadable.
  • Pass a square logo with a transparent or solid background for the cleanest result. Both raw base64 and data: URLs are accepted.
  • Test the output by scanning it after changing colors — low contrast between fill_color and back_color reduces scan reliability.

Errors

Validation failures return INVALID_REQUEST (HTTP 400); auth and quota issues return UNAUTHORIZED (401) or RATE_LIMIT_EXCEEDED (429). See Errors for the full list.