QR Code

Generate QR code (with logo)

Generate a QR code with full options including an optional centered logo overlay. Logo is provided as a base64 data URL.

post/qr/generate

Request

  • Base URL: https://api.citoapi.com/api/v1
  • URL: https://api.citoapi.com/api/v1/qr/generate
  • Auth: API key in header x-api-key

Request body

datastring required

Text or URL to encode into the QR code.

sizeinteger

Output image size in pixels (width = height).

format'png' | 'svg' | 'base64'

Output format.

foregroundstring

Foreground (dark module) hex color.

backgroundstring

Background hex color.

margininteger

Quiet zone width in modules.

errorCorrection'L' | 'M' | 'Q' | 'H'

Error correction level. Automatically forced to H when a logo is provided.

Example request

{
  "data": "https://citoapi.com",
  "size": 400,
  "foreground": "#000000",
  "background": "#ffffff",
  "logo": {
    "image": "data:image/png;base64,iVBORw0KGgo..."
  }
}

Response

QR code image or base64 JSON.

successboolean

Example response

{
  "success": true,
  "data": {
    "image": "data:image/png;base64,...",
    "format": "png",
    "size": 400
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.