---
title: "Upload a file"
method: POST
path: "/api/uploads"
tags: ["Uploads"]
---

# Upload a file

`POST /api/uploads`

## Request

- Base URL: `https://api.zvid.io`
- URL: `https://api.zvid.io/api/uploads`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Multipart upload using the file field. Caps: images 25 MiB, GIFs 50 MiB, audio 100 MiB, video 300 MiB. Account storage is 250 MB on Free, 10 GB on Hobby, 50 GB on Startup and 200 GB on Business (decimal). Read usage.maxTotalBytes from the list response. Use upload.url as an element source.

## Response `201`

New upload metadata

- object
  - `upload` Upload, required
    - `id` string, required
    - `kind` 'image' | 'video' | 'audio' | 'gif', required
    - `fileName` string, required
    - `mimeType` string
    - `sizeBytes` integer, required
    - `width` number, nullable
    - `height` number, nullable
    - `duration` number, nullable
    - `url` string, required
    - `createdAt` string

## Other responses

- `400`: Unsupported type or size/quota exceeded

---

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