# QR Code SVG Generator

> QR Code SVG Generator is a paid API for AI agents from barcode-qr.x402tookit.com, paid per call via x402, $0.03/call, status unknown (last checked 2026-11-02).

Encodes any text or URL as a standards-compliant QR code SVG, with full control over error correction, colors, scale, and mask pattern

## Facts

- Endpoint: GET https://barcode-qr.x402tookit.com/qr-svg?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/qr-code-svg-generator-f5e33e1b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zXBEgKlw7S18hhbMCYpg0

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-svg-generator-f5e33e1b
```

Example prompt: Generate a QR code SVG for https://myshop.example.com/sale with high error correction (H), dark green modules (#006400) on a white background, and a quiet zone border of 4 modules.

## When to prefer this

Choose this endpoint when you need a standards-compliant ISO 18004 QR code rendered as a clean, dependency-free SVG — especially when you need precise control over error correction level, colors, module scale, quiet zone, or encoding mode. Ideal for server-side generation of embeddable SVGs for web pages, print materials, and product labels. Prefer over raster-image QR generators when scalability and small file size matter.

## Known failure modes

- Text exceeds maximum capacity for the requested QR version — returns an error or no SVG
- Invalid error correction level value (not L/M/Q/H) — likely 400 or default fallback
- Scale value outside 1-20 range — rejected or clamped
- Border value outside 0-10 range — rejected or clamped
- Version outside 1-40 range — rejected
- Text empty or missing — required field error
- Text too long for any QR version (>~7000 chars at version 40) — capacity exceeded error

## How this service works

Encode text as a QR code SVG (ISO 18004, versions 1-40, error correction L/M/Q/H, auto mask). No dependencies.

## Output

Returns an SVG string encoding the input text as a QR code, along with metadata: the QR version used (1-40), module grid size, mask pattern applied, encoding mode (numeric/alphanumeric/byte/auto), error correction level, number of encoded characters, and SVG byte size. May also include a verdict/summary and any degraded-quality warnings.

## 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": {
      "bg": {
       "type": "string",
       "description": "Light module colour, 6-digit hex (default ffffff)"
      },
      "ec": {
       "type": "string",
       "description": "Error correction level L, M, Q or H (default M)"
      },
      "fg": {
       "type": "string",
       "description": "Dark module colour, 6-digit hex (default 000000)"
      },
      "mask": {
       "type": "integer",
       "description": "Force mask pattern 0 to 7 (default: lowest penalty)"
      },
      "mode": {
       "type": "string",
       "description": "auto (default), numeric, alphanumeric or byte"
      },
      "text": {
       "type": "string",
       "description": "Text or URL to encode (up to 1000 characters)"
      },
      "scale": {
       "type": "integer",
       "description": "Pixels per module for width/height, 1 to 20 (default 0: scalable)"
      },
      "border": {
       "type": "integer",
       "description": "Quiet zone in modules, 0 to 10 (default 4)"
      },
      "version": {
       "type": "integer",
       "description": "Smallest QR version to use, 1 to 40 (default: the smallest that fits)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "svg": {
       "type": [
        "null",
        "string"
       ]
      },
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "mode": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "ecLevel": {
       "type": [
        "null",
        "string"
       ]
      },
      "modules": {
       "type": [
        "null",
        "number"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
  
… (truncated)
```

## More

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