# QR Code Generator

> QR Code Generator is a paid API for AI agents from bess-x402.onrender.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-30).

Generates a QR code for any text, URL, wallet address, or payment link as SVG or PNG, returned inline as SVG markup and a base64 data URI

## Facts

- Endpoint: GET https://bess-x402.onrender.com/v1/util/qr?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/qr-code-generator-2a03c012
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5wdRwhSLJ974_KAGbELhi

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability qr-code-generator-2a03c012
```

Example prompt: Can you generate a QR code for https://myshop.com/pay in PNG format with high error correction (H) and a size of 12 pixels per module?

## When to prefer this

Choose this endpoint when you need a quick, inline QR code with no additional processing — it returns both SVG markup and a base64 data URI ready to drop into HTML or a chat message without any image hosting step. Ideal for encoding URLs, crypto wallet addresses, payment links, Wi-Fi credentials, or plain text into a scannable code. Prefer it over client-side libraries when the agent cannot run JavaScript, or over image-generation APIs when you specifically need a QR code rather than a decorative image.

## Known failure modes

- Input data exceeds 2000 characters — request rejected
- Invalid size value outside 1-40 range — parameter error
- Invalid border value outside 0-10 range — parameter error
- Unsupported format value other than svg/png — parameter error
- Invalid error_correction value other than L/M/Q/H — parameter error
- Missing required 'data' query parameter — 400 error
- Service temporarily unavailable on Render cold start — timeout or 503

## How this service works

Generate a QR code for any text, URL, wallet address or payment link as SVG or PNG, returned inline as SVG markup and a base64 data URI ready for HTML or chat. Choose size, border and error correction. Use when a user needs a scannable code for a link, Wi-Fi, contact or crypto payment.

## Output

Returns both inline SVG markup and a base64-encoded PNG data URI of the generated QR code, ready to embed directly in HTML, chat interfaces, or documents. The response includes the encoded data and the chosen format output so the agent can display or pass the QR code downstream without additional processing.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "data"
     ],
     "properties": {
      "data": {
       "type": "string",
       "description": "Text to encode, max 2000 characters"
      },
      "size": {
       "type": "integer",
       "description": "Pixels per module 1-40, default 10"
      },
      "border": {
       "type": "integer",
       "description": "Quiet-zone modules 0-10, default 4"
      },
      "format": {
       "enum": [
        "svg",
        "png"
       ],
       "type": "string",
       "description": "svg or png"
      },
      "error_correction": {
       "enum": [
        "L",
        "M",
        "Q",
        "H"
       ],
       "type": "string",
       "description": "L, M, Q or H"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/qr-code-generator-2a03c012/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from bess-x402.onrender.com](https://www.zero.xyz/host/bess-x402.onrender.com/llms.txt)
