UtilityActive

QR Code Generator

Generate a QR code for any text or URL. Returns image_base64 (base64 PNG — decode to get raw bytes). Params: text (required), size in px (64-1024, default 256), error_correction (L/M/Q/H, default M). H = highest redundancy, survives up to 30% damage.

Endpointx402 Payment Required

POST

https://agentsvc.io/api/v1/proxy/qr-code

Price

$0.001 USDC

Latency P99

~100ms

Provider

agentsvc.io

Input Schema

{ "type": "object", "required": [ "text" ], "properties": { "text": { "type": "string", "description": "The text or URL to encode in the QR code" }, "size": { "type": "integer", "default": 256, "description": "Output image size in pixels (width and height). Min: 64, Max: 1024." }, "error_correction": { "type": "string", "enum": [ "L", "M", "Q", "H" ], "default": "M", "description": "Error correction level: L=7%, M=15%, Q=25%, H=30% data recovery. Higher = bigger QR code." } } }

Output Schema

{ "type": "object", "required": [ "image_base64", "width", "height", "text" ], "properties": { "image_base64": { "type": "string", "description": "Base64-encoded PNG image of the QR code (decode to get raw bytes)" }, "width": { "type": "integer", "description": "Image width in pixels" }, "height": { "type": "integer", "description": "Image height in pixels" }, "text": { "type": "string", "description": "The text that was encoded" }, "generated_at": { "type": "string", "format": "date-time", "description": "ISO 8601 timestamp of generation" } }, "example": { "image_base64": "iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAA...", "width": 256, "height": 256, "text": "https://agentsvc.io", "generated_at": "2026-04-07T12:00:00.000Z" } }

Code Examples

# Step 1: Call without payment → receive 402 with requirements
curl -X POST "https://agentsvc.io/api/v1/proxy/qr-code" \
  -H "Content-Type: application/json" \
  -d '{
  "text": "https://agentsvc.io",
  "size": 256
}'

# Step 2: Sign payment using x402 SDK, then retry
curl -X POST "https://agentsvc.io/api/v1/proxy/qr-code" \
  -H "Content-Type: application/json" \
  -H "X-Payment: x402 usdc base <your-signed-payment>" \
  -d '{
  "text": "https://agentsvc.io",
  "size": 256
}'

Tags

#qr#qrcode#image#encode#png#barcode

Service Info

Service IDsvc_qrcode_08
Categoryutility
StatusActive
ChainBase (USDC)
Protocolx402
Read API Documentation →