---
title: "Upload a file"
method: POST
path: "/v1/files"
tags: ["Files"]
---

# Upload a file

`POST /v1/files`

## Request

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

Upload up to 1 GB in the request body. For larger files (up to 5 GB), use an upload URL. An upload that takes longer than about 2.5 minutes is answered with a 303 redirect to its result: follow redirects (most HTTP clients do by default).

## Request body `application/octet-stream`

- string, binary

## Response `201`

File stored.

- File
  - `id` string, required: Use as `file_id`.
  - `object` 'file', required
  - `size_bytes` integer, required
  - `created_at` string, date-time, required
  - `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.

## Other responses

- `400`: Empty request body. Codes: `invalid_request`.
- `401`: Missing or invalid API key. Codes: `unauthorized`.
- `403`: The account may not upload. Codes: `account_suspended`, `account_disabled`, `model_access_denied`.
- `413`: Larger than 1 GB. Codes: `file_too_large`.
- `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)
