# Mekler AI QR Code Generator

> Mekler AI QR Code Generator is a paid API for AI agents from api.mekler.ai, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-28).

Generates a standards-based QR code from UTF-8 text or a payment URI, returning SVG or base64-encoded PNG with metadata including dimensions, SHA-256 hash, QR version, and error-correction level.

## Facts

- Endpoint: POST https://api.mekler.ai/v1/images/qr/generate-code?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-28
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/mekler-ai-qr-code-generator-df7b7742
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_f1uAhk6tehe-PKRK5W_EP

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 mekler-ai-qr-code-generator-df7b7742 -d '<json body>'
```

Example prompt: Generate a QR code for the URL 'https://example.com/checkout' as a PNG at scale 6 with H error-correction so it's robust enough for a printed label.

## When to prefer this

Choose this endpoint when you need a deterministic, standards-compliant QR code rendered server-side and returned as a self-contained image (SVG or PNG) with integrity metadata (SHA-256). Ideal when you need to embed QR codes in agent-generated documents, invoices, or UIs without relying on a client-side library. Prefer it over client-side generators when reproducibility, hash verification, or payment URI encoding accuracy matters.

## Known failure modes

- Payload exceeds 1024 UTF-8 bytes — rejected with validation error
- Scale value outside 1–8 range — returns schema validation error
- Empty or missing text field — returns bad request error
- Invalid error_correction value not in [L,M,Q,H] — returns validation error
- Invalid format value not in [svg,png] — returns validation error
- request_id not matching required pattern — returns validation error

## How this service works

Generate a standards-based QR code from supplied UTF-8 text or a payment URI. Return SVG or PNG as base64 with dimensions, SHA-256, QR version and error-correction level. Maximum 1024 UTF-8 bytes, scale 1–8 and fixed four-module quiet zone. Encodes the supplied payload; does not validate a payment destination, execute payment or host an image.

## Output

A JSON object containing the encoded image (SVG markup or base64 PNG), image dimensions (width/height in pixels), MIME type, SHA-256 hash of the image bytes, QR version number, error-correction level used, byte length, payload byte count, quiet zone module count, encoding type, and a status field.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "maxLength": 1024,
   "minLength": 1
  },
  "scale": {
   "type": "integer",
   "default": 4,
   "maximum": 8,
   "minimum": 1
  },
  "format": {
   "enum": [
    "svg",
    "png"
   ],
   "type": "string",
   "default": "svg"
  },
  "request_id": {
   "type": "string",
   "pattern": "^[A-Za-z0-9_-]{16,64}$"
  },
  "error_correction": {
   "enum": [
    "L",
    "M",
    "Q",
    "H"
   ],
   "type": "string",
   "default": "M"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": "iVBORw0KGgoAAAANSUhEUgAAAIQAAACEAQAAAAB5P74KAAAAw0lEQVR42u1W0QkCUQwLLpD9t8wGtclDQUEQ4+cVOWo/QpumucO8hXBVXisAOCBOohve45vK4jC/zZIUOCAJDZ20OEPNH3CWGNb9jEd6EPU7jteUKPfl4FMSDT/Wj6wfVjikBD/Y8aPoWVl/gaPVII6oS348muGgSj8LpD2M0Nz1s5O5GXZ61rENk9zdlz2D+VPrOb2wvq8Vj3Lw7b3bxgblvo5tnCFbH4t7qPbDpbnWjyU0ee1oWj90VzO1H15fBR8qd5tY9Osict9SAAAAAElFTkSuQmCC",
  "width": 132,
  "format": "png",
  "height": 132,
  "sha256": "c25a99d2a24dbe4f167e747c2af350ec7360c9630002aff31a5979b6cc665780",
  "status": "ok",
  "version": 2,
  "encoding": "base64",
  "mime_type": "image/png",
  "byte_length": 252,
  "payload_bytes": 18,
  "error_correction": "M",
  "quiet_zone_modules": 4
 }
}
```

## More

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