# TempFiles

> TempFiles (https://tempfiles.xyz) is free temporary file hosting. Upload a file (max 100 MB), get a shareable link, and the file is permanently deleted after a chosen time (60 seconds to 48 hours). No account. Optional password. Supported by ads.

Agents can use the HTTP API directly; no key is needed.

## Upload a file
POST https://tempfiles.xyz/api/v1/upload (multipart/form-data)
- file (required): the file, max 100 MB
- expire (optional): seconds until deletion, 60–172800, default 3600
- password (optional): require this password to download

Example:
curl -F "file=@report.pdf" -F "expire=86400" https://tempfiles.xyz/api/v1/upload

Response:
{"status":"success","data":{"url":"https://tempfiles.xyz/{id}/{name}","id":"{id}","name":"{name}","size":12345,"expires_at":1793952000,"delete_token":"{token}"}}

- Share "url" with people (a page with a Download button).
- Direct download: https://tempfiles.xyz/dl/{id}/{name}
- Keep "delete_token" to delete early.

## Check a file
GET https://tempfiles.xyz/api/v1/files/{id} → {"status":"success","data":{"id","name","size","type","expires_at","password_protected","scan_status","downloadable","url","download_url"}}
Virus scanning is disabled. New uploads return scan_status "skipped" and downloadable true.
404 means the file expired or never existed.

## Delete early
POST https://tempfiles.xyz/api/v1/delete with JSON {"id":"{id}","token":"{delete_token}"}

## Errors
JSON {"status":"error","message":"…"} with HTTP 400 (bad request), 403 (bad token), 413 (too large), 415 (blocked file type such as .bat/.vbs/.scr), 422 (bad expire), 429 (over 200 uploads/hour per IP).

## Rules
Do not upload malware, phishing, illegal content, or content you have no right to share. Files are public to anyone with the link unless a password is set.

## Docs
- [OpenAPI 3.1 spec](https://tempfiles.xyz/openapi.json)
- [API page](https://tempfiles.xyz/api)
- [Terms of Service](https://tempfiles.xyz/tos)
- [About](https://tempfiles.xyz/about)
