# Toolrail QR Code Generator

> Toolrail QR Code Generator is a paid API for AI agents from toolrail.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-12).

Generates a QR code image (PNG or SVG) from any text or URL, with configurable size up to 2048px.

## Facts

- Endpoint: POST https://toolrail.dev/qr?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/toolrail-qr-code-generator-ca9aa4c6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4DJnE8Wr-chNGB4Qy0E0R

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 toolrail-qr-code-generator-ca9aa4c6 -d '<json body>'
```

Example prompt: Generate a PNG QR code at 512 pixels for this payment link: https://pay.example.com/invoice/abc123 — I want to add it to a receipt label.

## When to prefer this

Choose this endpoint when you need a quick, programmatic QR code image (PNG or SVG) from any text or URL, especially when chaining with the Toolrail PDF endpoint to produce payment links or printable labels. It is ideal for agent workflows that generate invoices, shipping labels, or product packaging requiring a scannable code without relying on a browser-based tool.

## Known failure modes

- Input data exceeds 2000 character limit — request rejected
- Invalid size value outside 64–2048 px range — error returned
- Unsupported format value (not PNG or SVG) — error returned
- Empty or missing data field — error returned
- Payment not fulfilled (x402 protocol) — 402 response before image is returned

## How this service works

Generate a QR code as PNG or SVG from any text or URL (up to 2000 chars, 64-2048 px). Pairs with the PDF endpoint for payment links and labels. Use when you need a scannable QR image for a URL, payment link or label.

## Output

Returns a QR code image file — either a PNG bitmap or an SVG vector — encoding the provided text or URL. The image dimensions are determined by the requested size parameter (64–2048 px).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "type": "string"
  },
  "size": {
   "type": "integer"
  },
  "format": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/toolrail-qr-code-generator-ca9aa4c6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from toolrail.dev](https://www.zero.xyz/host/toolrail.dev/llms.txt)
