Skip to content
Last updated

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.

Path Parameters

organization_id string required

The unique identifier of the organization.

Request Body (multipart/form-data)

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

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
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"

Supported File Types

  • 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)