QR Code Generator

Generate QR codes from any text or URL. Returns a raw PNG image or base64-encoded JSON, with configurable size and error-correction level.

Get API Key

Overview

Use Cases

  • Adding QR codes to print materials and invoices
  • Sharing URLs or contact information via QR scan
  • Mobile app deep-link distribution
  • Event ticketing and check-in systems
  • Marketing campaigns with trackable URLs

Features

Encodes any text or URL
Configurable image size (50–1000 px)
Configurable error-correction level (low / medium / high / highest)
Dedicated endpoints for raw PNG and base64-encoded JSON

API Endpoints

Generate QR Code (PNG)

Returns a raw PNG image of the QR code. Ideal for direct embedding or file download.

GET
https://api.requiems.xyz/v1/tech/qr

Parameters

Name Type Required Description
data string Required The text or URL to encode in the QR code
size integer Optional Image size in pixels (default: 256, min: 50, max: 1000)
recovery string Optional Error-correction level: low (7%), medium (15%), high (25%), highest (30%). Higher levels are more robust to physical damage but produce larger images. Default: medium

Try it out

Live Demo
Request

The text or URL to encode in the QR code

Image size in pixels (default: 256, min: 50, max: 1000)

Error-correction level: low (7%), medium (15%), high (25%), highest (30%). Higher levels are more robust to physical damage but produce larger images. Default: medium

Response Fields

Field Type Description
(binary) bytes Raw PNG image bytes. Content-Type is image/png.

Code Examples

# Save a 200px PNG with high error-correction
curl "https://api.requiems.xyz/v1/tech/qr?data=https://example.com&size=200&recovery=high" \
  -H "requiems-api-key: YOUR_API_KEY" \
  --output qrcode.png

# Default size (256px), medium error-correction
curl "https://api.requiems.xyz/v1/tech/qr?data=https://example.com" \
  -H "requiems-api-key: YOUR_API_KEY" \
  --output qrcode.png

Error Responses

400

bad_request

Missing or invalid parameters (e.g. data not provided, size out of range, unknown recovery level)

500

internal_error

Failed to generate QR code

Generate QR Code (Base64 JSON)

Returns a JSON envelope containing the QR code as a base64-encoded PNG string, along with its dimensions.

GET
https://api.requiems.xyz/v1/tech/qr/base64

Parameters

Name Type Required Description
data string Required The text or URL to encode in the QR code
size integer Optional Image size in pixels (default: 256, min: 50, max: 1000)
recovery string Optional Error-correction level: low (7%), medium (15%), high (25%), highest (30%). Default: medium

Try it out

Live Demo
Request

The text or URL to encode in the QR code

Image size in pixels (default: 256, min: 50, max: 1000)

Error-correction level: low (7%), medium (15%), high (25%), highest (30%). Default: medium

Response Fields

Field Type Description
image string Base64-encoded PNG image data
width integer Width of the generated image in pixels
height integer Height of the generated image in pixels

Code Examples

curl "https://api.requiems.xyz/v1/tech/qr/base64?data=https://example.com&size=200&recovery=highest" \
  -H "requiems-api-key: YOUR_API_KEY"

Error Responses

400

bad_request

Missing or invalid parameters (e.g. data not provided, size out of range, unknown recovery level)

500

internal_error

Failed to generate QR code

Frequently Asked Questions