File Storage
File Storage
ZeroDB includes S3-compatible file storage for documents, images, and agent artifacts, scoped per project. Every path below requires your project's ID.
Upload a File
Uploads are multipart/form-data, not a JSON body — send the file as file, with project_id in the path.
curl -X POST https://api.ainative.studio/api/v1/public/zerodb/{project_id}/files/upload \
-H "Authorization: Bearer $TOKEN" \
-F "file=@document.pdf"
Download a File
curl https://api.ainative.studio/api/v1/public/zerodb/{project_id}/files/{file_id} \
-H "Authorization: Bearer $TOKEN" \
-o downloaded_file.pdf
Generate a Presigned URL
curl -X POST https://api.ainative.studio/api/v1/public/zerodb/{project_id}/files/{file_id}/presigned-url \
-H "Authorization: Bearer $TOKEN"
Returns a time-limited URL for direct access without auth headers.
For a presigned upload (client PUTs bytes directly to storage, skipping the API body size limit), use POST /files/presign-upload with a multipart/form-data body (file_name, optional content_type/key/expires_in), then confirm with POST /files/confirm-upload.
List Files
curl https://api.ainative.studio/api/v1/public/zerodb/{project_id}/files \
-H "Authorization: Bearer $TOKEN"
Supports skip/limit or page/page_size query params for pagination.
Python SDK
import requests
headers = {"Authorization": "Bearer YOUR_API_KEY"}
base = "https://api.ainative.studio/api/v1/public/zerodb"
project_id = "YOUR_PROJECT_ID"
## Upload a file (multipart, not JSON)
with open("report.pdf", "rb") as f:
response = requests.post(
f"{base}/{project_id}/files/upload",
headers=headers,
files={"file": ("report.pdf", f, "application/pdf")},
)
file_id = response.json()["file_id"]
## Generate a presigned URL for sharing
url_resp = requests.post(
f"{base}/{project_id}/files/{file_id}/presigned-url",
headers=headers,
)
print(url_resp.json()["url"]) # Temporary download link
Document storage for RAG pipelines, image/artifact storage for agents, agent-generated file persistence, and report archival.
Endpoints
All paths below are relative to /api/v1/public/zerodb/{project_id}.
| Method | Path | Description |
|---|---|---|
| POST | /files/upload | Upload a file (multipart) |
| GET | /files | List files |
| GET | /files/{file_id} | Download a file |
| DELETE | /files/{file_id} | Delete a file |
| POST | /files/{file_id}/presigned-url | Generate a presigned download URL |
| POST | /files/presign-upload | Get a presigned direct-upload URL (large files) |
| POST | /files/confirm-upload | Confirm a presigned upload completed |
A project-scoped API key is restricted to its own project — using it against a different project_id in the path returns 403.
Storage Limits
| Tier | Object Storage | File Size Limit |
|---|---|---|
| Free | 1 GB | 50 MB |
| Pro | 10 GB | 100 MB |
| Business | 50 GB | 500 MB |
| Enterprise | 100 GB | 1 GB |