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

# Post apipreview metadata

> Run metadata extraction on a file uploaded directly via multipart form-data.

Used by the upload dialog to show extracted metadata BEFORE the user
clicks "Upload" to commit the asset. The file is written to a temp
file in the pod, run through the adapter, and immediately deleted.

Bandwidth cost: the file is uploaded twice — once here for preview,
again to MinIO if the user confirms. Capped at
``METADATA_PREVIEW_MAX_BYTES`` (default 100 MB) to keep that cost bounded.



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/preview-metadata/
openapi: 3.0.3
info:
  title: Console API
  version: 1.0.0
  description: Central control plane API for the Dataerai platform.
servers:
  - url: https://{server}
    description: Your Dataerai deployment (the API is served under /api)
    variables:
      server:
        default: your-deployment.dataerai.com
        description: Host of your Dataerai deployment
security: []
paths:
  /api/preview-metadata/:
    post:
      tags:
        - api
      description: >-
        Run metadata extraction on a file uploaded directly via multipart
        form-data.


        Used by the upload dialog to show extracted metadata BEFORE the user

        clicks "Upload" to commit the asset. The file is written to a temp

        file in the pod, run through the adapter, and immediately deleted.


        Bandwidth cost: the file is uploaded twice — once here for preview,

        again to MinIO if the user confirms. Capped at

        ``METADATA_PREVIEW_MAX_BYTES`` (default 100 MB) to keep that cost
        bounded.
      operationId: api_preview_metadata_create
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PreviewMetadataMultipartRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreviewMetadataMultipartResponse'
          description: ''
        '400':
          description: No response body
        '413':
          description: No response body
        '503':
          description: No response body
      security:
        - cookieAuthCsrfExempt: []
components:
  schemas:
    PreviewMetadataMultipartRequest:
      type: object
      properties:
        file:
          type: string
          format: uri
      required:
        - file
    PreviewMetadataMultipartResponse:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/MetadataPreviewStatusEnum'
        metadata:
          nullable: true
        data_type:
          type: string
          nullable: true
        data_type_confidence:
          type: number
          format: double
          nullable: true
        error:
          type: string
          nullable: true
      required:
        - data_type
        - data_type_confidence
        - error
        - metadata
        - status
    MetadataPreviewStatusEnum:
      enum:
        - succeeded
        - skipped
        - failed
      type: string
      description: |-
        * `succeeded` - Succeeded
        * `skipped` - Skipped
        * `failed` - Failed

````