QR Code Generator

Generate QR codes with custom colors, sizes, and optional logo overlay.

GET/v1/qr

Generates a QR code image for any text or URL. Customize the foreground and background colors, size, error correction level, and optionally overlay a logo image in the center.

Authentication

Requires x-api-key header.

Parameters

NameTypeRequiredDefaultDescription
datastringYes-The text or URL to encode in the QR code.
sizeintegerNo300Output image size in pixels (50-2000).
formatstringNopngOutput format: png or svg.
fg_colorstringNo000000Foreground (module) color as a hex string.
bg_colorstringNoffffffBackground color as a hex string.
error_correctionstringNoMError correction level: L, M, Q, or H.
logo_urlstringNo-URL of a logo image to overlay in the center (requires error_correction H).

Example Request

-blue-400 font-semibold">curl -X GET -emerald--amber-400">400">"https://api.aicores.io/v1/qr?data=https://aicores.io&size=-amber-400">400&fg_color=3b82f6&bg_color=0f172a" \
  -H -emerald--amber-400">400">"x-api-key: sk_live_your_key_here" \
  --output qrcode.png

Response

Returns the QR code as binary image data (image/png or image/svg+xml).

Error Codes

StatusErrorDescription
400missing_dataThe data parameter is required.
400invalid_sizeSize must be between 50 and 2000.
400invalid_colorColor must be a valid 6-character hex string.
401unauthorizedMissing or invalid API key.
429rate_limit_exceededToo many requests.