---
title: "Start a video or sound upload"
method: POST
path: "/v1/uploads"
tags: ["Files"]
---

# Start a video or sound upload

`POST /v1/uploads`

## Request

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

The first of three steps for a video or a sound: this answers with a URL. `PUT` the file's bytes there with exactly `upload_headers` within the hour, then complete the upload. Up to 1 GB of video (MP4, MOV, WebM) or 500 MB of audio (MP3, WAV, M4A), and up to 4 hours long. Needs credit on your balance. A workspace can upload 5 GB a day, with 10 uploads in flight at once.

Needs an API key with the `generations:write` scope.

## Request body

- UploadRequest
  - `content_type` 'video/mp4' | 'video/quicktime' | 'video/webm' | 'audio/mpeg' | 'audio/mp3' | 'audio/wav' | 'audio/x-wav' | 'audio/wave' | 'audio/mp4' | 'audio/x-m4a', required: The file's type: MP4, MOV or WebM video; MP3, WAV or M4A audio.
  - `bytes` integer, required: The file's exact size in bytes.
  - `filename` string: A name to keep with the file, such as `interview.mp4`.

## Response `201`

Where and how to send the bytes.

- Upload: Where to send a video's or a sound's bytes before you complete the upload.
  - `id` string, required: The upload's ID, `file_...`. Completing it makes a file with the same ID.
  - `object` 'upload', required
  - `content_type` string, required: The type you declared.
  - `bytes` integer, required: The size you declared, in bytes.
  - `filename` string, nullable, required: The name you gave, if any.
  - `upload_url` string, required: Where to send the file's bytes.
  - `upload_method` 'PUT', required: The method to send them with.
  - `upload_headers` object, required: Headers to send with the bytes, exactly as given.
  - `expires_at` string, date-time, required: When `upload_url` stops working, an hour after it was made.

## Other responses

- `400`: `invalid_parameter`, `conflicting_credentials`
- `401`: `authentication_required`
- `402`: `insufficient_credit`
- `403`: `permission_denied`
- `429`: `rate_limit_exceeded`

---

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