# 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-15).

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

## Facts

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

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-45815dc3
```

Example prompt: Can you generate a QR code for https://myshop.example.com — make the cells 8 pixels, use a margin of 5, and set error correction to H so it's robust even if partially covered?

## When to prefer this

Choose this endpoint when you need a QR code returned as an inline SVG or data URI ready for embedding in HTML, email templates, or documents without additional image hosting. It is ideal for agents automating marketing materials, onboarding flows, or print assets where the output must be fully self-contained. Prefer this over image-based QR generators when SVG scalability and no external image dependency matter.

## Known failure modes

- Missing required 'text' parameter returns a validation error
- 'text' value with minLength 0 or empty string is rejected
- 'size' outside 1–40 range returns a schema validation error
- 'margin' outside 0–20 range returns a validation error
- Invalid 'ec_level' value (not L, M, Q, or H) returns an error
- Very long text strings may exceed QR code data capacity for the chosen error-correction level

## 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), both ready for direct embedding in HTML, email, or documents. The QR code encodes the provided text or URL at the specified 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "enum": [
      "http"
     ],
     "type": "string"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "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
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "enum": [
      "json"
     ],
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": "Generate a QR code for any text or URL. Returns an inline SVG plus a data URI, with selectable size, quiet-zone margin a"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agishub-qr-code-generator-45815dc3/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)
