# Styled QR Code Generator

> Styled QR Code Generator is a paid API for AI agents from qr-api-production-1836.up.railway.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Generates a customized QR code PNG (base64-encoded in JSON) with configurable foreground/background colors, module size, border width, and error-correction level.

## Facts

- Endpoint: POST https://qr-api-production-1836.up.railway.app/generate/styled
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/styled-qr-code-generator-9990e84b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jT73WdkFemK5ysdF1mYRj

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 styled-qr-code-generator-9990e84b -d '<json body>'
```

Example prompt: Can you generate a styled QR code for https://myshop.com with a navy blue foreground (#003366) and white background (#ffffff), 12 pixels per module, a 4-module border, and H error correction?

## When to prefer this

Choose this endpoint when you need a visually branded or customized QR code — specific hex colors, non-default module size, or a particular error-correction level. Use the plain sibling endpoint for quick black-on-white defaults. Use the batch sibling endpoint when generating multiple QR codes at once. This endpoint is ideal when the QR code must match brand guidelines or be printed at a specific scale.

## Known failure modes

- Invalid hex color format returns a 400 error
- Data string exceeding 4296 characters causes encoding failure
- Out-of-range box_size (outside 1-40) or border (outside 0-20) returns a validation error
- Unsupported error_correction value (not L/M/Q/H) returns a 400 error
- Payment not included or insufficient USDC triggers a 402 response
- Empty or missing 'data' field returns a 400 error

## How this service works

Generate a styled QR code PNG (base64 in JSON): custom foreground/background hex colours, module size, border, and error-correction level.

## Output

A JSON object containing a base64-encoded PNG of the styled QR code. The image reflects all specified parameters: foreground and background colors, pixels-per-module size, quiet-zone border width, and the chosen error-correction level. The base64 string can be decoded and rendered or embedded directly in HTML as a data URI.

## 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."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/styled-qr-code-generator-9990e84b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from qr-api-production-1836.up.railway.app](https://www.zero.xyz/host/qr-api-production-1836.up.railway.app/llms.txt)
