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

# Generate QR code (GET)

> Generate a QR code with customization options via query parameters



## OpenAPI

````yaml https://raw.githubusercontent.com/prefeitura-rio/url_shortener/refs/heads/main/docs/openapi-v3.json get /qr
openapi: 3.0.0
info:
  description: A high-performance URL shortener service with metadata support and caching.
  title: URL Shortener API
  termsOfService: http://swagger.io/terms/
  contact:
    name: API Support
    url: http://www.swagger.io/support
    email: support@swagger.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.0'
servers:
  - url: https://pref.rio/link/api
    description: Production
  - url: https://staging.app.dados.rio/link/api
    description: Staging
security: []
paths:
  /qr:
    get:
      tags:
        - qrcode
      summary: Generate QR code (GET)
      description: Generate a QR code with customization options via query parameters
      parameters:
        - description: The data to encode in the QR code
          name: data
          in: query
          required: true
          schema:
            type: string
        - description: 'Output image size in pixels (default: 256, min: 64, max: 2048)'
          name: size
          in: query
          schema:
            type: integer
        - description: 'Error correction level: low, medium, high, highest (default: high)'
          name: error_correction
          in: query
          schema:
            type: string
        - description: 'QR code foreground color in hex (default: #000000)'
          name: foreground_color
          in: query
          schema:
            type: string
        - description: 'Background color in hex (default: #FFFFFF)'
          name: background_color
          in: query
          schema:
            type: string
        - description: 'Make background transparent (default: false)'
          name: transparent_background
          in: query
          schema:
            type: boolean
        - description: 'Include logo in center (default: true)'
          name: include_logo
          in: query
          schema:
            type: boolean
        - description: Logo color in hex (optional)
          name: logo_color
          in: query
          schema:
            type: string
        - description: 'Logo shape: circle or square (default: circle)'
          name: logo_shape
          in: query
          schema:
            type: string
        - description: 'QR module shape: square, circle, rounded (default: square)'
          name: module_shape
          in: query
          schema:
            type: string
        - description: 'Border width in modules (default: 2, min: 0, max: 10)'
          name: border_width
          in: query
          schema:
            type: integer
        - description: 'Output format: png or jpeg (default: png)'
          name: format
          in: query
          schema:
            type: string
      responses:
        '200':
          description: QR code image
          content:
            image/png:
              schema:
                type: string
                format: binary
            image/jpeg:
              schema:
                type: string
                format: binary
        '400':
          description: Bad Request
          content:
            image/png:
              schema:
                type: object
                additionalProperties:
                  type: string
            image/jpeg:
              schema:
                type: object
                additionalProperties:
                  type: string
        '500':
          description: Internal Server Error
          content:
            image/png:
              schema:
                type: object
                additionalProperties:
                  type: string
            image/jpeg:
              schema:
                type: object
                additionalProperties:
                  type: string
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````