cputools logo cputools

QR & barcode

Two generators — no input file, just the data to encode. POST https://api.relaystation.ai/v1/qr and POST https://api.relaystation.ai/v1/barcode.

Billing

Flat per call (no per-page/per-MB unit — there’s no input file), at the operator-tunable cputools.price.{qr,barcode}.generate.flat_micros (launch default $0.0002). The live 402 challenge is authoritative.

OpBilled onRate
qrper call$0.0002 flat
barcodeper call$0.0002 flat

The encoded data is capped at 4096 characters; over it returns 422 DATA_TOO_LONG before any charge.

qr

Generate a QR code as PNG or SVG. format is png (default) or svg; size (px), margin (modules), and ecc (error-correction level L | M | Q | H) are optional.

POST /v1/qr
{ "data": "https://relaystation.ai", "format": "svg", "ecc": "M" }

barcode

Generate a 1D barcode (Code128, EAN, UPC, and friends). type selects the symbology; format is png (default) or svg.

POST /v1/barcode
{ "data": "0123456789", "type": "code128", "format": "png" }

Both return the image in the uniform output envelope (inline base64, or a presigned outputUrl for a large SVG).

Sample

curl -X POST https://api.relaystation.ai/v1/qr \
  -H 'X-Payment: <base64 EIP-3009 auth>' \
  -H 'Idempotency-Key: qr-20260606' \
  -H 'Content-Type: application/json' \
  -d '{"data":"https://relaystation.ai","format":"png"}'

Errors

  • 402 PAYMENT_REQUIRED — no valid payment.
  • 422 DATA_TOO_LONG — the data exceeds 4096 characters (charged nothing).
  • 400 VALIDATION_ERROR — the body failed schema validation.

Next

PDF tools · CSV tools · Image tools · Pricing · API reference