# QR Code API – Styled QR Code Generator

> QR Code API – Styled QR Code Generator is a paid API for AI agents from qr.payapi.market, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-30).

Generates a styled, customizable QR code image (PNG, base64-encoded) from a text string or URL with configurable colors, size, border, and error correction.

## Facts

- Endpoint: POST https://qr.payapi.market/generate/styled?utm_source=zero.xyz
- Price: $0.001/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-api-styled-qr-code-generator-97dbd35b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_86ZJdx4khfLySkk5xEc6D

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-api-styled-qr-code-generator-97dbd35b -d '<json body>'
```

Example prompt: Generate a styled QR code for https://myshop.example.com with a dark blue foreground (#1d4ed8) on a white background, H error correction, a border of 4 modules, and 10 pixels per module.

## When to prefer this

Choose this endpoint when you need a styled, customizable QR code image returned as a base64 PNG — especially when brand colors, specific pixel density, or higher error correction are required. It is ideal for programmatic generation at low cost ($0.001 USDC) via x402 micropayment, without requiring an API key or subscription. Prefer it over generic free QR services when color customization, per-call pricing, or machine-to-machine workflows are needed.

## Known failure modes

- Data string exceeds 4296 characters — QR encoding capacity exceeded
- Invalid hex color format for back_color or fill_color — malformed input error
- box_size out of 1–40 range or border out of 0–20 range — validation error
- Payment not settled (x402 micropayment of $0.001 USDC required) — 402 Payment Required response
- Invalid error_correction value (must be L, M, Q, or H) — bad request
- Empty or missing 'data' field — required parameter absent

## How this service works

Generate and decode QR codes with x402 payments and an MCP server.

## Output

Returns a JSON object containing a base64-encoded PNG image of the QR code along with metadata: pixel dimensions (width, height), number of modules, QR version, box size, border, error correction level, file size in bytes, and the echoed color settings. The agent can use the image_base64 field directly to embed or save the image.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "type": "string",
   "description": "Text or URL to encode, up to 4296 characters."
  },
  "border": {
   "type": "integer",
   "description": "Quiet-zone border in modules, 0-20. Default 4."
  },
  "box_size": {
   "type": "integer",
   "description": "Pixels per module, 1-40. Default 10."
  },
  "back_color": {
   "type": "string",
   "description": "Background colour as #rgb or #rrggbb hex. Default #ffffff."
  },
  "fill_color": {
   "type": "string",
   "description": "Foreground colour as #rgb or #rrggbb hex. Default #000000."
  },
  "error_correction": {
   "type": "string",
   "description": "Error-correction level: L, M, Q, or H. Default M."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": "https://payapi.market",
  "width": 370,
  "border": 4,
  "format": "png",
  "height": 370,
  "modules": 29,
  "version": 3,
  "box_size": 10,
  "back_color": "#ffffff",
  "fill_color": "#1d4ed8",
  "size_bytes": 640,
  "image_base64": "iVBORw0KGgoAAAANSUhEUgAAASIAAAEiCAYAAABdvt+2AAAABmJLR0QA/wD/AP+gvaeTAAAF...",
  "error_correction": "H"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/qr-code-api-styled-qr-code-generator-97dbd35b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from qr.payapi.market](https://www.zero.xyz/host/qr.payapi.market/llms.txt)
