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

# Render a document from JSON as page images (temporary)

> Submit a document JSON for rendering to page images. The document is rendered to PDF internally and converted with the same PDF image conversion pipeline used by PDF tools. Single-page output is a PNG/JPEG file; multi-page output is a ZIP archive.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/dev/render/images
openapi: 3.0.0
info:
  title: Autype Developer API
  description: >-
    Autype Developer API for programmatic document generation.


    ## Authentication

    Use an API key in `X-API-Key`. Autype's trusted MCP service may instead use
    a short-lived, Developer-API-audience OAuth token obtained through
    server-side token exchange. Raw MCP resource tokens, login JWTs, and
    third-party tokens are not accepted.


    ## Rate Limiting

    API requests are rate-limited to 100 requests per minute per API key.


    ## Automation Credits

    Developer API rendering and bulk operations consume automation credits from
    your organization. AI documents, assistant tasks, translations, and AI
    images use separate plan allowances.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.autype.com
    description: Production
security: []
tags:
  - name: Temporary Images
    description: Upload and manage temporary images for document rendering
  - name: Render
    description: Render documents to PDF, DOCX, ODT, or page images
  - name: Bulk Render
    description: Bulk document generation with variable substitution
  - name: Documents
    description: Document variable inspection
  - name: Projects
    description: List organization projects
paths:
  /api/v1/dev/render/images:
    post:
      tags:
        - developer-api
      summary: Render a document from JSON as page images (temporary)
      description: >-
        Submit a document JSON for rendering to page images. The document is
        rendered to PDF internally and converted with the same PDF image
        conversion pipeline used by PDF tools. Single-page output is a PNG/JPEG
        file; multi-page output is a ZIP archive.
      operationId: RenderController_renderImages_v1
      parameters:
        - name: strict
          required: false
          in: query
          description: >-
            Enable strict validation mode (validates anchors, references,
            citations, abbreviations, and footnotes)
          schema:
            type: boolean
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RenderDocumentImagesDto'
      responses:
        '201':
          description: Image render job created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderResponseDto'
        '400':
          description: Invalid document JSON or insufficient credits
        '401':
          description: Invalid or missing API key
      security:
        - mcp-oauth: []
        - api-key: []
