# Start a media upload

Source: https://ampost.io/docs/api/media-upload-create · Full reference: https://ampost.io/llms-full.txt

`POST /api/media/uploads` · MCP tool `media_upload_create` · scope `media:write` · rate limit `mediaUpload` · success `201`

Get a way to upload a local file for a post. Media in posts_create must be a public URL; use this when the user has the file on their device or you have the file itself. Returns `uploadPageUrl`, an Ampost page where the user uploads files in a browser (in MCP, a client that supports URL elicitation asks the user to open it itself and leaves `uploadPageUrl` out), and `uploadUrl` + `method` + `headers` to PUT one file directly. Both stop accepting files after 60 minutes. Then poll media_upload_status; when it is completed, its `files` are `media[]` items for posts_create. Files that no post uses are deleted 24 hours after the upload was created (by the hourly cleanup). At most 20 upload links accept files at once (`RATE_LIMITED` with `Retry-After` past that), and each of them holds 200 MB of the plan's media storage while it accepts files (`QUOTA_EXCEEDED` with `details.quota` `storedMediaBytes` when that does not fit).

| Field | In | Type | Required | Description |
|---|---|---|---|---|
| `fileName` | body | string | no | File name for the direct upload, e.g. `launch.mp4`; it becomes the end of the file URL. Default `file`. Files uploaded on the page keep their own names. |

Example request:

```json
{
  "fileName": "launch.mp4"
}
```

Example response:

```json
{
  "id": "3c7e9a1b-5d2f-4e8a-9b6c-1f3d5a7e9c20",
  "status": "pending",
  "uploadPageUrl": "https://ampost.io/upload/3c7e9a1b-5d2f-4e8a-9b6c-1f3d5a7e9c20#token=one-time-token",
  "uploadUrl": "https://vercel.com/api/blob/?pathname=uploads%2F3c7e9a1b-5d2f-4e8a-9b6c-1f3d5a7e9c20%2Flaunch.mp4",
  "method": "PUT",
  "headers": {
    "authorization": "Bearer vercel_blob_client_...",
    "x-api-version": "12",
    "x-vercel-blob-access": "public",
    "x-add-random-suffix": "0"
  },
  "limits": {
    "maxFiles": 35,
    "maxSizeBytes": 209715200,
    "mimeTypes": [
      "image/jpeg",
      "image/png",
      "image/webp",
      "video/mp4",
      "video/quicktime",
      "video/webm"
    ]
  },
  "createdAt": "2026-10-06T12:00:00.000Z",
  "expiresAt": "2026-10-06T13:00:00.000Z"
}
```
