> ## 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 temporary image

> Upload a temporary image for use in ad-hoc renders (POST /render, POST /render/markdown). Images expire after 24 hours. Use the returned refPath (e.g. `/temp-image/{id}`) in your document JSON image src. **Not suitable for persistent documents** — persistent documents use permanent images uploaded via the Autype app.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/dev/images/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/images/upload:
    post:
      tags:
        - developer-api
      summary: Upload a temporary image
      description: >-
        Upload a temporary image for use in ad-hoc renders (POST /render, POST
        /render/markdown). Images expire after 24 hours. Use the returned
        refPath (e.g. `/temp-image/{id}`) in your document JSON image src. **Not
        suitable for persistent documents** — persistent documents use permanent
        images uploaded via the Autype app.
      operationId: ImagesController_uploadTempImage_v1
      parameters: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
                  description: Image file (JPEG, PNG, or WebP, max 25MB)
      responses:
        '201':
          description: Image uploaded successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TempImageResponseDto'
        '400':
          description: Invalid file or insufficient credits
        '401':
          description: Invalid or missing API key
      security:
        - api-key: []
components:
  schemas:
    TempImageResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the temporary image
          example: 550e8400-e29b-41d4-a716-446655440000
        filename:
          type: string
          description: Original filename of the uploaded image
          example: company-logo.png
        mimeType:
          type: string
          description: MIME type of the image
          example: image/png
        sizeBytes:
          type: number
          description: Size of the image in bytes
          example: 102400
        refPath:
          type: string
          description: Reference path to use in document JSON (use this in image src)
          example: /temp-image/550e8400-e29b-41d4-a716-446655440000
        expiresAt:
          format: date-time
          type: string
          description: Expiration time of the temporary image
          example: '2024-01-16T12:00:00.000Z'
        createdAt:
          format: date-time
          type: string
          description: Creation time of the temporary image
          example: '2024-01-15T12:00:00.000Z'
      required:
        - id
        - filename
        - mimeType
        - sizeBytes
        - refPath
        - expiresAt
        - createdAt
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: X-API-Key
      description: API Key (starts with ak_...)

````