---
title: "Generate presigned upload URL"
method: POST
path: "/v1/upload/presigned-url"
---

# Generate presigned upload URL

`POST /v1/upload/presigned-url`

## Request

- Base URL: `https://api.ffmpeg-micro.com`
- URL: `https://api.ffmpeg-micro.com/v1/upload/presigned-url`
- Auth: HTTP bearer

Generates a presigned URL for direct file upload to Google Cloud Storage. This is the first step in the upload workflow - use the returned URL to upload your file.
**Upload Workflow:** 1. Call this endpoint to get a presigned URL 2. Upload file directly to GCS using HTTP PUT 3. Call `/v1/upload/confirm` to verify upload 4. Use the GCS URL in your transcode request
**Benefits:** - No server bandwidth usage - Faster uploads (direct to GCS) - Secure (presigned URLs expire)

## Request body

- object
  - `filename` string, required: Original filename (will be prefixed with timestamp)
  - `contentType` 'video/mp4' | 'video/webm' | 'video/quicktime' | 'video/x-msvideo' | 'audio/mpeg' | 'audio/mp4' | 'audio/aac' | 'audio/wav' | 'audio/ogg' | 'audio/opus' | 'audio/flac' | 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp', required: MIME type of the file. Must be one of the supported types below — note AVI is `video/x-msvideo` (not `video/avi`). Matroska/MKV is not supported.
  - `fileSize` integer, required: File size in bytes as a JSON number (not a string). Must be finite, positive, and under the hard cap of 1.9 GiB (2040109465 bytes). String values (including digit-only strings like "1024") are rejected with 400. Plans also carry their own maximum input file size (100 MB on Free, 1 GB on Starter, 2 GB on Pro); that limit is checked asynchronously after job creation — an oversize input still returns 201 from POST /v1/transcodes and the job then transitions to `failed` with `error_category: file_size`.

## Response `200`

Presigned URL generated successfully

- object
  - `success` boolean
  - `result` object
    - `uploadUrl` string, uri: Presigned URL for HTTP PUT upload
    - `filename` string: Final filename in GCS (with timestamp prefix)

## Other responses

- `400`: Bad Request
- `401`: Missing/invalid API key
- `500`: Unexpected error

---

[API](https://skmtc.dev/ffmpeg-micro/apis/ffmpeg-micro-api.md) · [All operations](https://skmtc.dev/ffmpeg-micro/apis/ffmpeg-micro-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ffmpeg-micro/apis/ffmpeg-micro-api/revisions/64bb930ff345?raw)
