---
title: "Get presigned URL for large file upload"
method: POST
path: "/v1/memories/upload"
tags: ["Memories"]
---

# Get presigned URL for large file upload

`POST /v1/memories/upload`

Get a presigned URL for uploading large files directly to S3.

Use this for files larger than 5MB that cannot be sent inline as base64.
After uploading, reference the file in memory creation using S3FileReference.

Args:
    filename: Original filename (e.g., "image.jpg")
    content_type: MIME type (e.g., "image/jpeg", "application/pdf")
    file_size: Expected file size in bytes (max 100MB)

Returns:
    dict with:
    - upload_url: Presigned URL for PUT request (expires in 1 hour)
    - upload_headers: Headers that must be sent with the presigned PUT request
    - s3_key: The S3 key to reference in memory creation
    - bucket: S3 bucket name
    - expires_in: Seconds until URL expires
    - max_size: Maximum allowed file size

## Query parameters

- `filename` string, required — Original filename (e.g., 'image.jpg')
- `content_type` string, required — MIME type (e.g., 'image/jpeg', 'application/pdf')
- `file_size` integer, required — Expected file size in bytes (max 100MB)

## Response `200`

Successful Response

- NebulaResultsPresignedUploadResponse
  - `results` PresignedUploadResponse, required
    - `bucket` string, required
    - `download_url` string, required
    - `expires_in` integer, required
    - `max_size` integer, required
    - `s3_key` string, required
    - `upload_headers` object, required
    - `upload_url` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/zeroset-inc/apis/nebula-api.md) · [All operations](https://skmtc.net/zeroset-inc/apis/nebula-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/zeroset-inc/nebula-api/revisions/b1da2c0bb1ae/schema)
