# QR Code Generator (Base64 PNG)

> QR Code Generator (Base64 PNG) is a paid API for AI agents from api.x402node.dev, paid per call via x402, $0.0022/call, status unknown (last checked 2026-09-14).

Generates a QR code from any text or URL and returns it as a base64-encoded PNG data URL

## Facts

- Endpoint: GET https://api.x402node.dev/generate/qrcode
- Price: $0.0022/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-x402node-dev-33ee3706
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_maAKp0bjlv_DlxepYB3xT

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 api-x402node-dev-33ee3706
```

Example prompt: Generate a QR code for https://myshop.example.com/menu — I need it as a base64 PNG image I can embed in a webpage.

## When to prefer this

Use this endpoint when you need to programmatically generate a QR code and receive it as a base64 PNG data URL — ideal for embedding directly into HTML, PDFs, or emails without needing a separate image hosting step. Prefer this over redirect-based QR services when you need the raw image data returned inline.

## Known failure modes

- Missing or empty text input returns an error
- Extremely long input strings may exceed QR code data capacity
- Network timeout if the service is temporarily unavailable
- Invalid request body format returns a 400-style error
- Payment failure (x402) if USDC balance is insufficient

## How this service works

QR code generator, QR generator, generate qrcode, text to qr, url to qr code, 2D barcode generator, make qr png, qrcode base64 image, qr code creator, generate qr code from url. Generate QR code as base64 PNG data URL. Use for URL, wifi credentials, business cards. Accepts payment on Base or Solana — either network works.

## Output

Returns a JSON object containing a base64-encoded PNG data URL (dataUrl field) of the QR code, along with the input text and image size. The dataUrl can be used directly in an <img> src attribute or saved as a PNG file.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "text"
     ],
     "properties": {
      "size": {
       "type": "string",
       "description": "Size (optional)"
      },
      "text": {
       "type": "string",
       "description": "Input text (required)"
      },
      "margin": {
       "type": "string",
       "description": "Margin (optional)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-x402node-dev-33ee3706/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x402node.dev](https://www.zero.xyz/host/api.x402node.dev/llms.txt)
