API Documentation
AUTHENTICATION
Uploading files now requires authentication. You must generate an API token from your Profile. Include this token in your requests using the Bearer Token method.
Authorization: Bearer YOUR_TOKEN_HERE
UPLOAD
When you send us files with POST, we store them and return an url for you in JSON.
Request Example
Replace YOUR_TOKEN with the token generated in your profile.
Successful Response
{
"status": true,
"data": {
"file": {
"url": {
"full": "https://file.fast/BpQ/test",
"short": "https://file.fast/BpQ"
},
"metadata": {
"id": "BpQ",
"name": "test.txt",
"size": {
"bytes": 13,
"readable": "13 B"
}
}
}
}
}
Step 1: Get Upload URL
Send file info, get a presigned URL for direct upload.
{
"status": true,
"data": {
"upload_url": "https://storage.../...?signature=...",
"filename": "uuid.zip"
}
}
Step 2: Upload File
PUT your file directly to the upload_url.
Step 3: Finalize
Register the file to get your download link.
{
"status": true,
"data": {
"file": {
"url": {
"full": "https://file.fast/BpQ/file",
"short": "https://file.fast/BpQ"
},
"metadata": {
"id": "BpQ",
"name": "file.zip",
"size": {
"bytes": 524288000,
"readable": "500.00 MB"
}
}
}
}
}
Python Example
import requests
import os
API_URL = "https://file.fast"
TOKEN = "YOUR_API_TOKEN"
def upload_large_file(filepath):
filename = os.path.basename(filepath)
filesize = os.path.getsize(filepath)
headers = {"Authorization": f"Bearer {TOKEN}"}
# Step 1: Get presigned URL
resp = requests.post(f"{API_URL}/api/v1/upload/presign",
headers=headers,
json={"name": filename, "size": filesize, "mimetype": "application/octet-stream"})
data = resp.json()["data"]
# Step 2: Upload directly
with open(filepath, "rb") as f:
requests.put(data["upload_url"], data=f)
# Step 3: Finalize
final = requests.post(f"{API_URL}/api/v1/upload/finalize",
headers=headers,
json={"filename": data["filename"]})
return final.json()["data"]["file"]["url"]["short"]
print(upload_large_file("my-large-file.zip"))
Error Responses
{
"status": false,
"errors": {
"file": ["The file may not be greater than 5 GB."]
}
}
// Invalid token:
{
"status": false,
"errors": {
"message": "Unauthenticated."
}
}
INFO
Get info about a file. Use the [status] key to check if a file exists.
Request Example
Response
{
"status": true,
"data": {
"file": {
"url": {
"full": "https://file.fast/m40/test",
"short": "https://file.fast/m40"
},
"metadata": {
"id": "m40",
"name": "test.txt",
"size": {
"bytes": "162249833",
"readable": "154.73 MiB"
}
}
}
}
}
LIST FILES
Get a list of your uploaded files. Use ?page=N for pagination.
Request Example
Response
{
"status": true,
"data": {
"files": [
{
"url": { "full": "...", "short": "..." },
"metadata": { "id": "BpQ", "name": "test.txt", "size": {...} }
}
],
"pagination": {
"current_page": 1,
"last_page": 1,
"per_page": 20,
"total": 1
}
}
}
DELETE FILE
Permanently delete a file using its ID.
Request Example
Response
{
"status": true,
"message": "File deleted successfully."
}
FOLDERS
Get a list of your folders. Use ?parent_id=FOLDER_ID to list subfolders.
Request Example
Response
{
"status": true,
"data": {
"folders": [
{
"id": "abc-123-uuid",
"name": "My Folder",
"file_count": 5,
"subfolder_count": 2,
"created_at": "2024-01-15T10:30:00+00:00"
}
]
}
}
List Files in Folder
Create a new folder. Add parent_id to create a subfolder.
Request Example
Create Subfolder
Response
{
"status": true,
"data": {
"folder": {
"id": "new-folder-uuid",
"name": "New Folder",
"created_at": "2024-01-15T10:30:00+00:00"
}
}
}
Upload files directly to a specific folder using the folder's UUID.
Standard Upload
Add the folder_uuid header:
Large File Upload
Include folder_id in the presign request:
Then follow the same PUT and finalize steps as large file upload.