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

# Upload Video — from File

> Upload a video file (multipart)

<Info>
  **Product**: Video Datalake
  **Host**: `https://api.memories.ai/datalake/v1`
  **Auth**: `Authorization: sk-mai-...`
</Info>

Upload a local video file directly with `multipart/form-data`: a `json` part (common fields, no `source_url`) plus a `file` part. Returns `202` + `video_id` + `operation`.

<Note>
  **Pricing:** \$0.04 / minute of indexed video · See [Pricing](/datalake/pricing) for the full model.
</Note>

## Response Fields

<ResponseField name="video_id" type="string">New video ID.</ResponseField>
<ResponseField name="operation" type="string">Ingest Operation handle.</ResponseField>

## Notes

Non-video extensions return **415 unsupported\_media**.


## OpenAPI

````yaml POST /datalake/v1/videos
openapi: 3.1.0
info:
  title: Memories.ai DataLake API 2.0
  version: 2026-08
  description: OpenAPI mapping used by Mintlify Try it for the DataLake API 2.0 docs.
servers:
  - url: https://api.memories.ai
security:
  - ApiKeyAuth: []
paths:
  /datalake/v1/videos:
    post:
      tags:
        - Videos — Upload
      summary: Upload a video
      description: >-
        Create a video from a public URL (`application/json`), a direct file
        (`multipart/form-data`), or a resumable session (`?upload=resumable`).
        Returns `202` + a `video_id` and an `operation`.
      operationId: upload_video
      parameters:
        - name: upload
          in: query
          required: false
          schema:
            type: string
            enum:
              - resumable
          description: >-
            Set to `resumable` to start a chunked upload session for large
            files.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                collection_id:
                  type: string
                  description: >-
                    Target collection. The video inherits its embedding model /
                    detectors / face config.
                source_url:
                  type: string
                  description: >-
                    URL mode only: a **public direct link**. Platform links
                    (YouTube/TikTok) fail with `source_unresolved`.
                fps:
                  type: number
                  description: Sampling frame rate [0.1, 30]. Default 1.0.
                  default: 1
                captured_at:
                  type: string
                  description: ISO-8601 capture time (falls back to video EXIF).
                location:
                  type: object
                  properties:
                    lat:
                      type: number
                      minimum: -90
                      maximum: 90
                    lng:
                      type: number
                      minimum: -180
                      maximum: 180
                metadata:
                  type: object
                  description: >-
                    `{title, tags:[], custom:{}}`. Set `title` to the original
                    filename.
                callback_url:
                  type: string
                  description: HTTPS webhook, ≤512 chars, fired on completion.
                idempotency_key:
                  type: string
                  description: ≤128 chars. Same key re-submits the existing video.
              required:
                - collection_id
              example:
                collection_id: col_xxx
                source_url: https://cdn.example.com/a.mp4
                fps: 1
          multipart/form-data:
            schema:
              type: object
              properties:
                json:
                  type: string
                  description: >-
                    JSON string of the common fields (collection_id, fps,
                    metadata, …); omit source_url.
                file:
                  type: string
                  format: binary
                  description: The video file (file mode).
              required:
                - json
      responses:
        '200':
          description: Accepted
          content:
            application/json:
              example:
                video_id: vid_xxx
                operation: op_xxx
                status: processing
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'Send `Authorization: sk-mai-...`'

````