cURL
curl --request POST \ --url https://api.foxapi.cc/v1/files/upload/stream \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form file='@example-file' \ --form purpose=image-input
{ "id": "file-abc123def456", "filename": "photo.png", "url": "https://cdn.foxapi.cc/uploads/file-abc123def456.png", "size": 204800, "created": 1757165031 }
Add to request header:
Authorization: Bearer YOUR_API_KEY
The file to upload
Usage purpose of the uploaded file
"image-input"
File uploaded successfully
File ID
"file-abc123def456"
Original filename
"photo.png"
Accessible URL of the uploaded file
"https://cdn.foxapi.cc/uploads/file-abc123def456.png"
File size in bytes
204800
Upload timestamp
1757165031