# Start a large file upload

URL: https://clippie.ai/developers/docs/create-file-upload

Starts a multipart upload for files over 100 MB (up to 5 GB): returns presigned URLs to PUT each part to, valid for an hour, then call POST /v1/files/uploads/complete with each part's ETag.

## At a glance

| Property | Value |
| --- | --- |
| REST | `POST https://api.clippie.ai/v1/files/uploads` |
| MCP tool | REST only (not an MCP tool) |
| Scope | `create` |
| Cost | Spends nothing. Needs the `create` scope. |

## Parameters

| Name | In | Type | Required | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `fileName` | body | string | Yes |  | 1-120 chars. |
| `contentType` | body | string | Yes |  | image/*, video/* or audio/* 3-100 chars. |
| `sizeBytes` | body | integer | Yes |  | 1-5368709120. |

## Example

curl:

```bash
curl https://api.clippie.ai/v1/files/uploads \
  -H "Authorization: Bearer $CLIPPIE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "fileName": "long-video.mp4",
    "contentType": "video/mp4",
    "sizeBytes": 524288000
  }'
```

create-file-upload.mjs:

```js
const auth = { Authorization: `Bearer ${process.env.CLIPPIE_API_KEY}` };

const res = await fetch('https://api.clippie.ai/v1/files/uploads', {
  method: 'POST',
  headers: { ...auth, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "fileName": "long-video.mp4",
    "contentType": "video/mp4",
    "sizeBytes": 524288000
  }),
});
if (!res.ok) throw new Error((await res.json()).error.message);
console.log(await res.json());
```

## Response

`200` with JSON. The full response schema is in the [OpenAPI spec](https://api.clippie.ai/v1/openapi.json).