components:
  schemas:
    RenderDocumentImagesDto:
      type: object
      properties:
        config:
          description: >-
            Complete document JSON following the Autype document schema. Must
            include `document` (with `type`) and `sections`. May also include
            `variables`, `defaults`, `abbreviations`, `citations`, `footnotes`,
            and `style` — all at the same level inside this object. The output
            format is determined by the `document.type` field (pdf, docx, or
            odt). Variable placeholders can use either `{{varName}}` or
            `${varName}` syntax — both are accepted on input. See the **Document
            JSON Syntax** docs for the full schema reference.
          example:
            document:
              type: pdf
              size: A4
            variables:
              companyName: Acme Inc
            sections:
              - id: section-1
                type: flow
                content:
                  - type: h1
                    text: Hello {{companyName}}
                  - type: text
                    text: This is a paragraph.
          allOf:
            - $ref: '#/components/schemas/DocumentJsonSchema'
        pdfProfile:
          type: string
          enum:
            - standard
            - pdfa-1b
            - pdfa-2b
            - pdfa-3b
            - pdfua-1
          default: standard
          description: >-
            PDF output profile. Only valid for PDF output. PDF/A and PDF/UA
            profiles flatten interactive form fields to preserve the selected
            profile.
        webhook:
          description: >-
            Optional webhook configuration. Receives a POST when the job
            completes or fails.
          allOf:
            - $ref: '#/components/schemas/WebhookConfigDto'
        image:
          description: Image output options.
          allOf:
            - $ref: '#/components/schemas/RenderImageOptionsDto'
      required:
        - config
    RenderResponseDto:
      type: object
      properties:
        jobId:
          type: string
          description: Render job ID for status polling
        status:
          type: string
          enum:
            - PENDING
            - PROCESSING
            - COMPLETED
            - FAILED
        downloadUrl:
          type: string
          description: >-
            Autype API download URL with signed token (only when completed).
            Supports direct browser download.
        filename:
          type: string
          description: Filename for download
        filloutId:
          type: string
          description: >-
            Saved record ID when rendering a persistent document with variable
            values.
        format:
          type: string
          enum:
            - PDF
            - DOCX
            - ODT
            - PNG
            - JPEG
        error:
          type: string
          description: Error message if failed
        creditCost:
          type: number
          description: Credit cost for this render job
        createdAt:
          format: date-time
          type: string
        completedAt:
          format: date-time
          type: string
      required:
        - jobId
        - status
        - format
        - creditCost
        - createdAt
    DocumentJsonSchema:
      type: object
      properties:
        document:
          description: Document settings (page size, margins, orientation, output format)
          allOf:
            - $ref: '#/components/schemas/DocumentSettingsSchema'
        sections:
          type: array
          description: >-
            Array of document sections (min: 1, max: 500). Each section is an
            object with id, type (flow|page), and content array. See the
            **Document JSON Syntax** docs for the full section and element
            reference.
          items:
            type: object
          example:
            - type: flow
              content:
                - type: h1
                  text: Hello World
                - type: text
                  text: This is a paragraph.
        stylePresetId:
          type: string
          description: >-
            Optional workspace style UUID or immutable built-in system:<id>.
            When provided, the API resolves the preset server-side and merges it
            with any inline defaults. Inline defaults win.
          example: 550e8400-e29b-41d4-a716-446655440000
        variables:
          type: object
          description: >-
            Variables for template substitution. Keys are variable names, values
            are strings or objects (for images/lists/tables). Reference
            variables in text with {{varName}} or ${varName} syntax.
          example:
            companyName: Acme Inc
            invoiceDate: '2024-01-15'
        abbreviations:
          type: object
          description: Abbreviations map. Keys are abbreviations, values are full text
          example:
            API: Application Programming Interface
        defaults:
          type: object
          description: >-
            Default styles and formatting options (fontFamily, fontSize, styles,
            header, footer, etc.)
          example:
            fontFamily: arial
            fontSize: 11
        citations:
          type: array
          description: Citations array (CSL-JSON format) for bibliography
          items:
            type: object
        footnotes:
          type: array
          description: >-
            Footnote definitions referenced from inline text with [^id]. IDs
            must be unique and begin with a letter.
          items:
            type: object
          example:
            - id: review
              content: Independent review, page 42.
      required:
        - document
        - sections
    WebhookConfigDto:
      type: object
      properties:
        webhookUrl:
          type: string
          example: https://example.com/webhook
          description: URL to receive a POST notification when the job completes or fails
        webhookAuth:
          description: >-
            Optional authentication for the webhook request (custom header or
            Basic Auth)
          allOf:
            - $ref: '#/components/schemas/WebhookAuthDto'
    RenderImageOptionsDto:
      type: object
      properties:
        format:
          type: string
          description: 'Output image format. Default: png.'
          enum:
            - png
            - jpeg
          example: png
        dpi:
          type: number
          description: 'Resolution in DPI. Default: 150.'
          example: 150
          minimum: 72
          maximum: 600
        pages:
          description: >-
            Page specifications to render as images, e.g. ["1"] or ["1-3"]. If
            omitted, all pages are exported.
          example:
            - 1-3
          type: array
          items:
            type: string
    DocumentSettingsSchema:
      type: object
      properties:
        type:
          type: string
          description: Output format
          enum:
            - pdf
            - docx
            - odt
          example: pdf
        size:
          type: string
          description: Page size
          enum:
            - A4
            - A3
            - A5
            - Letter
            - Legal
          example: A4
        orientation:
          type: string
          description: Page orientation
          enum:
            - portrait
            - landscape
          example: portrait
        title:
          type: string
          description: Document title (PDF metadata)
          example: 'Invoice #123'
        author:
          type: string
          description: Document author (PDF metadata)
          example: Acme Inc
        language:
          type: string
          description: BCP 47 document language used by export-readiness checks
          example: de-DE
        subject:
          type: string
          description: Document subject metadata
          example: Quarterly management report
        keywords:
          description: Document metadata keywords
          example:
            - quarterly report
            - management
          type: array
          items:
            type: string
        marginTop:
          type: number
          description: Top margin in cm
          example: 2.5
        marginBottom:
          type: number
          description: Bottom margin in cm
          example: 2.5
        marginLeft:
          type: number
          description: Left margin in cm
          example: 2.5
        marginRight:
          type: number
          description: Right margin in cm
          example: 2.5
        filename:
          type: string
          description: Output filename (without extension)
          example: invoice-123
      required:
        - type
    WebhookAuthDto:
      type: object
      properties:
        headerName:
          type: string
          example: X-API-Key
          description: Custom header name
        headerValue:
          type: string
          example: my-secret-key
          description: Custom header value
        basicAuthUsername:
          type: string
          example: user
          description: Username for Basic Auth
        basicAuthPassword:
          type: string
          example: pass
          description: Password for Basic Auth
  securitySchemes:
    mcp-oauth:
      scheme: bearer
      bearerFormat: Autype Developer API OAuth token
      type: http
      description: >-
        Short-lived, Developer-API-audience token obtained by the trusted MCP
        service through token exchange (mcp_at_...). Raw MCP resource tokens are
        rejected.
    api-key:
      type: apiKey
      in: header
      name: X-API-Key
      description: API Key (starts with ak_...)

````