API documentation
The API supports simple multipart uploads up to 25 MiB and resumable chunked uploads up to 100 GiB. All responses use JSON except chunk uploads and file downloads.
Download the OpenAPI JSON specification
Limits
- File lifetime:
1h,6h,12h, or24h. - Maximum file size: 100 GiB.
- Chunk size: at most 32 MiB.
- Multipart uploads: at most 25 MiB.
Simple upload
POST /api/v1/files
Send multipart fields file and optional retention. Retention defaults to one hour.
curl -X POST https://temp.files.land/api/v1/files \
-F "file=@example.jpg" \
-F "retention=6h"
The response contains the public url, expiration time, file ID, and a secret managementToken
used for early deletion.
Chunked upload
GET
/api/v1/capacityPOST
/api/v1/uploadsGET
/api/v1/uploads/:idPATCH
/api/v1/uploads/:idPOST
/api/v1/uploads/:id/completeDELETE
/api/v1/uploads/:id1. Create a session
curl -X POST https://temp.files.land/api/v1/uploads \
-H "Content-Type: application/json" \
--data '{"filename":"archive.zip","sizeBytes":104857600,"retention":"24h"}'
2. Upload sequential chunks
Send raw binary data with the management token and current byte offset. Read the next offset from the response
Upload-Offset header.
curl -X PATCH https://temp.files.land/api/v1/uploads/UPLOAD_ID \
-H "Authorization: Bearer MANAGEMENT_TOKEN" \
-H "Upload-Offset: 0" \
-H "Content-Type: application/octet-stream" \
--data-binary @chunk.bin
3. Complete the upload
curl -X POST https://temp.files.land/api/v1/uploads/UPLOAD_ID/complete \
-H "Authorization: Bearer MANAGEMENT_TOKEN"
Downloads and deletion
GET
/f/:id/:filenameHEAD
/f/:id/:filenameDELETE
/api/v1/files/:idDownloads are public to anyone with the generated URL. Deletion requires the management token as a bearer token.