Skip to main content
POST
/
v1
/
files
/
upload
/
stream
File Stream Upload
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 file_name=photo.png \
  --form auto_cleanup=true
{
  "id": "file-1757165031-a1b2c3",
  "filename": "photo.png",
  "url": "https://cdn.foxapi.cc/uploads/20260319/a1b2c3d4e5f6/photo.png",
  "size": 204800,
  "created": 1757165031
}

Documentation Index

Fetch the complete documentation index at: https://docs.foxapi.cc/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

All APIs require Bearer Token authentication

Add to request header:

Authorization: Bearer YOUR_API_KEY

Body

multipart/form-data
file
file
required

The file to upload

file_name
string

Custom file name (with extension), uses the original file name if not provided

Example:

"photo.png"

auto_cleanup
boolean
default:true

Whether to automatically clean up the earliest uploaded files when storage is insufficient

Notes:

  • Default true: Automatically evicts the earliest uploaded files
  • Set to false: Returns a 403 error directly when storage is insufficient
Example:

true

Response

File uploaded successfully

id
string

File ID

Example:

"file-1757165031-a1b2c3"

filename
string

Original filename

Example:

"photo.png"

url
string

Accessible URL of the uploaded file

Example:

"https://cdn.foxapi.cc/uploads/20260319/a1b2c3d4e5f6/photo.png"

size
integer

File size in bytes

Example:

204800

created
integer

Upload timestamp

Example:

1757165031