---
title: "QR image (PNG or SVG)"
method: GET
path: "/v1/links/{id}/qr"
tags: ["Links"]
---

# QR image (PNG or SVG)

`GET /v1/links/{id}/qr`

## Request

- Base URL: `https://xn--s7y.xn--3ds443g`
- URL: `https://xn--s7y.xn--3ds443g/v1/links/{id}/qr`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `duan_session`

Owner-only. Returns a QR code image that encodes the link's `qr_tracking_url` (tagged short URL; ASCII host in the matrix). Default format PNG size 512. `format=png|svg`. PNG `size` is 256, 512, or 1024 (SVG ignores size). Requires a session cookie or an API key with `links:read`. An OAuth access token is not accepted. Anon → 401. Other-user / unowned → 404. Destination is never fetched or encoded. Fetching it does not record a visit. MCP create_qr may also return a short-lived image_url. Returns the stored link's QR as PNG, or SVG when requested, with a short-lived image URL where available. The QR encodes qr_tracking_url. Where an image is not displayed, image_url (when present) or the short link reaches the same code.

## Path parameters

- `id` string, required

## Query parameters

- `format` 'png' | 'svg'
- `size` 256 | 512 | 1024

## Headers

- `X-Request-Id` string

## Response `200`

QR image bytes

## Other responses

- `400`: VALIDATION_ERROR (bad format or size)
- `401`: AUTH_REQUIRED
- `403`: INSUFFICIENT_SCOPE (Bearer without links:read)
- `404`: LINK_NOT_FOUND
- `409`: Link not active (quarantined / disabled / blocked)
- `410`: Link expired

---

[API](https://skmtc.dev/xn--s7y/apis/agent-api.md) · [All operations](https://skmtc.dev/xn--s7y/apis/agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/xn--s7y/apis/agent-api/revisions/d902f68518e9?raw)
