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

# Get a pre-signed URL to upload large files (.docx/PDF/HTML/MD/RTF) without bloating agent context.

> Returns a short-lived (5-minute) PUT URL plus a ready-to-run `curl_example`. An agent with shell access can run the `curl_example` directly to push the file to cloud storage, so the bytes never pass through its context window; clients without shell execution can surface the command or URL for the caller to run. After upload completes, call process_uploaded_document with the upload_id to trigger parsing. For files <100KB where token cost is trivial, upload_document_base64 still works inline. Max file size: 100 MB. Supported formats: .pdf, .docx, .txt, .rtf, .md, .html, .htm, .tex (plus .zip LaTeX project archives).



## OpenAPI

````yaml /openapi.json post /v1/uploads
openapi: 3.1.0
info:
  title: Universal Document AI API
  description: AI-powered document editing with multi-tenant organization support
  version: 2.0.0
servers: []
security: []
paths:
  /v1/uploads:
    post:
      tags:
        - uploads
        - mcp
        - uploads
      summary: >-
        Get a pre-signed URL to upload large files (.docx/PDF/HTML/MD/RTF)
        without bloating agent context.
      description: >-
        Returns a short-lived (5-minute) PUT URL plus a ready-to-run
        `curl_example`. An agent with shell access can run the `curl_example`
        directly to push the file to cloud storage, so the bytes never pass
        through its context window; clients without shell execution can surface
        the command or URL for the caller to run. After upload completes, call
        process_uploaded_document with the upload_id to trigger parsing. For
        files <100KB where token cost is trivial, upload_document_base64 still
        works inline. Max file size: 100 MB. Supported formats: .pdf, .docx,
        .txt, .rtf, .md, .html, .htm, .tex (plus .zip LaTeX project archives).
      operationId: request_upload_url
      parameters:
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UploadUrlRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadUrlResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    UploadUrlRequest:
      properties:
        filename:
          type: string
          maxLength: 255
          title: Filename
          description: >-
            Original filename including extension (e.g. 'contract.docx'). Used
            downstream for file-type detection.
        content_type:
          type: string
          maxLength: 200
          title: Content Type
          description: >-
            MIME type the agent will PUT with (e.g.
            'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
            for .docx).
        size_bytes:
          type: integer
          maximum: 104857600
          exclusiveMinimum: 0
          title: Size Bytes
          description: File size in bytes. Must be > 0 and <= 104857600 (100 MB).
        purpose:
          type: string
          enum:
            - document
            - attachment
            - export-html
          title: Purpose
          description: >-
            What this file will be used for. 'document' = the active editable
            doc; 'attachment' = read-only AI-searchable reference; 'export-html'
            = HTML payload destined for /v1/documents/export (large-export
            upload flow, for documents above ~25 MB).
          default: document
      type: object
      required:
        - filename
        - content_type
        - size_bytes
      title: UploadUrlRequest
    UploadUrlResponse:
      properties:
        upload_id:
          type: string
          title: Upload Id
        upload_url:
          type: string
          title: Upload Url
        expires_at:
          type: string
          title: Expires At
        expires_in_seconds:
          type: integer
          title: Expires In Seconds
        max_size_bytes:
          type: integer
          title: Max Size Bytes
        curl_example:
          type: string
          title: Curl Example
      type: object
      required:
        - upload_id
        - upload_url
        - expires_at
        - expires_in_seconds
        - max_size_bytes
        - curl_example
      title: UploadUrlResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````