# Aayat AI QR Code Generator

> Aayat AI QR Code Generator is a paid API for AI agents from aayatai.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-02).

Generates a QR code SVG (and base64 data URL) from any text or URL, with configurable size, colors, margin, and error correction level

## Facts

- Endpoint: GET https://aayatai.com/qr?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/aayat-ai-qr-code-generator-f10daa3c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_76Z7AgAfk4r2B3SwiefsE

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 aayat-ai-qr-code-generator-f10daa3c
```

Example prompt: Can you generate a QR code SVG for https://example.com at 512 pixels with high error correction and a dark blue (#003366) color on a white background?

## When to prefer this

Choose this endpoint when you need a pay-per-use QR code generator with no account or API key, accepting USDC micropayments via x402 on Base or Solana. Ideal for agents that need to generate QR codes occasionally without a subscription, or when you need SVG output (infinitely scalable vector format) with fine-grained control over colors, margin, and error correction level.

## Known failure modes

- Missing required 'text' query parameter returns an error
- Text exceeding 2000 characters is rejected
- Invalid hex color format for dark/light colors causes a validation error
- Size outside the 64-2048 pixel range is rejected
- Margin outside the 0-16 range is rejected
- Payment not settled via x402 before the call may result in a 402 response

## How this service works

Turn text or a link into a QR code. Pass ?text=https://example.com. Returns a crisp SVG image and a data: URL you can drop into HTML or Markdown. Options: ecc (error correction L, M, Q, H), size in pixels, margin, dark and light colours (#hex). Up to 2,000 characters.

## Output

Returns a JSON object containing the QR code as an SVG string (ready to embed in HTML), a base64 data URL of the same SVG, the number of modules (squares per side, excluding margin), and the QR version number (1-40) and error correction level used.

## 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": {
      "ecc": {
       "enum": [
        "L",
        "M",
        "Q",
        "H"
       ],
       "type": "string",
       "default": "M",
       "description": "Error correction: L (7%), M (15%), Q (25%), H (30%)."
      },
      "dark": {
       "type": "string",
       "default": "#000000",
       "maxLength": 7,
       "description": "Colour of the squares, #hex."
      },
      "size": {
       "type": "integer",
       "default": 512,
       "maximum": 2048,
       "minimum": 64,
       "description": "Image width/height in pixels."
      },
      "text": {
       "type": "string",
       "maxLength": 2000,
       "minLength": 1,
       "description": "Text or URL to encode."
      },
      "light": {
       "type": "string",
       "default": "#ffffff",
       "maxLength": 7,
       "description": "Background colour, #hex."
      },
      "margin": {
       "type": "integer",
       "default": 4,
       "maximum": 16,
       "minimum": 0,
       "description": "Quiet zone around the code, in squares."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "svg",
      "dataUrl",
      "modules",
      "version",
      "ecc"
     ],
     "properties": {
      "ecc": {
       "type": "string"
      },
      "svg": {
       "type": "string",
       "description": "SVG image markup."
      },
      "dataUrl": {
       "type": "string",
       "description": "The SVG as a base64 data: URL."
      },
      "modules": {
       "type": "integer",
       "description": "Squares per side (without margin)."
      },
      "version": {
       "type": "integer",
       "description": "QR version 1-40."
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ecc": "M",
  "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 33 33\" width=\"256\" height=\"256\">…</svg>",
  "dataUrl": "data:image/svg+xml;base64,PHN2Zy…",
  "modules": 25,
  "version": 2
 }
}
```

## More

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