---
title: "Create an upload URL"
method: POST
path: "/v1/files/upload-url"
tags: ["Files"]
---

# Create an upload URL

`POST /v1/files/upload-url`

## Request

- Base URL: `https://api.aircaps.com`
- URL: `https://api.aircaps.com/v1/files/upload-url`
- Auth: HTTP bearer

Get a presigned URL to upload a file of up to 5 GB straight to storage. `PUT` the raw bytes to `upload_url` within an hour, then use `id` as `file_id`.

## Response `201`

Upload URL created.

- UploadUrl
  - `id` string, required: Use as `file_id` after the upload.
  - `object` 'file', required
  - `upload_url` string, required: Presigned URL: `PUT` the raw file bytes here.
  - `method` 'PUT', required
  - `upload_expires_at` string, date-time, required: Upload before this (one hour).
  - `expires_at` string, date-time, required: Usable until this time (24 hours after upload); the file is deleted within the following 24 hours, or right away when a transcript that used it is deleted.
  - `max_size_bytes` integer, required

## Other responses

- `401`: Missing or invalid API key. Codes: `unauthorized`.
- `403`: The account may not upload. Codes: `account_suspended`, `account_disabled`, `model_access_denied`.
- `500`: Server error. Safe to retry (use the same Idempotency-Key). Codes: `internal_error`.
- `503`: Temporarily unavailable. Retry after the Retry-After interval. Codes: `service_unavailable`.

---

[API](https://skmtc.dev/aircaps/apis/aircaps-api.md) - [All operations](https://skmtc.dev/aircaps/apis/aircaps-api/llms.txt) - [OpenAPI document](https://skmtc.dev/aircaps/apis/aircaps-api/revisions/442d566f9827?raw)
