Upload a file to an organization for use in vector stores, file search, or AI conversations.
POSThttps://api.aitronos.com/v1/organizations/{organization_id}/files/upload
Upload files directly through the API using multipart/form-data. This is the simplest upload method and works for files up to 100MB. The file is automatically uploaded to cloud storage, validated, and registered in the database. For larger files (>100MB) or when you need resumable uploads, use the resumable upload flow.
organization_id string required
The unique identifier of the organization.
file file required
The file to upload. Maximum file size: 100MB. File type and content are automatically validated using MIME type detection and magic byte verification.
Returns a File object with complete metadata including:
- Generated file ID
- Storage path in cloud storage
- File size and MIME type
- Upload timestamp and user information
cURL
- Bash
- Python
- JavaScript
curl -X POST https://api.aitronos.com/v1/organizations/org_123/files/upload \
-H "X-API-Key: $FREDDY_API_KEY" \
-F "file=@/path/to/document.pdf"- Documents: PDF, TXT, DOCX, DOC, RTF, MD
- Spreadsheets: CSV, XLSX, XLS
- Data: JSON, XML, YAML
- Code: PY, JS, TS, JAVA, CPP, and more
- Images: PNG, JPG, JPEG, WEBP (for vision models)