---
title: "Upload a file"
method: POST
path: "/media/uploads"
tags: ["Media"]
---

# Upload a file

`POST /media/uploads`

## Request

- Base URL: `https://api.vidmoat.com/v1`
- URL: `https://api.vidmoat.com/v1/media/uploads`
- Auth: HTTP bearer

Upload a file directly, as multipart form data, up to 32 MB per request and within your plan's upload and storage limits. For larger files, import from a URL.

## Response `201`

Upload a file

- object
  - `media` object: The stored file.
    - `url` string: Use as a clip `src`.
    - `filename` string: Stored name.
    - `bytes` integer: Size.
    - `deduplicated` boolean: `true` when you had already uploaded the same bytes; the existing file is returned.
    - `probe` object, nullable: `{ width, height, fps, duration, hasAudio }`.
    - `converted` object: Present when video the browser cannot play (HEVC, for example) was converted: `{ from, to }`.
    - `warning` string: Present when that conversion failed.
  - `hint` string: What to do with it.

## Other responses

- `400`: `invalid_request`: The body is not multipart, or `file` is missing or empty.
- `413`: `payload_too_large`: Over 32 MB, or over the plan's upload cap. `quota_exceeded`: Cloud storage on the plan is full.

---

[API](https://skmtc.dev/vidmoat/apis/vidmoat-api.md) · [All operations](https://skmtc.dev/vidmoat/apis/vidmoat-api/llms.txt) · [OpenAPI document](https://skmtc.dev/vidmoat/apis/vidmoat-api/revisions/23e24e25c756?raw)
