---
title: "Generate a QR code (SVG)"
method: POST
path: "/v1/tools/qr_code"
---

# Generate a QR code (SVG)

`POST /v1/tools/qr_code`

## Request

- Base URL: `https://mcp.cleanor.app`
- URL: `https://mcp.cleanor.app/v1/tools/qr_code`
- Auth: none declared

Encode text or a URL as a QR code and return a crisp, dependency-free SVG you can paste straight into a page, deck or doc.

## Request body

- object
  - `text` string, required: Text or URL to encode.
  - `ecc` 'L' | 'M' | 'Q' | 'H': Error-correction level: L=7%, M=15%, Q=25%, H=30% recoverable.
  - `size` integer: SVG pixel size.

## Response `200`

Tool result: `data` (structured) and `text` (human-readable).

- ToolResult
  - `ok` boolean
  - `tool` string
  - `data` object, nullable
  - `text` string
  - `attribution` string

## Other responses

- `400`: Invalid arguments.
- `429`: Rate limited (120 requests per minute per IP).

---

[API](https://skmtc.dev/cleanor/apis/cleanor-api.md) · [All operations](https://skmtc.dev/cleanor/apis/cleanor-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cleanor/apis/cleanor-api/revisions/5f7be54e7a84?raw)
