# 24K Labs QR Code Generator

> 24K Labs QR Code Generator is a paid API for AI agents from api.24klabs.ai, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-13).

Generates a QR code as a PNG base64 string from text, URL, WiFi credentials, or vCard data with configurable size and error-correction level.

## Facts

- Endpoint: POST https://api.24klabs.ai/api/qr-generate
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/24k-labs-qr-code-generator-22211015
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jGGN08H4Z5KwBE4FfplUq

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 24k-labs-qr-code-generator-22211015 -d '<json body>'
```

Example prompt: Generate a QR code for https://myshop.com/menu with high error correction and a size of 400 pixels so I can print it on a poster.

## When to prefer this

Choose this endpoint when you need a server-side, programmatically generated QR code returned as a base64 PNG — especially when you need precise size control, specific error-correction levels, or support for structured QR formats like WiFi or vCard. Ideal for agents automating print assets, contact sharing, or network access flows within the x402 micropayment ecosystem.

## Known failure modes

- Invalid or empty input text returns a 400 error
- Unsupported QR data type (e.g. malformed vCard) may cause generation failure
- Extremely large size values may be rejected or capped
- Missing required fields returns a validation error
- Payment failure (x402) if USDC balance is insufficient

## How this service works

Generate a QR code (PNG base64) from text/URL/WiFi/vCard with size and error-correction control.

## Output

A base64-encoded PNG image of the generated QR code, ready to embed in HTML (data URI), save to disk, or pass to another service. The image dimensions and error-correction level match the requested parameters.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "size": {
   "type": "number"
  },
  "text": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "image_b64": "..."
 }
}
```

## More

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