---
title: "Get upload URL"
method: POST
path: "/v1/media/presign"
tags: ["Media"]
---

# Get upload URL

`POST /v1/media/presign`

Get a presigned URL to upload files directly to cloud storage (up to 5GB). Returns an uploadUrl and publicUrl. PUT your file to the uploadUrl, then use the publicUrl in your posts.

## Request body

- object
  - `filename` string, required — Name of the file to upload
  - `contentType` 'image/jpeg' | 'image/jpg' | 'image/png' | 'image/webp' | 'image/gif' | 'video/mp4' | 'video/mpeg' | 'video/quicktime' | 'video/avi' | 'video/x-msvideo' | 'video/webm' | 'video/x-m4v' | 'application/pdf' | 'audio/mpeg' | 'audio/mp4' | 'audio/aac' | 'audio/ogg' | 'audio/wav' | 'audio/webm' | 'audio/x-m4a', required — MIME type of the file
  - `size` integer — Optional file size in bytes for pre-validation (max 5GB)

## Response `200`

Presigned URL generated successfully

- object
  - `uploadUrl` string, uri — Presigned URL to PUT your file to (expires in 1 hour)
  - `publicUrl` string, uri — Public URL where the file will be accessible after upload
  - `key` string — Storage key/path of the file
  - `expiresIn` integer — Seconds until the presigned uploadUrl expires (always 3600)

## Other responses

- `400` — Invalid request (missing filename, unsupported contentType, or size out of range)
- `401` — Unauthorized

---

[API](https://skmtc.net/zernio/apis/zernio-api.md) · [All operations](https://skmtc.net/zernio/apis/zernio-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/zernio/zernio-api/versions/51932b099b2f/schema)
