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

# Uploads

> Upload images and videos from the Yumi dashboard or through the API.

Yumi hosts images and videos. Upload files using the web dashboard, drag and drop, or the [Yumi API](https://docs.yumi.onl/api-guide.md).

## Upload from the dashboard

1. Sign in to your [Yumi dashboard](https://yumi.onl/dashboard).
2. Open **Upload**.
3. Select **Upload Image** or drag files into the upload area.
4. Wait for the upload to finish, then copy the file URL to share it.

## Supported files and size limits

Yumi accepts image and video files, including common formats such as PNG, JPG, MP4, MOV, and SVG. The API accepts MIME types that begin with `image/` or `video/`.

The current per-file limits are:

| Plan | Maximum file size |
| - | -: |
| Free | 10 MB |
| Premium | 50 MB |
| Pro | 500 MB |

Limits may change by plan. If an upload exceeds your account limit, Yumi returns a `file_too_large` error from the API or shows an upload error in the dashboard.

## Upload through the API

The API uses a three-step upload flow: request an upload URL, send the file bytes to that URL, then finalize the upload.

**1. Request an upload URL**

Send the file name, MIME type, and file size to `POST /api/v1/files`. Yumi returns a `fileId` and a temporary `uploadUrl`.

```bash theme={null}
curl -X POST https://yumi.onl/api/v1/files \
  -H "Authorization: Bearer $YUMI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"filename":"image.png","mime":"image/png","sizeBytes":12345}'
```

**2. Upload the bytes**

Send a `PUT` request to the returned `uploadUrl` with the file contents and its MIME type. The URL expires after 10 minutes.

```bash theme={null}
curl -X PUT "$UPLOAD_URL" \
  -H "Content-Type: image/png" \
  --data-binary @image.png
```

**3. Finalize the upload**

Tell Yumi that the direct upload finished by calling `POST /api/v1/files/{fileId}/complete`.

```bash theme={null}
curl -X POST "https://yumi.onl/api/v1/files/$FILE_ID/complete" \
  -H "Authorization: Bearer $YUMI_API_KEY"
```

The completion response includes the file ID, share URL, raw URL, MIME type, size, status, and creation time. See [API](https://docs.yumi.onl/api-guide.md) for authentication and the full endpoint reference.


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