> ## 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 square placeholder

> Render a square SVG, JPEG, PNG, or WebP placeholder. SVG width, height, and viewBox match the requested size.



## OpenAPI

````yaml /openapi.yaml get /v1/placeholders/{size}.{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/placeholders/{size}.{format}:
    get:
      tags:
        - Placeholders
      summary: Render a square placeholder
      description: >-
        Render a square SVG, JPEG, PNG, or WebP placeholder. SVG width, height,
        and viewBox match the requested size.
      operationId: renderSquarePlaceholder
      parameters:
        - name: size
          in: path
          required: true
          description: Image width and height in pixels.
          schema:
            type: integer
            minimum: 16
            maximum: 2048
          example: 320
        - name: format
          in: path
          required: true
          description: Output image file extension.
          schema:
            type: string
            enum:
              - svg
              - jpg
              - png
              - webp
          example: svg
        - name: background
          in: query
          required: false
          description: 'Background color in #rrggbb format'
          schema:
            type: string
            pattern: ^#[0-9A-Fa-f]{6}$
            default: '#f1eef8'
          example: '#ffffff'
        - name: color
          in: query
          required: false
          description: 'Text and guide color in #rrggbb format'
          schema:
            type: string
            pattern: ^#[0-9A-Fa-f]{6}$
            default: '#6d28d9'
          example: '#111827'
        - name: text
          in: query
          required: false
          description: Centered label up to 64 characters
          schema:
            type: string
            maxLength: 64
          example: Coming soon
      responses:
        '200':
          description: Exact-size square placeholder image.
          headers:
            ETag:
              $ref: '#/components/headers/ETag'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
          content:
            image/svg+xml:
              schema:
                type: string
            image/jpeg:
              schema:
                type: string
                format: binary
            image/png:
              schema:
                type: string
                format: binary
            image/webp:
              schema:
                type: string
                format: binary
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          description: Invalid size, colors, or text.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Placeholder size must be between 16 and 2048 pixels.
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

````