# AGISHub QR Code Generator

> AGISHub QR Code Generator is a paid API for AI agents from api.agishub.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Generates a QR code for any text or URL, returning an inline SVG and data URI with configurable size, margin, and error-correction level.

## Facts

- Endpoint: POST https://api.agishub.com/paid/qr-generate
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agishub-qr-code-generator-a6e78c7a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_azwnBmZOUc2N5QXIZbwZ5

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

Example prompt: Can you generate a QR code for https://myshop.com/sale — use high error correction (H level), a module size of 8, and a margin of 4 cells?

## When to prefer this

Choose this endpoint when you need a fast, server-side QR code generated as an SVG (scalable, resolution-independent) plus a data URI — especially when you need fine control over error-correction level, module pixel size, and quiet-zone margin. Prefer this over client-side libraries when generating QR codes in a headless or agent workflow without browser access.

## Known failure modes

- Missing 'text' query parameter returns a 400 error
- Module size or margin values outside allowed ranges (size 1-40, margin 0-20) return a validation error
- Empty string for 'text' fails minLength validation
- Invalid ec_level value not in [L, M, Q, H] returns a validation error

## How this service works

Generate a QR code for any text or URL. Returns an inline SVG plus a data URI, with selectable size, quiet-zone margin and error-correction level.

## Output

Returns a JSON object containing an inline SVG string of the QR code and a data URI (base64-encoded image), ready to embed in HTML or download, encoded with the specified text, module size, margin, and error-correction level.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "text"
     ],
     "properties": {
      "size": {
       "type": "integer",
       "maximum": 40,
       "minimum": 0,
       "description": "Pixel size of each QR module/cell in the SVG (default 6).",
       "exclusiveMinimum": true
      },
      "text": {
       "type": "string",
       "minLength": 1,
       "description": "Text or URL to encode in the QR code."
      },
      "margin": {
       "type": "integer",
       "maximum": 20,
       "minimum": 0,
       "description": "Quiet-zone margin around the code, in cells (default 4)."
      },
      "ec_level": {
       "enum": [
        "L",
        "M",
        "Q",
        "H"
       ],
       "type": "string",
       "description": "Error-correction level: L(7%), M(15%), Q(25%), H(30%). Default M."
      }
     },
     "additionalProperties": false
    },
    "type": {
     "enum": [
      "http"
     ],
     "type": "string"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "enum": [
      "json"
     ],
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

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