> ## 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 an avatar

> Render a deterministic identicon, gradient, or monogram, or select a seeded portrait from the current catalog. Portrait catalog changes may remap existing seeds.



## OpenAPI

````yaml /openapi.yaml get /v1/avatar.{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 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/avatar.{format}:
    get:
      tags:
        - Avatars
      summary: Render an avatar
      description: >-
        Render a deterministic identicon, gradient, or monogram, or select a
        seeded portrait from the current catalog. Portrait catalog changes may
        remap existing seeds.
      operationId: renderAvatar
      parameters:
        - name: format
          in: path
          required: true
          description: >-
            Output image file extension. Portraits support JPEG, PNG, and WebP;
            generated variants also support SVG.
          schema:
            type: string
            enum:
              - svg
              - jpg
              - png
              - webp
          example: webp
        - name: seed
          in: query
          required: true
          description: >-
            URL-safe deterministic seed containing at least one letter or
            number.
          schema:
            type: string
            minLength: 1
            maxLength: 128
            pattern: ^[A-Za-z0-9](?:[A-Za-z0-9._~@+-]{0,126}[A-Za-z0-9])?$
          example: ada-lovelace
        - name: variant
          in: query
          required: false
          description: Visual strategy used to produce the avatar.
          schema:
            type: string
            enum:
              - identicon
              - gradient
              - monogram
              - portrait
            default: monogram
          example: portrait
        - name: gender
          in: query
          required: false
          description: >-
            Portrait catalog scope. This parameter is only valid when `variant`
            is `portrait`.
          schema:
            type: string
            enum:
              - any
              - male
              - female
            default: any
          example: female
        - name: size
          in: query
          required: false
          description: >-
            Square raster size in pixels. This parameter is only valid for JPEG,
            PNG, and WebP.
          schema:
            type: integer
            minimum: 16
            maximum: 1024
            default: 256
          example: 512
      responses:
        '200':
          $ref: '#/components/responses/AvatarImage'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          description: Invalid seed, variant, gender, raster format, or size.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Avatar gender is only available for portrait avatars.
components:
  responses:
    AvatarImage:
      description: Deterministic generated or seeded portrait avatar image.
      headers:
        ETag:
          $ref: '#/components/headers/ETag'
        Cache-Control:
          $ref: '#/components/headers/CacheControl'
        Cloudflare-CDN-Cache-Control:
          $ref: '#/components/headers/CloudflareCacheControl'
      content:
        image/jpeg:
          schema:
            type: string
            format: binary
        image/png:
          schema:
            type: string
            format: binary
        image/webp:
          schema:
            type: string
            format: binary
        image/svg+xml:
          schema:
            type: string
    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
  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
    CloudflareCacheControl:
      description: Cache duration used by Cloudflare.
      schema:
        type: string
        example: public, max-age=2592000, stale-while-revalidate=86400

````