Upload a file as a multimodal memory via multipart form data.
POST /v1/remember/upload
Upload a file (image, audio, video, document, or sensor data) as a memory via multipart form data. Use this for files larger than 10 MB, or when you prefer file upload over base64 encoding.
The file is stored in the blob store and processed asynchronously. The text content field is indexed immediately for search, and AI-generated descriptions are added once processing completes.
Endpoint
POST https://api.cortexdb.ai/v1/remember/upload
Content-Type: multipart/form-data
Parameters (form fields)
| Parameter | Type | Required | Description |
|---|---|---|---|
| file | file | Yes | The file to upload (max 1 GB) |
| content | string | No | Text description of the file — used for immediate searchability. Auto-generated from file name if omitted. |
| content_type | string | No | Modality type (e.g. "image", "audio", "video", "document", "sensor"). Auto-detected from MIME type if omitted. |
| scope | string | No | Optional scope qualifier |
| metadata | string (JSON) | No | Arbitrary key-value metadata as a JSON string |
tenant_id is derived from the authenticated API key, not a form field.
Examples
from cortexdb import CortexDBClient
client = CortexDBClient(base_url="http://localhost:8080", api_key="your-api-key")
with open("meeting-recording.mp4", "rb") as f:
result = await client.upload(
file_data=f.read(),
content_type="video",
mime_type="video/mp4",
content="Recording of Q1 planning meeting with engineering team",
)
print(f"Stored as: {result.event_id}")
print(f"Processing: {result.processing_status}")
import { CortexDB } from "cortexdbai";
import { readFileSync } from "fs";
const client = new CortexDB({ apiKey: "your-api-key" });
const fileData = readFileSync("meeting-recording.mp4");
const result = await client.upload(
fileData,
"video",
"video/mp4",
"Recording of Q1 planning meeting with engineering team",
);
console.log(`Stored as: ${result.eventId}`);
curl -X POST https://api.cortexdb.ai/v1/remember/upload \
-H "Authorization: Bearer your-api-key" \
-F "[email protected]" \
-F "content_type=video" \
-F "content=Recording of Q1 planning meeting with engineering team" \
-F 'metadata={"meeting": "q1-planning", "team": "engineering"}'
Response
{
"event_id": "01912a3b-4c5d-7e6f-8a9b-0c1d2e3f4a5b",
"blob_id": "01912a3b-4c5d-7e6f-8a9b-0c1d2e3f4a5c",
"content_type": "video",
"processing_status": "pending"
}
| Field | Type | Description |
|---|---|---|
| event_id | string | UUID of the stored event |
| blob_id | string | UUID of the stored blob — use with GET /v1/blobs/:blob_id to download |
| content_type | string | Detected modality type |
| processing_status | string | pending — async processing queued; complete when done |
Limits
| Limit | Value | |---|---| | Max file size | 1 GB | | Supported formats | See Multimodal Memory for full list |
Error Codes
| Code | Meaning |
|---|---|
| 400 | Missing required field (file) |
| 413 | File exceeds 1 GB limit |
| 415 | Unsupported file format |
| 429 | Rate limit exceeded |
See Also
- POST /v1/remember — store text or inline base64 content
- GET /v1/blobs/:blob_id — retrieve stored files
- Multimodal Memory — full guide