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://requiems.xyz/v1/technology/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://requiems.xyz/v1/technology/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://requiems.xyz/v1/technology/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://requiems.xyz/v1/technology/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://requiems.xyz/v1/technology/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

Batch Generate QR Codes (Base64)

Generate up to 50 base64-encoded QR codes in a single request. Results are returned in input order. The PNG endpoint has no batch variant β€” use this endpoint for batch generation.

POST
https://requiems.xyz/v1/technology/qr/base64/batch

Parameters

Name Type Required Description
items array<object> Required List of QR generation requests (1–50 items).
items[].data string Required The text or URL to encode.
items[].size integer Optional Image size in pixels (50–1000). Defaults to 256.
items[].recovery string Optional Error-correction level: low, medium, high, highest. Defaults to medium.

Try it out

Live Demo
Request

List of QR generation requests (1–50 items).

The text or URL to encode.

Image size in pixels (50–1000). Defaults to 256.

Error-correction level: low, medium, high, highest. Defaults to medium.

Response Fields

Field Type Description
results array<object> Per-item results in input order.
results[].data string The input text or URL that was encoded.
results[].image string Base64-encoded PNG image data (omitted on error).
results[].width integer Width of the generated image in pixels (omitted on error).
results[].height integer Height of the generated image in pixels (omitted on error).
results[].error string Error message if generation failed (omitted on success).
total integer Total number of items processed.

Code Examples

curl -X POST https://requiems.xyz/v1/technology/qr/base64/batch \
  -H "requiems-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"items": [{"data": "https://example.com"}, {"data": "Hello, World!"}]}'

Error Responses

validation_failed

The items array is missing, empty, or exceeds 50 items.

bad_request

The request body is missing or malformed.

Frequently Asked Questions