Free File Storage API for Developers
Need to upload and share files programmatically? Whether you're building a file-sharing feature, storing AI-generated outputs, handling user uploads in a SaaS app, or sharing temporary build artifacts — you need a file storage API that's simple, fast, and doesn't require configuring S3 buckets.
Setting up AWS S3, managing IAM policies, configuring CORS, and handling presigned URLs adds complexity that slows down development. We built a free file storage API with 3 upload methods, auto-expiring links, download limits, and direct shareable URLs. No signup, no bucket configuration, no cloud console.
Try it right now
Upload your first file in under 30 seconds. No signup, no cloud setup.
Get Free API KeyQuick Start: Upload a File in One Command
1. Upload via curl (no API key needed for free tier)
# Upload any file with a PUT request
curl -X PUT https://agent-gateway-kappa.vercel.app/v1/agent-filestorage/api/files/upload/report.pdf \
--upload-file report.pdf
{
"id": "f_17b7f20d0dd4",
"token": "9f22922553107298",
"originalName": "report.pdf",
"contentType": "application/pdf",
"size": 45230,
"uploadedAt": "2026-03-03T20:07:59.187Z",
"expiresAt": "2026-03-04T20:07:59.187Z",
"ttlHours": 24,
"downloads": 0,
"downloadUrl": "/api/files/f_17b7f20d0dd4/download",
"directUrl": "/d/9f22922553107298/report.pdf"
}
2. Share the direct URL
The directUrl is a public link — anyone with it can download the file, no authentication needed. Perfect for sharing with teammates, clients, or embedding in docs.
3. Download or manage
# Download by file ID (authenticated)
curl https://agent-gateway-kappa.vercel.app/v1/agent-filestorage/api/files/f_17b7f20d0dd4/download -o report.pdf
# Delete when done
curl -X DELETE https://agent-gateway-kappa.vercel.app/v1/agent-filestorage/api/files/f_17b7f20d0dd4 \
-H "Authorization: Bearer YOUR_KEY"
3 Upload Methods
Raw Binary (PUT)
Upload any file directly with curl --upload-file. Simplest method — just PUT the file content to /api/files/upload/:filename.
Multipart Form (POST)
Standard multipart/form-data upload. Works with HTML forms, React file inputs, and any HTTP client. Send to /api/files/upload.
Base64 JSON (POST)
Send file content as base64 in a JSON body. Great for programmatic uploads when you already have the data in memory. Send to /api/files/upload/base64.
Features
Auto-Expiring Files
Files expire after 24 hours by default (configurable up to 7 days). No cleanup scripts needed — storage manages itself.
Download Limits
Set a maximum download count per file. After the limit is reached, the file becomes inaccessible. Perfect for one-time download links.
Tags & Metadata
Organize files with tags and custom metadata. Filter and search your uploads programmatically.
Direct Share URLs
Every file gets a public direct URL that requires no authentication. Share it anywhere — Slack, email, docs, CI/CD logs.
Deletion Tokens
Each upload returns a deletion token. Share it with the recipient so they can delete the file themselves without your API key.
50 MB File Limit
Upload files up to 50 MB. Supports any content type — documents, images, archives, data files, binaries.
API Reference
| Endpoint | Method | Description |
|---|---|---|
/api/files/upload | POST | Upload via multipart/form-data |
/api/files/upload/:filename | PUT | Upload via raw binary body |
/api/files/upload/base64 | POST | Upload via base64-encoded JSON |
/api/files | GET | List your uploaded files |
/api/files/:id | GET | Get file metadata |
/api/files/:id/download | GET | Download file by ID |
/d/:token/:filename | GET | Direct download (no auth, shareable) |
/api/files/:id | PATCH | Update tags or download limits |
/api/files/:id | DELETE | Delete a file (requires auth) |
/api/files/:id/:deletionToken | DELETE | Delete with deletion token (no auth) |
Code Examples
# Upload a file (raw binary — simplest method)
curl -X PUT https://agent-gateway-kappa.vercel.app/v1/agent-filestorage/api/files/upload/screenshot.png \
--upload-file screenshot.png
# Upload with tags and custom TTL (base64 method)
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-filestorage/api/files/upload/base64 \
-H "Content-Type: application/json" \
-d '{"filename": "config.json", "content": "eyJrZXkiOiJ2YWx1ZSJ9", "contentType": "application/json", "tags": ["config", "v2"], "ttlHours": 48}'
# Upload via multipart form (like an HTML form)
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-filestorage/api/files/upload \
-F "file=@document.pdf"
# List your files
curl https://agent-gateway-kappa.vercel.app/v1/agent-filestorage/api/files \
-H "Authorization: Bearer YOUR_KEY"
# Set download limit (one-time download link)
curl -X PATCH https://agent-gateway-kappa.vercel.app/v1/agent-filestorage/api/files/f_abc123 \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"maxDownloads": 1}'
import requests
import base64
API = "https://agent-gateway-kappa.vercel.app/v1/agent-filestorage"
# Step 1: Get free API key
key_resp = requests.post(f"{API}/api/keys/create")
api_key = key_resp.json()["key"]
print(f"API Key: {api_key}")
headers = {"Authorization": f"Bearer {api_key}"}
# Step 2: Upload a file (multipart)
with open("report.pdf", "rb") as f:
resp = requests.post(
f"{API}/api/files/upload",
headers=headers,
files={"file": ("report.pdf", f, "application/pdf")}
)
result = resp.json()
print(f"Uploaded: {result['id']}")
print(f"Share URL: {result['directUrl']}")
print(f"Expires: {result['expiresAt']}")
# Upload from memory (base64)
data = {"hello": "world"}
content = base64.b64encode(json.dumps(data).encode()).decode()
resp = requests.post(
f"{API}/api/files/upload/base64",
headers=headers,
json={
"filename": "data.json",
"content": content,
"contentType": "application/json",
"tags": ["output", "json"]
}
)
print(f"JSON uploaded: {resp.json()['directUrl']}")
# List all files
files = requests.get(f"{API}/api/files", headers=headers).json()
for f in files.get("files", []):
print(f" {f['originalName']} ({f['size']} bytes, expires {f['expiresAt']})")
const fs = require('fs');
const API = 'https://agent-gateway-kappa.vercel.app/v1/agent-filestorage';
async function uploadFiles() {
// Step 1: Get free API key
const keyResp = await fetch(`${API}/api/keys/create`, { method: 'POST' });
const { key } = await keyResp.json();
console.log(`API Key: ${key}`);
// Step 2: Upload via raw binary
const fileBuffer = fs.readFileSync('report.pdf');
const resp = await fetch(`${API}/api/files/upload/report.pdf`, {
method: 'PUT',
headers: {
'Authorization': `Bearer ${key}`,
'Content-Type': 'application/pdf'
},
body: fileBuffer
});
const result = await resp.json();
console.log(`Uploaded: ${result.id}`);
console.log(`Share: ${result.directUrl}`);
// Step 3: Upload JSON from memory (base64)
const data = { metrics: [1, 2, 3], timestamp: Date.now() };
const b64 = Buffer.from(JSON.stringify(data)).toString('base64');
const jsonResp = await fetch(`${API}/api/files/upload/base64`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${key}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
filename: 'metrics.json',
content: b64,
contentType: 'application/json',
tags: ['metrics']
})
});
console.log(`JSON uploaded: ${(await jsonResp.json()).directUrl}`);
}
uploadFiles();
Use Cases
CI/CD Build Artifacts
Upload build outputs, test reports, and coverage files from your CI pipeline. Share direct download links in pull request comments or Slack channels. Files auto-expire after 24 hours so you don't accumulate stale artifacts.
# In your CI pipeline — upload test results
RESULT=$(curl -s -X PUT https://agent-gateway-kappa.vercel.app/v1/agent-filestorage/api/files/upload/test-report.html \
--upload-file coverage/report.html)
URL=$(echo $RESULT | python3 -c "import sys,json; print(json.load(sys.stdin)['directUrl'])")
echo "Test report: $URL"
AI Agent Output Storage
When your AI agent generates a report, creates an image, or produces a data file — store it via the API and return the shareable link. The agent doesn't need to manage cloud storage credentials.
Temporary File Sharing
Share files that automatically disappear. Set expiration from 1 hour to 7 days. Optionally set a download limit of 1 for true one-time download links — the file becomes inaccessible after a single download.
# One-time download link (file deleted after first download)
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-filestorage/api/files/upload/base64 \
-H "Content-Type: application/json" \
-d '{"filename": "secret.txt", "content": "VG9wIHNlY3JldCBkYXRh", "tags": ["sensitive"], "maxDownloads": 1}'
User Upload Backend
Add file upload to your web or mobile app without configuring S3, managing IAM, or writing presigned URL logic. Use the multipart endpoint — it works like a standard HTML form upload.
Comparison: File Storage APIs in 2026
| Feature | Agent File Storage | AWS S3 | Uploadcare | file.io | transfer.sh |
|---|---|---|---|---|---|
| Setup required | None | AWS account, IAM, buckets | Account + project | None | None |
| Signup required | No | Yes | Yes | No | No |
| Free tier | 50 uploads | 5 GB (12 months) | 3,000 uploads/mo | Unlimited* | 10 GB |
| Max file size | 50 MB | 5 TB | 500 MB | 2 GB | 10 GB |
| Auto-expiring links | Yes (1h-7d) | Presigned URLs | No | Yes (14d) | Yes (14d) |
| Download limits | Yes | No | No | 1 download only | Max downloads |
| Tags & metadata | Yes | Yes | Yes | No | No |
| Direct share URL | Yes (no auth) | Presigned only | CDN URL | Yes | Yes |
| Upload methods | 3 (multipart, binary, base64) | Multipart, presigned | Multipart, URL | Multipart | Binary |
| API style | REST | REST/SDK | REST | REST | curl |
* file.io is free but files are deleted after a single download. Agent File Storage gives you configurable download limits, longer TTLs, and full CRUD operations.
Start uploading files now
50 free uploads. No signup, no cloud setup, no bucket configuration.
Get Free API KeyFrequently Asked Questions
How many free uploads do I get?
50 uploads with each API key. No signup or credit card required. Basic uploads (without an API key) work for the first few files on the free tier. Paid credits cost $0.002 per upload (500 credits per USDC).
How long are files stored?
Files expire after 24 hours by default. You can set custom TTL from 1 hour to 168 hours (7 days) using the ttlHours parameter. Expired files are automatically deleted.
What's the maximum file size?
50 MB per file. Any content type is accepted — documents, images, archives, data files, binaries, and more.
Can I create one-time download links?
Yes. Set maxDownloads: 1 when uploading or via PATCH. After the file is downloaded once, it becomes inaccessible. Great for sharing sensitive documents.
Are direct URLs public?
Yes. The directUrl (/d/:token/:filename) is a public link that anyone can access without authentication. The token is random and unguessable. If you need to restrict access, use the authenticated download endpoint instead.
Can I delete files before they expire?
Yes. Use DELETE /api/files/:id with your API key, or DELETE /api/files/:id/:deletionToken with the deletion token from the upload response (no auth needed).
Is there a rate limit?
Free tier: 30 requests per minute. With an API key and credits: 120 requests per minute.
More Developer Tools
- Free PDF Generation API — generate PDFs from HTML, Markdown, or templates
- Free URL Shortener API — custom slugs and click analytics
- Free Screenshot API — capture website screenshots programmatically
- Free Code Execution API — run Python, JavaScript, Bash online
- Free Web Scraping API — extract content from any URL
- Explore all 39+ APIs in the Clawdia catalog