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

# Render PDF

> Generate a single-page PDF from a template



## OpenAPI

````yaml post /pdf/render
openapi: 3.1.0
info:
  title: Pictify API
  version: 1.0.0
  description: |
    Generate images, GIFs, and PDFs from HTML templates programmatically.

    ## Authentication
    All API requests require a Bearer token in the Authorization header:
    ```
    Authorization: Bearer pk_live_your_api_key
    ```

    ## Rate Limits
    - Free: 60 requests/minute
    - Pro: 300 requests/minute
    - Business: 1,000 requests/minute

    Rate limit headers are included in all responses.
  contact:
    email: support@pictify.io
    url: https://pictify.io
  license:
    name: MIT
servers:
  - url: https://api.pictify.io
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Images
    description: Image generation endpoints
  - name: GIFs
    description: GIF generation and capture
  - name: PDFs
    description: PDF generation
  - name: Templates
    description: Template management
  - name: Batch
    description: Batch rendering operations
  - name: Experiments
    description: A/B testing, smart links, and scheduled variant experiments
  - name: Webhooks
    description: Webhook subscription management
  - name: Bindings
    description: Data binding for auto-rendering
paths:
  /pdf/render:
    post:
      tags:
        - PDFs
      summary: Generate a PDF
      description: Generate a single-page PDF from a template
      operationId: renderPdf
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PdfRenderRequest'
      responses:
        '200':
          description: PDF generated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PdfResponse'
components:
  schemas:
    PdfRenderRequest:
      type: object
      required:
        - templateUid
      properties:
        templateUid:
          type: string
          description: Template UID
        variables:
          type: object
          additionalProperties: true
        options:
          type: object
          properties:
            preset:
              type: string
              enum:
                - A4
                - Letter
                - Legal
                - A3
                - A5
                - custom
              default: A4
            customSize:
              type: object
              properties:
                width:
                  type: integer
                height:
                  type: integer
            margins:
              type: object
              properties:
                top:
                  type: integer
                bottom:
                  type: integer
                left:
                  type: integer
                right:
                  type: integer
            title:
              type: string
    PdfResponse:
      type: object
      properties:
        success:
          type: boolean
        url:
          type: string
          format: uri
        userStorageUrl:
          type: string
          format: uri
        pageCount:
          type: integer
        preset:
          type: string
        pageSize:
          type: object
          properties:
            width:
              type: integer
            height:
              type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key obtained from the Pictify dashboard

````