# 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 image from text, URL, WiFi credentials, or vCard data with configurable size and error-correction level.

## Facts

- Endpoint: POST https://api.24klabs.ai/api/v1/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-d1dc5ef0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HO3IBJeIpZa4aF_hmgKQh

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-d1dc5ef0 -d '<json body>'
```

Example prompt: Generate a QR code for https://myshop.com/menu — make it 400px with high error correction so it still scans even if partially covered.

## When to prefer this

Choose this endpoint when you need to programmatically generate QR codes from arbitrary text, URLs, WiFi credentials, or vCard contact data and receive a ready-to-use PNG base64 image. It is particularly well-suited for agents that need to embed QR codes in generated documents, emails, web pages, or printed materials. Prefer it over client-side QR libraries when you need a server-side, stateless, pay-per-use solution with no library dependencies.

## Known failure modes

- Invalid or empty input text returns a 400 error
- Unsupported data type (e.g. malformed vCard) may produce an unreadable QR
- Extremely long input strings may exceed QR code capacity limits
- Invalid size values (negative or zero) return a validation error
- Unknown error-correction level value returns a 400 bad request

## How this service works

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

## Output

Returns a PNG image of the QR code encoded as a base64 string, ready to embed directly in an img src tag or save as a file. The image size and error-correction level reflect the parameters provided.

## 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-d1dc5ef0/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)
