> ## 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 Extended Markdown (temporary)

> Submit Extended Markdown content for rendering to PDF, DOCX, or ODT. This is a **temporary render** — the Markdown is not persisted and the render output expires. No document is created in your Autype workspace. The Markdown is converted to document sections automatically. Supports all Autype extended Markdown syntax (directives, charts, math, tables, etc.). Returns a job ID for status polling. Credits are charged on successful completion.



## OpenAPI

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


    ## Authentication

    All endpoints require an API key. Include it in the `X-API-Key` header or as
    a Bearer token.


    ## Rate Limiting

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


    ## Token Billing

    Rendering operations consume tokens from your organization's balance.
  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, or ODT
  - 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/markdown:
    post:
      tags:
        - developer-api
      summary: Render a document from Extended Markdown (temporary)
      description: >-
        Submit Extended Markdown content for rendering to PDF, DOCX, or ODT.
        This is a **temporary render** — the Markdown is not persisted and the
        render output expires. No document is created in your Autype workspace.
        The Markdown is converted to document sections automatically. Supports
        all Autype extended Markdown syntax (directives, charts, math, tables,
        etc.). Returns a job ID for status polling. Credits are charged on
        successful completion.
      operationId: RenderController_renderMarkdown_v1
      parameters:
        - name: strict
          required: false
          in: query
          description: >-
            Enable strict validation mode (validates anchors, references,
            citations, abbreviations)
          schema:
            type: boolean
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RenderMarkdownDocumentDto'
      responses:
        '201':
          description: Render job created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderResponseDto'
        '400':
          description: >-
            Invalid Markdown content, invalid document settings, or insufficient
            credits
        '401':
          description: Invalid or missing API key
      security:
        - api-key: []
components:
  schemas:
    RenderMarkdownDocumentDto:
      type: object
      properties:
        content:
          type: string
          description: >-
            Extended Markdown content. Will be converted to document sections
            automatically. Supports all Autype extended Markdown syntax
            (directives, charts, math, etc.)
          example: |
            # Hello ${companyName}

            This is a **professional** document.

            ## Features

            - Item 1
            - Item 2
        document:
          description: >-
            Document settings (page size, margins, orientation, metadata). Must
            include "type" field.
          example:
            type: pdf
            size: A4
            orientation: portrait
          allOf:
            - $ref: '#/components/schemas/MarkdownDocumentSettingsSchema'
        variables:
          type: object
          example:
            name: Acme Inc
            date: '2024-01-01'
        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.)
        citations:
          type: array
          description: Citations array (CSL-JSON format) for bibliography
          items:
            type: object
        style:
          type: object
          description: Style configuration for the document
        webhook:
          description: >-
            Optional webhook configuration. Receives a POST when the job
            completes or fails.
          allOf:
            - $ref: '#/components/schemas/WebhookConfigDto'
      required:
        - content
        - document
    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
        format:
          type: string
          enum:
            - PDF
            - DOCX
            - ODT
        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
    MarkdownDocumentSettingsSchema:
      type: object
      properties:
        type:
          type: string
          description: 'Output format: pdf, docx, or odt'
          example: pdf
          enum:
            - pdf
            - docx
            - odt
        size:
          type: string
          description: Page size
          example: A4
          enum:
            - A4
            - A3
            - A5
            - Letter
            - Legal
            - Tabloid
        orientation:
          type: string
          description: Page orientation
          enum:
            - portrait
            - landscape
          example: portrait
        title:
          type: string
          description: Document title (PDF metadata)
          example: My Document
        marginTop:
          type: number
          description: Top margin in cm
        marginBottom:
          type: number
          description: Bottom margin in cm
        marginLeft:
          type: number
          description: Left margin in cm
        marginRight:
          type: number
          description: Right margin in cm
      required:
        - type
    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'
    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:
    api-key:
      type: apiKey
      in: header
      name: X-API-Key
      description: API Key (starts with ak_...)

````