File.io API
Ephemeral file sharing — upload a file and get a one-time download link.
What it does
file.io is an ephemeral file-sharing API. Upload a file and get a one-time link; by default the file is deleted after the first download (or after an expiry you set). Good for passing a file through a pipeline or a quick hand-off, not for hosting.
Base URL
Authentication
Anonymous uploads work with no key but are limited. A free account API key (sent as Authorization: Bearer YOUR_KEY) raises size and retention limits and lets you list/manage files.
Code examples
curl -s -F "file=@report.pdf" "https://file.io/?expires=1d&maxDownloads=3"
# {"success":true,"key":"...","link":"https://file.io/xxxxx","expires":"..."}import requests
r = requests.post("https://file.io",
files={"file": open("data.csv", "rb")},
data={"expires": "2d"}, timeout=30)
print(r.json()["link"])Rate limits & quotas
Anonymous free: files up to about 2 GB but a small total-storage and daily-transfer allowance, retention up to 14 days, and a default of one download then auto-delete. Rapid anonymous uploads are rate limited (HTTP 429). An API key increases the allowances.
Key response fields
| success | Boolean — check before using the link |
| link | The download URL |
| key | File key — used to delete or fetch metadata (DELETE /{key}) |
| expires | When the file will be removed if not downloaded |
| maxDownloads / downloads | Download cap and count so far |
Common errors
| success:false | Upload rejected — over size/storage quota, or a disallowed type. |
| 404 on the link | The file was already downloaded (one-shot) or expired — this is normal. |
| 429 | Too many anonymous uploads — slow down or add a key. |
When to use it (and alternatives)
Great for transient hand-offs: a build artifact, a log bundle, a one-time secret file, output from a serverless job. Never use it as durable storage — for that use Cloudinary (media), ImgBB (images) or object storage.
FAQ
Why is my link already dead?
By default file.io deletes the file after the first successful download. Set maxDownloads higher, or an expires window, if it needs to survive more than one fetch.
Can I upload without an account?
Yes — anonymous POST works, with lower limits and tighter rate limiting. A free API key raises the ceilings and adds file management.
Is it safe for sensitive files?
The transfer is HTTPS and the file self-destructs, which is better than a permanent link — but anyone with the URL can grab it first. Encrypt sensitive payloads before upload.
New to APIs?
Short guides for working with this API — and any other.