# fastapi.online — QR Code Generator

> fastapi.online — QR Code Generator is a paid API for AI agents from api.fastapi.online, paid per call via x402, $0.0005/call, status down (last checked 2026-09-15).

Generates a QR code image from a text or URL string, returning it as a base64-encoded image.

## Facts

- Endpoint: POST https://api.fastapi.online/qrcode
- Price: $0.0005/call
- Payment: x402
- Status: down
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastapi-online-qr-code-generator-60ddd598
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_T_MBB5dBMIchMQg4eqciM

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 fastapi-online-qr-code-generator-60ddd598 -d '<json body>'
```

Example prompt: Generate a QR code for https://myshop.example.com/promo at 300 pixels in size.

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call QR code generator with no signup required. It is ideal for agents that generate QR codes on demand as part of a broader workflow (e.g., marketing automation, product pages, event ticketing). It accepts raw text or URLs and returns a base64 image ready for embedding or download.

## Known failure modes

- Missing 'text' field returns a validation error
- Extremely long text strings may exceed QR code capacity and cause generation failure
- Invalid size values (negative or zero) may return an error
- Payment failure or insufficient USDC balance returns 402 Payment Required

## How this service works

Chat, embeddings, OCR, speech-to-text, image editing, image understanding (captioning/Q&amp;A), text-to-speech, translation, writing tools, classification tools, developer tools, local utilities, format/checksum validators, encoding &amp; crypto utilities, date/time calculators, geo/coordinate math, math &amp; finance calculators, novelty tools, and business/social writing generators — 179 endpoints in all, across multiple specialized self-hosted models. Pay per call with crypto — no signup — or get an API key.

## Output

A JSON object containing a base64-encoded PNG image of the generated QR code under the key 'image_base64'. The agent can decode this string to display or embed the QR code image directly.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "size": {
   "type": "integer",
   "maximum": 1024,
   "minimum": 64
  },
  "text": {
   "type": "string",
   "maxLength": 2000,
   "minLength": 1
  }
 }
}
```

## More

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