---
title: "Generate a QR code (query params)"
method: GET
path: "/v1/qr"
---

# Generate a QR code (query params)

`GET /v1/qr`

Returns a QR code as SVG or PNG. Encode any text or URL via the `data` parameter.

## Query parameters

- `data` string, required
- `format` 'svg' | 'png'
- `size` integer
- `margin` integer
- `dark` string
- `light` string
- `theme` string

## Response `200`

The rendered QR code.

## Other responses

- `400` — Invalid request — malformed JSON, a missing/invalid required field, or a disallowed dynamic-code destination (destinations must be public http(s) URLs; private/internal hosts and oqr.to self-loops are rejected).
- `401` — The `Authorization: Bearer oqr_…` header is missing or the API key is invalid or revoked.
- `500` — An unexpected server-side error.

---

[API](https://skmtc.net/openqr/apis/openqr-api.md) · [All operations](https://skmtc.net/openqr/apis/openqr-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openqr/openqr-api/versions/f1b3796cd1f6/schema)
