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

# Upload file

> Upload a single file via multipart form.

**Path:** `POST https://api.omniall.ai/v1/files`

Use the returned `url` as an image/video/audio reference in other APIs.

Auth: `Authorization: Bearer sk-...`



## OpenAPI

````yaml openapi/files-upload.yaml POST /v1/files
openapi: 3.1.0
info:
  title: Omniall AI — File upload
  version: 1.0.0
  description: |-
    Upload a file to Omniall storage and receive a public CDN URL.

    **Path:** `POST https://api.omniall.ai/v1/files`

    Content-Type: `multipart/form-data`. Field name: `file`.

    Default size limit is commonly **10MB** (site admin may configure).

    Auth: `Authorization: Bearer sk-...`
servers:
  - url: https://api.omniall.ai
security: []
paths:
  /v1/files:
    post:
      tags:
        - Platform
      summary: Upload file
      description: |-
        Upload a single file via multipart form.

        **Path:** `POST https://api.omniall.ai/v1/files`

        Use the returned `url` as an image/video/audio reference in other APIs.

        Auth: `Authorization: Bearer sk-...`
      operationId: uploadFile
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
            example: Bearer sk-...
          description: Bearer API key.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
                  description: File to upload (required). Size limit commonly 10MB.
            encoding:
              file:
                contentType: application/octet-stream
      responses:
        '200':
          description: Upload succeeded
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - object
                  - url
                  - filename
                  - bytes
                  - created_at
                properties:
                  id:
                    type: string
                    description: File id, e.g. `file-xxxxxxxx`.
                    example: file-xxxxxxxx
                  object:
                    type: string
                    example: file
                  url:
                    type: string
                    description: Public CDN URL for the uploaded file.
                    example: https://cdn.example.com/files/uploads/2026/06/03/xxx.pdf
                  filename:
                    type: string
                    description: Original filename.
                    example: demo.pdf
                  bytes:
                    type: integer
                    description: File size in bytes.
                    example: 12345
                  created_at:
                    type: integer
                    description: Unix timestamp (seconds).
                    example: 1710000000
              example:
                id: file-xxxxxxxx
                object: file
                url: https://cdn.example.com/files/uploads/2026/06/03/xxx.pdf
                filename: demo.pdf
                bytes: 12345
                created_at: 1710000000
        '400':
          description: Invalid request (missing file, empty, disallowed type, …)
        '413':
          description: File too large
        '503':
          description: File storage not configured

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.