> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pictum.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Render a QR code

> Render non-empty UTF-8 text as a deterministic SVG, PNG, or WebP QR code. Base64 is not encryption; never include secrets because request URLs and responses may be logged or publicly cached.



## OpenAPI

````yaml /openapi.yaml get /v1/qr-codes.{format}
openapi: 3.1.0
info:
  title: Pictum API
  version: 1.0.0
  description: Render public assets
  license:
    name: MIT
    identifier: MIT
servers:
  - url: https://pictum.dev
    description: Production API
security: []
tags:
  - name: Icons
    description: Browse and render the icon catalog.
  - name: Avatars
    description: Render generated avatars or select seeded realistic portraits.
  - name: QR codes
    description: Render Base64-encoded text as deterministic QR code images.
  - name: Placeholders
    description: Render exact-size placeholder images with optional text and colors.
paths:
  /v1/qr-codes.{format}:
    get:
      tags:
        - QR codes
      summary: Render a QR code
      description: >-
        Render non-empty UTF-8 text as a deterministic SVG, PNG, or WebP QR
        code. Base64 is not encryption; never include secrets because request
        URLs and responses may be logged or publicly cached.
      operationId: renderQrCode
      parameters:
        - name: format
          in: path
          required: true
          description: Output image file extension.
          schema:
            type: string
            enum:
              - svg
              - png
              - webp
          example: svg
        - name: data
          in: query
          required: true
          description: Canonical standard Base64 encoding of 1–512 bytes of UTF-8 text.
          schema:
            type: string
            contentEncoding: base64
            maxLength: 684
          example: aHR0cHM6Ly9waWN0dW0uZGV2
        - name: size
          in: query
          required: false
          description: >-
            Square raster size in pixels. Defaults to 256 for PNG and WebP and
            is ignored for SVG.
          schema:
            type: integer
            minimum: 64
            maximum: 2048
          example: 512
        - name: quiet_zone
          in: query
          required: false
          description: >-
            Keep clear space around the QR modules for reliable scanning.
            Defaults to true.
          schema:
            type: boolean
            default: true
          example: false
      responses:
        '200':
          description: Deterministic QR code image.
          headers:
            ETag:
              $ref: '#/components/headers/ETag'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
          content:
            image/svg+xml:
              schema:
                type: string
            image/png:
              schema:
                type: string
                format: binary
            image/webp:
              schema:
                type: string
                format: binary
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          description: >-
            Invalid Base64 data, decoded text, raster size, or quiet zone
            setting.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: QR code data must be valid base64-encoded UTF-8 text.
components:
  headers:
    ETag:
      description: Identifier for conditional requests.
      schema:
        type: string
    CacheControl:
      description: Public browser and shared-cache directives.
      schema:
        type: string
        example: public, max-age=86400, s-maxage=604800, stale-while-revalidate=86400
  responses:
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
        - message
      properties:
        message:
          type: string

````