# QR Code Render API

> QR Code Render API is a paid API for AI agents from qr-api-production-7adc.up.railway.app, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-19).

Generates SVG or PNG QR codes from text or URLs with configurable size, colors, error correction, and quiet zone

## Facts

- Endpoint: POST https://qr-api-production-7adc.up.railway.app/v1/qr/render?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/qr-code-render-api-0586d2cc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fn6pUQ7ivXYoon3mZQZrK

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-render-api-0586d2cc -d '<json body>'
```

Example prompt: Generate a 512px PNG QR code for https://myshop.com/checkout with a dark green foreground (#10221a) on white background and high error correction, so I can print it on my packaging.

## When to prefer this

Choose this endpoint when you need a server-side QR code rendered as a proper image file (SVG or PNG) with validated color contrast, configurable error correction, and a standard quiet zone — especially useful when producing print-ready or embeddable QR codes at specific dimensions without relying on a client-side library.

## Known failure modes

- Text exceeds 1500 character maximum — returns validation error
- Size outside 128–1024px range — returns validation error
- Malformed hex color code not matching ^#[0-9a-fA-F]{6}$ — returns validation error
- Invalid format or error_correction enum value — returns validation error
- Empty or missing text field — returns validation error
- Payment not received or x402 payment header missing — returns 402 Payment Required

## How this service works

Generate SVG or PNG QR codes for links, text and standard payloads. Includes a four-module quiet zone, selectable error correction and validated foreground/background contrast.

## Output

Returns a QR code image file (SVG or PNG) encoding the provided text, rendered at the specified pixel size with a four-module quiet zone, the chosen foreground/background hex colors, and the selected error correction level (M, Q, or H).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "size": {
   "type": "integer",
   "default": 512,
   "maximum": 1024,
   "minimum": 128
  },
  "text": {
   "type": "string",
   "maxLength": 1500,
   "minLength": 1
  },
  "format": {
   "enum": [
    "svg",
    "png"
   ],
   "type": "string",
   "default": "png"
  },
  "background": {
   "type": "string",
   "default": "#ffffff",
   "pattern": "^#[0-9a-fA-F]{6}$"
  },
  "foreground": {
   "type": "string",
   "default": "#10221a",
   "pattern": "^#[0-9a-fA-F]{6}$"
  },
  "error_correction": {
   "enum": [
    "M",
    "Q",
    "H"
   ],
   "type": "string",
   "default": "H"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/qr-code-render-api-0586d2cc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from qr-api-production-7adc.up.railway.app](https://www.zero.xyz/host/qr-api-production-7adc.up.railway.app/llms.txt)
