Skip to main content
POST
Initialize file upload

Authorizations

X-API-Key
string
header
required

Memic API key. Every key is bound to exactly one environment — get one from the Memic dashboard under API Keys.

Body

application/json

Request DTO for initializing file upload (presigned URL approach).

filename
string
required

Original filename

Required string length: 1 - 500
size
integer
required

File size in bytes

mime_type
string
required

MIME type of the file

metadata
Metadata · object | null

Optional metadata

reference_id
string | null

Client-provided reference ID for linking with external systems (e.g., 'TG_G1_Math'). Stored in both database and Pinecone for lookup-based search filtering.

Maximum string length: 255
environment_slug
string | null
default:production

Target environment slug ('staging' or 'production'). Defaults to 'production'.

folder_id
string<uuid4> | null

Target folder ID within the environment. If not provided, uses the default folder.

Response

Successful Response

Response DTO for file upload initialization.

file_id
string<uuid4>
required
upload_url
string
required
expires_in
integer
default:3600

URL expiry in seconds