Appearance
Knowledge Storage
Upload files and search across them with AI-powered semantic search.
Overview
Every user gets private S3 storage for documents, data files, and images. Uploaded files are automatically chunked, embedded, and indexed for semantic search.
Features
- File upload — PDFs, text files, CSVs, Word docs, images
- Folder organization — Create folders to organize files
- Semantic search — Find content by meaning, not just keywords
- Auto-indexing — Files are indexed automatically after upload
- Private — Only you can access your files
Quick Start
Upload a File
Option 1: Direct upload (recommended for text files and AI agents)
bash
curl -s -X POST https://api.universalapi.co/knowledge/upload \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"fileName": "notes.md",
"content": "# My Notes\n\nHello from the API!",
"contentType": "text/markdown",
"folder": "documents"
}' | jqOption 2: Presigned URL (for large files up to 100MB)
bash
# 1. Get a presigned upload URL
curl -s -X POST https://api.universalapi.co/knowledge/upload-url \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"fileName": "report.pdf", "contentType": "application/pdf"}' | jq
# 2. Upload the file to the presigned URL
curl -X PUT -H "Content-Type: application/pdf" \
--data-binary @report.pdf \
"PRESIGNED_UPLOAD_URL_FROM_STEP_1"List Files
bash
curl -s https://api.universalapi.co/knowledge/list \
-H "Authorization: Bearer YOUR_TOKEN" | jqSearch Your Files
bash
curl -s -X POST https://api.universalapi.co/knowledge/search \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"query": "quarterly revenue figures"}' | jqDownload a File
bash
curl -s -X POST https://api.universalapi.co/knowledge/download-url \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"key": "users/xxx/documents/report.pdf"}' | jqCreate a Folder
bash
curl -s -X POST https://api.universalapi.co/knowledge/create-folder \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"folderName": "documents"}' | jqStorage Quotas
| Tier | Storage |
|---|---|
| Free | 100 MB |
| Starter | 1 GB |
| Professional | 10 GB |
Next Steps
- Knowledge API Reference — Complete endpoint docs