> ## 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.

# Upload a file

> Upload a file (PDF, DOCX, ODT, PNG, or JPEG, max 50 MB) for use with tool actions. Files expire after 60 minutes.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/dev/tools/files/upload
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/tools/files/upload:
    post:
      tags:
        - developer-api
      summary: Upload a file
      description: >-
        Upload a file (PDF, DOCX, ODT, PNG, or JPEG, max 50 MB) for use with
        tool actions. Files expire after 60 minutes.
      operationId: ToolsController_uploadFile_v1
      parameters: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
                  description: file (max 50 MB)
      responses:
        '201':
          description: File uploaded successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToolsFileResponseDto'
      security:
        - api-key: []
components:
  schemas:
    ToolsFileResponseDto:
      type: object
      properties:
        id:
          type: string
          description: File ID
          example: 550e8400-e29b-41d4-a716-446655440000
        filename:
          type: string
          description: Original filename
          example: document.pdf
        mimeType:
          type: string
          description: MIME type
          example: application/pdf
        sizeBytes:
          type: number
          description: File size in bytes
          example: 102400
        kind:
          type: string
          description: File kind (input or output)
          enum:
            - INPUT
            - OUTPUT
          example: INPUT
        sourceAction:
          type: object
          description: Source action (null for uploads, action name for outputs)
          nullable: true
          example: null
        expiresAt:
          format: date-time
          type: string
          description: Expiration timestamp
        createdAt:
          format: date-time
          type: string
          description: Upload timestamp
      required:
        - id
        - filename
        - mimeType
        - sizeBytes
        - kind
        - sourceAction
        - expiresAt
        - createdAt
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: X-API-Key
      description: API Key (starts with ak_...)

````