# call402.com QR Code Generator

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

Generates a QR code image (SVG or PNG) encoding arbitrary text or URLs, delivered as a pay-per-call API via the x402 protocol on Base mainnet

## Facts

- Endpoint: POST https://call402.com/api/qr-code?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/call402-com-qr-code-generator-7fc8d4a1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_uRhK0lEoxUueD9cvMZY1G

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 call402-com-qr-code-generator-7fc8d4a1 -d '<json body>'
```

Example prompt: Generate a QR code for 'https://myshop.example.com/checkout' as a 512px SVG image so I can embed it in my product flyer.

## When to prefer this

Choose this endpoint when an AI agent needs to programmatically generate a QR code image on demand, especially in autonomous or payment-gated workflows using the x402 protocol. It is well-suited for agents that already use USDC micropayments on Base mainnet and need a fast, low-cost ($0.005) QR code rendered as SVG or PNG without managing a self-hosted encoder.

## Known failure modes

- Text exceeds 2048 characters — request rejected
- Size outside 128-1024px range — validation error
- Invalid format enum value (not svg or png) — bad request
- Payment not provided or signature invalid — HTTP 402 returned with payment requirements
- Malformed JSON body — 400 error
- Network or facilitator timeout — retry may be needed

## How this service works

USDC pay-per-call APIs for AI agents via the x402 protocol (v2, exact, Base mainnet). Send a request, receive HTTP 402 with payment requirements, pay with @x402/fetch or any x402 client, retry with the PAYMENT-SIGNATURE header.

## Output

A JSON object containing the rendered QR code image as either an inline SVG string or base64 PNG data, along with metadata: the image size in pixels, the output format, and a meta block indicating the renderer used and the character count of the encoded text.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "size": {
   "type": "integer",
   "description": "Image width in px, 128-1024 (default 512)"
  },
  "text": {
   "type": "string",
   "description": "Content to encode (max 2048 chars)"
  },
  "format": {
   "enum": [
    "svg",
    "png"
   ],
   "type": "string",
   "description": "Default svg"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "meta": {
   "renderer": "qrcode (MIT), first-party",
   "text_chars": 21
  },
  "size": 512,
  "format": "svg",
  "image_svg": "<svg xmlns=...</svg>"
 }
}
```

## More

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